diff options
author | Yisheng Xie <xieyisheng1@huawei.com> | 2017-02-24 14:59:42 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-02-24 17:46:56 -0800 |
commit | 22c5cef16278bf83aa54ac96a7735ce82f93524e (patch) | |
tree | 2be9e81101c4a3370addbfcf2b3694ac1f34a49b /mm/slab.h | |
parent | e1587a4945408faa58d0485002c110eb2454740c (diff) | |
download | linux-22c5cef16278bf83aa54ac96a7735ce82f93524e.tar.gz linux-22c5cef16278bf83aa54ac96a7735ce82f93524e.tar.bz2 linux-22c5cef16278bf83aa54ac96a7735ce82f93524e.zip |
mm/zsmalloc: remove redundant SetPagePrivate2 in create_page_chain
We had used page->lru to link the component pages (except the first
page) of a zspage, and used INIT_LIST_HEAD(&page->lru) to init it.
Therefore, to get the last page's next page, which is NULL, we had to
use page flag PG_Private_2 to identify it.
But now, we use page->freelist to link all of the pages in zspage and
init the page->freelist as NULL for last page, so no need to use
PG_Private_2 anymore.
This remove redundant SetPagePrivate2 in create_page_chain and
ClearPagePrivate2 in reset_page(). Save a few cycles for migration of
zsmalloc page :)
Link: http://lkml.kernel.org/r/1487076509-49270-1-git-send-email-xieyisheng1@huawei.com
Signed-off-by: Yisheng Xie <xieyisheng1@huawei.com>
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Acked-by: Minchan Kim <minchan@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/slab.h')
0 files changed, 0 insertions, 0 deletions