From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: YiPing Xu <xuyiping@huawei.com>
Cc: minchan@kernel.org, ngupta@vflare.org,
sergey.senozhatsky.work@gmail.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, suzhuangluan@hisilicon.com,
puck.chen@hisilicon.com, dan.zhao@hisilicon.com,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] zsmalloc: drop unused member 'mapping_area->huge'
Date: Wed, 17 Feb 2016 14:20:58 +0900 [thread overview]
Message-ID: <20160217052058.GA620@swordfish> (raw)
In-Reply-To: <1455674199-6227-1-git-send-email-xuyiping@huawei.com>
On (02/17/16 09:56), YiPing Xu wrote:
> When unmapping a huge class page in zs_unmap_object, the page will
> be unmapped by kmap_atomic. the "!area->huge" branch in
> __zs_unmap_object is alway true, and no code set "area->huge" now,
> so we can drop it.
>
the patch looks good to me, thanks.
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
-ss
> Signed-off-by: YiPing Xu <xuyiping@huawei.com>
> ---
> mm/zsmalloc.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
> index 2d7c4c1..43e4cbc 100644
> --- a/mm/zsmalloc.c
> +++ b/mm/zsmalloc.c
> @@ -281,7 +281,6 @@ struct mapping_area {
> #endif
> char *vm_addr; /* address of kmap_atomic()'ed pages */
> enum zs_mapmode vm_mm; /* mapping mode */
> - bool huge;
> };
>
> static int create_handle_cache(struct zs_pool *pool)
> @@ -1127,11 +1126,9 @@ static void __zs_unmap_object(struct mapping_area *area,
> goto out;
>
> buf = area->vm_buf;
> - if (!area->huge) {
> - buf = buf + ZS_HANDLE_SIZE;
> - size -= ZS_HANDLE_SIZE;
> - off += ZS_HANDLE_SIZE;
> - }
> + buf = buf + ZS_HANDLE_SIZE;
> + size -= ZS_HANDLE_SIZE;
> + off += ZS_HANDLE_SIZE;
>
> sizes[0] = PAGE_SIZE - off;
> sizes[1] = size - sizes[0];
> --
> 1.8.3.2
>
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>
To: YiPing Xu <xuyiping@huawei.com>
Cc: minchan@kernel.org, ngupta@vflare.org,
sergey.senozhatsky.work@gmail.com, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, suzhuangluan@hisilicon.com,
puck.chen@hisilicon.com, dan.zhao@hisilicon.com,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] zsmalloc: drop unused member 'mapping_area->huge'
Date: Wed, 17 Feb 2016 14:20:58 +0900 [thread overview]
Message-ID: <20160217052058.GA620@swordfish> (raw)
In-Reply-To: <1455674199-6227-1-git-send-email-xuyiping@huawei.com>
On (02/17/16 09:56), YiPing Xu wrote:
> When unmapping a huge class page in zs_unmap_object, the page will
> be unmapped by kmap_atomic. the "!area->huge" branch in
> __zs_unmap_object is alway true, and no code set "area->huge" now,
> so we can drop it.
>
the patch looks good to me, thanks.
Reviewed-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
-ss
> Signed-off-by: YiPing Xu <xuyiping@huawei.com>
> ---
> mm/zsmalloc.c | 9 +++------
> 1 file changed, 3 insertions(+), 6 deletions(-)
>
> diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
> index 2d7c4c1..43e4cbc 100644
> --- a/mm/zsmalloc.c
> +++ b/mm/zsmalloc.c
> @@ -281,7 +281,6 @@ struct mapping_area {
> #endif
> char *vm_addr; /* address of kmap_atomic()'ed pages */
> enum zs_mapmode vm_mm; /* mapping mode */
> - bool huge;
> };
>
> static int create_handle_cache(struct zs_pool *pool)
> @@ -1127,11 +1126,9 @@ static void __zs_unmap_object(struct mapping_area *area,
> goto out;
>
> buf = area->vm_buf;
> - if (!area->huge) {
> - buf = buf + ZS_HANDLE_SIZE;
> - size -= ZS_HANDLE_SIZE;
> - off += ZS_HANDLE_SIZE;
> - }
> + buf = buf + ZS_HANDLE_SIZE;
> + size -= ZS_HANDLE_SIZE;
> + off += ZS_HANDLE_SIZE;
>
> sizes[0] = PAGE_SIZE - off;
> sizes[1] = size - sizes[0];
> --
> 1.8.3.2
>
next prev parent reply other threads:[~2016-02-17 5:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-17 1:56 [PATCH] zsmalloc: drop unused member 'mapping_area->huge' YiPing Xu
2016-02-17 1:56 ` YiPing Xu
2016-02-17 2:26 ` Sergey Senozhatsky
2016-02-17 2:26 ` Sergey Senozhatsky
2016-02-17 3:29 ` xuyiping
2016-02-17 3:29 ` xuyiping
2016-02-17 3:55 ` Sergey Senozhatsky
2016-02-17 3:55 ` Sergey Senozhatsky
2016-02-17 5:20 ` Sergey Senozhatsky [this message]
2016-02-17 5:20 ` Sergey Senozhatsky
2016-02-17 15:37 ` Minchan Kim
2016-02-17 15:37 ` Minchan Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160217052058.GA620@swordfish \
--to=sergey.senozhatsky.work@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=dan.zhao@hisilicon.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=minchan@kernel.org \
--cc=ngupta@vflare.org \
--cc=puck.chen@hisilicon.com \
--cc=suzhuangluan@hisilicon.com \
--cc=xuyiping@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.