Re: [patch 10/10] mm: workingset: keep shadow entries in check

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 03, 2013 at 11:01:54AM -0400, Johannes Weiner wrote:
> On Mon, Jun 03, 2013 at 10:22:09AM +0200, Peter Zijlstra wrote:
> > On Thu, May 30, 2013 at 02:04:06PM -0400, Johannes Weiner wrote:
> > > 2. a list of files that contain shadow entries is maintained.  If the
> > >    global number of shadows exceeds a certain threshold, a shrinker is
> > >    activated that reclaims old entries from the mappings.  This is
> > >    heavy-handed but it should not be a common case and is only there
> > >    to protect from accidentally/maliciously induced OOM kills.
> > 
> > Grrr.. another global files list. We've been trying rather hard to get
> > rid of the first one :/
> > 
> > I see why you want it but ugh.
> 
> I'll try to make it per-SB like the inode list.  It probably won't be
> per-SB shrinkers because of the global nature of the shadow limit, but
> at least per-SB inode lists should be doable.

per have per-cpu-per-sb lists, see file_sb_list_{add,del} and
do_file_list_for_each_entry()

> > I have similar worries for your global time counter, large machines
> > might thrash on that one cacheline.
> 
> Fair enough.
> 
> So I'm trying the following idea: instead of the global time counter,
> have per-zone time counters and store the zone along with those local
> timestamps in the shadow entries (nid | zid | time).  On refault, we
> can calculate the zone-local distance first and then use the inverse
> of the zone's eviction proportion to scale it to a global distance.

The thinking is since that's the same granularity as the zone lock,
you're likely to at least trash the zone lock in equal measure?

--
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>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]