lkml.org 
[lkml]   [2016]   [May]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 07/12] zsmalloc: factor page chain functionality out
On (05/09/16 11:20), Minchan Kim wrote:
> For page migration, we need to create page chain of zspage dynamically
> so this patch factors it out from alloc_zspage.
>
> Cc: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
> Signed-off-by: Minchan Kim <minchan@kernel.org>

Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>

[..]
> + page = alloc_page(flags);
> + if (!page) {
> + while (--i >= 0)
> + __free_page(pages[i]);

put_page() ?

a minor nit, put_page() here probably will be in alignment
with __free_zspage(), which does put_page().

-ss

> + return NULL;
> + }
> + pages[i] = page;
> }
>
> + create_page_chain(pages, class->pages_per_zspage);
> + first_page = pages[0];
> + init_zspage(class, first_page);
> +
> return first_page;
> }

\
 
 \ /
  Last update: 2016-05-16 04:41    [W:0.105 / U:0.392 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site