Hello, On Mon, Sep 24, 2012 at 12:25:00PM +0400, Glauber Costa wrote: > > This is kinda nasty. Do we really need to do this? How long would a > > dead cache stick around? > > Without targeted shrinking, until all objects are manually freed, which > may need to wait global reclaim to kick in. > > In general, if we agree with duplicating the caches, the problem that > they may stick around for some time will not be avoidable. If you have > any suggestions about alternative ways for it, I'm all ears. I don't have much problem with caches sticking around waiting to be reaped. I'm just wondering whether renaming trick is really necessary. > > Reaping dead caches doesn't exactly sound like a high priority thing > > and adding a branch to hot path for that might not be the best way to > > do it. Why not schedule an extremely lazy deferrable delayed_work > > which polls for emptiness, say, every miniute or whatever? > > > > Because this branch is marked as unlikely, I would expect it not to be a > big problem. It will be not taken most of the time, and becomes a very > cheap branch. I considered this to be simpler than a deferred work > mechanism. > > If even then, you guys believe this is still too high, I can resort to that. It's still an otherwise unnecessary branch on a very hot path. If you can remove it, there's no reason not to. Thanks. -- tejun -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>