[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0000013ae6c60609-b5de43f3-1454-4827-920b-75285fe0f8ed-000000@email.amazonses.com>
Date: Fri, 9 Nov 2012 20:04:28 +0000
From: Christoph Lameter <cl@...ux.com>
To: Andrew Morton <akpm@...ux-foundation.org>
cc: Glauber Costa <glommer@...allels.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org, kamezawa.hiroyu@...fujitsu.com,
Johannes Weiner <hannes@...xchg.org>,
Tejun Heo <tj@...nel.org>, Michal Hocko <mhocko@...e.cz>,
Pekka Enberg <penberg@...nel.org>,
David Rientjes <rientjes@...gle.com>,
Pekka Enberg <penberg@...helsinki.fi>,
Suleiman Souhlal <suleiman@...gle.com>
Subject: Re: [PATCH v6 25/29] memcg/sl[au]b: shrink dead caches
On Thu, 8 Nov 2012, Andrew Morton wrote:
> > kmem_cache_shrink is also used internally. Its simply releasing unused
> > cached objects.
>
> Only in slub. It could be removed outright from the others and
> simplified in slub.
Both SLAB and SLUB must purge their queues before closing/destroying a
cache. There is not much code that can be eliminated.
> > Because the core cache shrinking needs the slab caches to free up memory
> > from inodes and dentries. We could call kmem_cache_shrink at the end of
> > the shrink passes in vmscan. The price would be that the caches would have
> > to be repopulated when new allocations occur.
>
> Well, the shrinker shouldn't strips away all the cache. It will perform
> a partial trim, the magnitude of which increases with perceived
> external memory pressure.
The partial trim of the objects cached by SLAB is performed in 2 second
intervals from the cache reaper.
We are talking here about flushing all
the cached objects from the inode and dentry cache etc in vmscan right?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists