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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
> Signed-off-by: Minchan Kim <minchan@xxxxxxxxxx>

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

[..]
> +		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;
>  }

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



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]