Linux-mm Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Baolin Wang <baolin.wang@linux.alibaba.com>
To: Qi Zheng <qi.zheng@linux.dev>,
	hughd@google.com, usama.arif@linux.dev, brauner@kernel.org,
	akpm@linux-foundation.org, david@kernel.org
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	Qi Zheng <zhengqi.arch@bytedance.com>
Subject: Re: [PATCH v3 2/3] mm: shmem: move unused huge shrinklist queuing past the truncation check
Date: Wed, 5 Aug 2026 11:20:42 +0800	[thread overview]
Message-ID: <59c321e1-b58c-4531-bafc-5c1493d92309@linux.alibaba.com> (raw)
In-Reply-To: <e3d8eb0605eb8c4836fb1f376a0487328135b2c9.1785746588.git.zhengqi.arch@bytedance.com>



On 8/3/26 4:46 PM, Qi Zheng wrote:
> From: Qi Zheng <zhengqi.arch@bytedance.com>
> 
> The shmem_get_folio_gfp() adds the inode to the unused huge shrinker list
> at the alloced label, but a subsequent truncation check may still fail and
> remove the folio, leaving the inode on the list with a stale folio.
> 
> The original code works because the shrinker re-looks-up the folio and
> drops stale entries, but it is cleaner to queue the inode only after all
> checks that might remove the folio have passed.
> 
> So just make the pure structural move with no functional change, and it
> serves as preparation for the memcg-aware shrinker conversion.
> 
> Signed-off-by: Qi Zheng <zhengqi.arch@bytedance.com>
> ---

LGTM. Thanks.
Reviewed-by: Baolin Wang <baolin.wang@linux.alibaba.com>


  reply	other threads:[~2026-08-05  3:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-03  8:46 [PATCH v3 0/3] make unused huge shrinker memcg aware Qi Zheng
2026-08-03  8:46 ` [PATCH v3 1/3] fs: fix missed removal of super_fs_objects_eligible() Qi Zheng
2026-08-03 21:20   ` Andrew Morton
2026-08-03  8:46 ` [PATCH v3 2/3] mm: shmem: move unused huge shrinklist queuing past the truncation check Qi Zheng
2026-08-05  3:20   ` Baolin Wang [this message]
2026-08-03  8:46 ` [PATCH v3 3/3] mm: shmem: make unused huge shrinker memcg aware Qi Zheng
2026-08-06  5:35   ` Baolin Wang
2026-08-03 12:21 ` [PATCH v3 0/3] " David Hildenbrand (Arm)
2026-08-04  3:51   ` Qi Zheng
2026-08-03 21:24 ` Andrew Morton

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=59c321e1-b58c-4531-bafc-5c1493d92309@linux.alibaba.com \
    --to=baolin.wang@linux.alibaba.com \
    --cc=akpm@linux-foundation.org \
    --cc=brauner@kernel.org \
    --cc=david@kernel.org \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=qi.zheng@linux.dev \
    --cc=usama.arif@linux.dev \
    --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