lkml.org 
[lkml]   [2015]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCHv3 3/7] zsmalloc: always keep per-class stats
On (06/29/15 15:40), Minchan Kim wrote:
> On Thu, Jun 18, 2015 at 08:46:40PM +0900, Sergey Senozhatsky wrote:
> > Always account per-class `zs_size_stat' stats. This data will
> > help us make better decisions during compaction. We are especially
> > interested in OBJ_ALLOCATED and OBJ_USED, which can tell us if
> > class compaction will result in any memory gain.
> >
> > For instance, we know the number of allocated objects in the class,
> > the number of objects being used (so we also know how many objects
> > are not used) and the number of objects per-page. So we can ensure
> > if we have enough unused objects to form at least one ZS_EMPTY
> > zspage during compaction.
> >
> > We calculate this value on per-class basis so we can calculate a
> > total number of zspages that can be released. Which is exactly what
> > a shrinker wants to know.
> >
> > Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> Acked-by: Minchan Kim <minchan@kernel.org>
>

thanks.

-ss


\
 
 \ /
  Last update: 2015-06-29 11:21    [W:0.095 / U:0.328 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site