Re: [PATCH 2/4][v2] vmscan: bailout of slab reclaim once we reach our target

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

 



On Wed, Jul 05, 2017 at 01:27:04PM +0900, Minchan Kim wrote:
> On Tue, Jul 04, 2017 at 08:33:38AM -0400, josef@xxxxxxxxxxxxxx wrote:
> > From: Josef Bacik <jbacik@xxxxxx>
> > 
> > Following patches will greatly increase our aggressiveness in slab
> > reclaim, so we need checks in place to make sure we stop trying to
> > reclaim slab once we've hit our reclaim target.
> > 
> > Signed-off-by: Josef Bacik <jbacik@xxxxxx>
> > ---
> > v1->v2:
> > - Don't bail out in shrink_slab() so that we always scan at least batch_size
> >   objects of every slab regardless of wether we've hit our target or not.
> 
> It's no different with v1 for aging fairness POV.
> 
> Imagine you have 3 shrinkers in shrinker_list and A has a lots of objects.
> 
>         HEAD-> A -> B -> C
> 
> shrink_slab does scan/reclaims from A srhinker a lot until it meets
> sc->nr_to_reclaim. Then, VM does aging B and C with batch_size which is
> rather small. It breaks fairness.
> 
> In next memory pressure, it shrinks A a lot again but B and C
> a little bit.
> 

Oh duh yeah I see what you are saying.  I had a scheme previously to break up
the scanning targets based on overall usage but it meant looping through the
shrinkers twice, as we have to get a total count of objects first to determine
individual ratios.  I suppose since there's relatively low cost to getting
object counts per shrinker and there don't tend to be a lot of shrinkers we
could go with this to make it more fair.  I'll write this up.  Thanks,

Josef

--
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 OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]
  Powered by Linux