linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Vlastimil Babka <vbabka@suse.cz>
To: Chanho Min <chanho.min@lge.com>, Minchan Kim <minchan@kernel.org>,
	Nitin Gupta <ngupta@vflare.org>,
	Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	seungho1.park@lge.com, Inkyu Hwang <inkyu.hwang@lge.com>,
	Jinsuk Choi <jjinsuk.choi@lge.com>
Subject: Re: [PATCH] mm/zsmalloc.c: fix the migrated zspage statistics.
Date: Fri, 29 Nov 2019 16:17:33 +0100	[thread overview]
Message-ID: <43d28728-2cc2-7978-633a-fbae48433b87@suse.cz> (raw)
In-Reply-To: <1574990967-23391-1-git-send-email-chanho.min@lge.com>

On 11/29/19 2:29 AM, Chanho Min wrote:
> When zspage is migrated to the other zone, the zone page state should
> be updated as well.

What are the user visible effects? I assume NR_ZSPAGES accounting can go
wrong otherwise? Has it been observed in practice?
Should we Cc stable and identify a Fixes: commit?

Thanks,
Vlastimil

> Signed-off-by: Chanho Min <chanho.min@lge.com>
> Signed-off-by: Jinsuk Choi <jjinsuk.choi@lge.com>
> ---
>  mm/zsmalloc.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/mm/zsmalloc.c b/mm/zsmalloc.c
> index 2b2b9aa..22d17ec 100644
> --- a/mm/zsmalloc.c
> +++ b/mm/zsmalloc.c
> @@ -2069,6 +2069,11 @@ static int zs_page_migrate(struct address_space *mapping, struct page *newpage,
>  		zs_pool_dec_isolated(pool);
>  	}
>  
> +	if (page_zone(newpage) != page_zone(page)) {
> +		dec_zone_page_state(page, NR_ZSPAGES);
> +		inc_zone_page_state(newpage, NR_ZSPAGES);
> +	}
> +
>  	reset_page(page);
>  	put_page(page);
>  	page = newpage;
> 



  reply	other threads:[~2019-11-29 15:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-29  1:29 Chanho Min
2019-11-29 15:17 ` Vlastimil Babka [this message]
2019-12-02  0:55   ` 민찬호
2019-12-02  2:39 ` Sergey Senozhatsky
2019-12-04  1:23 ` 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=43d28728-2cc2-7978-633a-fbae48433b87@suse.cz \
    --to=vbabka@suse.cz \
    --cc=akpm@linux-foundation.org \
    --cc=chanho.min@lge.com \
    --cc=inkyu.hwang@lge.com \
    --cc=jjinsuk.choi@lge.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=minchan@kernel.org \
    --cc=ngupta@vflare.org \
    --cc=sergey.senozhatsky.work@gmail.com \
    --cc=seungho1.park@lge.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox