linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Wilcox <willy@infradead.org>
To: Liu Shixin <liushixin2@huawei.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Chengming Zhou <chengming.zhou@linux.dev>,
	Kefeng Wang <wangkefeng.wang@huawei.com>,
	Nanyong Sun <sunnanyong@huawei.com>,
	Muchun Song <muchun.song@linux.dev>,
	Qi Zheng <zhengqi.arch@bytedance.com>,
	Johannes Weiner <hannes@cmpxchg.org>,
	Yang Shi <yang@os.amperecomputing.com>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: khugepaged: fix call hpage_collapse_scan_file() for anonymous vma
Date: Thu, 9 Jan 2025 13:40:42 +0000	[thread overview]
Message-ID: <Z3_R2qWcvWxm6T83@casper.infradead.org> (raw)
In-Reply-To: <20250109070059.369257-1-liushixin2@huawei.com>

On Thu, Jan 09, 2025 at 03:00:59PM +0800, Liu Shixin wrote:
> Add vma_is_anonymous() check to make such vma be processed by
> hpage_collapse_scan_pmd().

Wouldn't it be better to replace the vm_file check with
vma_is_anonymous()?  ie:

> -			if (IS_ENABLED(CONFIG_SHMEM) && vma->vm_file) {
> +			if (IS_ENABLED(CONFIG_SHMEM) && vma->vm_file &&
> +			    !vma_is_anonymous(vma)) {

+			if (IS_ENABLED(CONFIG_SHMEM) &&
+			    !vma_is_anonymous(vma)) {



  reply	other threads:[~2025-01-09 13:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-09  7:00 Liu Shixin
2025-01-09 13:40 ` Matthew Wilcox [this message]
2025-01-10  2:29   ` Liu Shixin
2025-01-09 17:00 ` Yang Shi
2025-01-10  2:08   ` Baolin Wang
2025-01-10  2:32   ` Liu Shixin
2025-01-10  4:31   ` Matthew Wilcox
2025-01-10 18:04     ` Yang Shi
2025-01-10 19:01       ` Matthew Wilcox
2025-01-10 19:40         ` Yang Shi
2025-01-11  3:54           ` Liu Shixin
2025-01-13 18:51             ` Yang Shi

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=Z3_R2qWcvWxm6T83@casper.infradead.org \
    --to=willy@infradead.org \
    --cc=akpm@linux-foundation.org \
    --cc=chengming.zhou@linux.dev \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=liushixin2@huawei.com \
    --cc=muchun.song@linux.dev \
    --cc=sunnanyong@huawei.com \
    --cc=wangkefeng.wang@huawei.com \
    --cc=yang@os.amperecomputing.com \
    --cc=zhengqi.arch@bytedance.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