lkml.org 
[lkml]   [2015]   [Jun]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCHv3 2/7] zsmalloc: partial page ordering within a fullness_list
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


\
 
 \ /
  Last update: 2015-06-18 15:01    [W:0.360 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site