On 04/17/2013 04:31 PM, David Miller wrote: > > I also don't agree with this approach to fix the bug. I'm not wild about it myself, but it's relatively simple and fixes the problem. > I'd much rather we properly synchronize. One idea is to have > a pendulum which sways every time a remove batch flush is > performed. > > The pendulum is a pointer, which points to one of two per-cpu batch > datastructures. A remote flush is issued by setting an atomic counter > to the number of remote cpus doing the flush in the per-cpu batch > area, each remote cpu decrements the atomic counter. The remote function doesn't operate with a stack, so it can't simply call atomic_dec (or atomic_sub) but would need to open code it. Possible, but it makes the fix a bit more complicated. > The submitter also "sways the pendulum" by adjusting the pointer to > other per-cpu batch datastructure. > > If a submitter sees that there is a reference count on the per-cpu > batch the pendulum points to, it waits until the counter hits zero. -- To unsubscribe from this list: send the line "unsubscribe sparclinux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html