Hello, Johannes. On Tue, Jun 04, 2013 at 05:40:50PM -0400, Johannes Weiner wrote: > We might pin them indefinitely. In a hierarchy with hundreds of > groups that is short by 10M of memory, we only reclaim from a couple > of groups before we stop and leave the iterator pointing somewhere in > the hierarchy. Until the next reclaimer comes along, which might be a > split second later or three days later. > > There is a reclaim iterator for every memcg (since every memcg > represents a hierarchy), so we could pin a lot of csss for an > indefinite amount of time. As long as it's bound by the actual number of memcgs in the system and dead cgroups don't pin any other resources, I don't think pinning css and thus memcg struct itself is something we need to worry about. Especially not at the cost of this weak referencing thing. If the large number of unused but pinned css's actually is a problem (which I seriously doubt), we can implement a trivial timer based cache expiration which can be extremely coarse - ie. each iterator just keeps the last time stamp it was used and cleanup runs every ten mins or whatever. It'll be like twenty lines of completely obvious code. 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>