Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1167526
| From | Davidlohr Bueso <dave@stgolabs.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] mm: use srcu for shrinkers |
| Date | 2015-06-18 03:40 +0200 |
| Message-ID | <pCwY9-28X-7@gated-at.bofh.it> (permalink) |
| References | <pBIRI-5m8-7@gated-at.bofh.it> <pCggH-3hd-41@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, 2015-06-17 at 09:47 +0200, Michal Hocko wrote: > On the other hand using srcu is a neat idea. Shrinkers only need the > existence guarantee when racing with unregister. Register even shouldn't > be that interesting because such a shrinker wouldn't have much to > shrink anyway so we can safely miss it AFAIU. With the srcu read lock > we can finally get rid of the try_lock. I do not think you need an > ugly spin_is_locked as the replacement though. We have the existence > guarantee and that should be sufficient. So the reason for the spin_is_locked check was that I was concerned about new reader(s) that come in while doing the registry. Currently this is forbidden by the trylock and fake-ish retry. But yes, perhaps I was being over safe and we shouldn't be blockling the reclaim simply because a shrinker is registering. And it would be cleaner to get rid of the whole retry idea and just use rcu guarantees. This is probably a little late in the game to try to push for 4.2, so I'll send a v2 with any other updates that might come up once the merge window closes. Thanks, Davidlohr -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] mm: use srcu for shrinkers Davidlohr Bueso <dave@stgolabs.net> - 2015-06-15 22:10 +0200 Re: [PATCH] mm: use srcu for shrinkers Davidlohr Bueso <dave@stgolabs.net> - 2015-06-18 03:40 +0200
csiph-web