On Tue, Oct 13, 2009 at 11:19:11AM -0700, Jason Thorpe wrote: > > On Oct 9, 2009, at 7:35 AM, Matt Thomas wrote: > > > Do it lazily. Set a flag in each per-cpu queue and next time an item that > > cpu accesses its per-cpu cache, it can see the cache is invalid and discard > > it. > > This doesn't solve the window of that cpu already actively using the pool > > while the flag is set but it could that could solved by get testing the > > test on > > exit, if set discarding the item, and retrying. > > > > No reason for exposing the mechanics of how to do this to the users of the > > poll APIs. > > It actually turned out to be very trivial to fix pool_cache_invalidate() to > DTRT with per-CPU caches. I'll provide a patch for Jean-Yves to try in the > situation where he required pool_cache_invalidate_local(). While I was at > it, I discovered that the two existing uses of pool_cache_invalidate() don't > do proper synchronization wrt. the constructor. I'll write up a patch for > the alpha and x86 pmaps separately.
x86 used pmap_list_lock (pmaps_lock?) to do this at one point, it's possible that somebody broke it.
