On (06/18/15 21:13), Sergey Senozhatsky wrote: > I think it makes sense to also consider 'fullness_group fullness' in > insert_zspage(). Unconditionally put ZS_ALMOST_FULL pages to list > head, or (if zspage is !ZS_ALMOST_FULL) compage ->inuse. > > IOW, something like this > > --- > > mm/zsmalloc.c | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c > index 692b7dc..d576397 100644 > --- a/mm/zsmalloc.c > +++ b/mm/zsmalloc.c > @@ -645,10 +645,11 @@ static void insert_zspage(struct page *page, struct size_class *class, > * We want to see more ZS_FULL pages and less almost > * empty/full. Put pages with higher ->inuse first. > */ > - if (page->inuse < (*head)->inuse) > - list_add_tail(&page->lru, &(*head)->lru); > - else > + if (fullness == ZS_ALMOST_FULL || > + (page->inuse >= (*head)->inuse)) > list_add(&page->lru, &(*head)->lru); > + else > + list_add_tail(&page->lru, &(*head)->lru); > } > > *head = page; > almost_full full almost_empty obj_allocated obj_used pages_used Base Total 3 168 26 2324 1822 307 Total 3 167 29 2391 1815 314 Total 5 172 25 2392 1827 313 Patched Total 4 180 27 2425 1835 327 Total 4 169 27 2405 1825 312 Total 2 176 28 2452 1825 315 ... no chance the test is right. -ss -- 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>