Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1401280

Re: [PATCH v5 07/12] zsmalloc: factor page chain functionality out

From Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v5 07/12] zsmalloc: factor page chain functionality out
Date 2016-05-16 04:20 +0200
Message-ID <rzgiE-HG-299@gated-at.bofh.it> (permalink)
References <rwJ7j-2Gd-3@gated-at.bofh.it> <rwJ7k-2Gd-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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;
>  }

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

Re: [PATCH v5 07/12] zsmalloc: factor page chain functionality out Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> - 2016-05-16 04:20 +0200
  Re: [PATCH v5 07/12] zsmalloc: factor page chain functionality out Minchan Kim <minchan@kernel.org> - 2016-05-17 03:10 +0200

csiph-web