diff options
author | Minchan Kim <minchan@kernel.org> | 2015-04-15 19:15:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-15 19:35:20 -0400 |
commit | d3d07c92ff69f784bb8c3279fa87678bfa2f7f6f (patch) | |
tree | ea13c63b576a82c469a5a0ef9c874f64964837a6 /mm | |
parent | 312fcae227037619dc858c9ccd362c7b847730a2 (diff) |
zsmalloc: adjust ZS_ALMOST_FULL
Curretly, zsmalloc regards a zspage as ZS_ALMOST_EMPTY if the zspage has
under 1/4 used objects(ie, fullness_threshold_frac). It could make result
in loose packing since zsmalloc migrates only ZS_ALMOST_EMPTY zspage out.
This patch changes the rule so that zsmalloc makes zspage which has above
3/4 used object ZS_ALMOST_FULL so it could make tight packing.
Signed-off-by: Minchan Kim <minchan@kernel.org>
Cc: Juneho Choi <juno.choi@lge.com>
Cc: Gunho Lee <gunho.lee@lge.com>
Cc: Luigi Semenzato <semenzato@google.com>
Cc: Dan Streetman <ddstreet@ieee.org>
Cc: Seth Jennings <sjennings@variantweb.net>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Jerome Marchand <jmarchan@redhat.com>
Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Mel Gorman <mel@csn.ul.ie>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/zsmalloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c index c4ae608dc725..3bd8b0a16462 100644 --- a/mm/zsmalloc.c +++ b/mm/zsmalloc.c | |||
@@ -480,7 +480,7 @@ static enum fullness_group get_fullness_group(struct page *page) | |||
480 | fg = ZS_EMPTY; | 480 | fg = ZS_EMPTY; |
481 | else if (inuse == max_objects) | 481 | else if (inuse == max_objects) |
482 | fg = ZS_FULL; | 482 | fg = ZS_FULL; |
483 | else if (inuse <= max_objects / fullness_threshold_frac) | 483 | else if (inuse <= 3 * max_objects / fullness_threshold_frac) |
484 | fg = ZS_ALMOST_EMPTY; | 484 | fg = ZS_ALMOST_EMPTY; |
485 | else | 485 | else |
486 | fg = ZS_ALMOST_FULL; | 486 | fg = ZS_ALMOST_FULL; |