The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Qi Zheng <qi.zheng@linux.dev>
To: baolin.wang@linux.alibaba.com
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	hughd@google.com, usama.arif@linux.dev,
	akpm@linux-foundation.org, brauner@kernel.org, david@kernel.org
Subject: Re: [PATCH v3 2/3] mm: shmem: move unused huge shrinklist queuing past the truncation check
Date: Tue, 4 Aug 2026 15:03:00 +0800	[thread overview]
Message-ID: <77c64cfb-012f-4e66-87bc-536bf0fc4ca6@linux.dev> (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>


missed adding:

Suggested-by: Baolin Wang <baolin.wang@linux.alibaba.com>

  reply	other threads:[~2026-08-04  7:03 UTC|newest]

Thread overview: 11+ 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-04  6:18     ` Qi Zheng
2026-08-03  8:46 ` [PATCH v3 2/3] mm: shmem: move unused huge shrinklist queuing past the truncation check Qi Zheng
2026-08-04  7:03   ` Qi Zheng [this message]
2026-08-03  8:46 ` [PATCH v3 3/3] mm: shmem: make unused huge shrinker memcg aware Qi Zheng
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
2026-08-04  6:36   ` Qi Zheng

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=77c64cfb-012f-4e66-87bc-536bf0fc4ca6@linux.dev \
    --to=qi.zheng@linux.dev \
    --cc=akpm@linux-foundation.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=brauner@kernel.org \
    --cc=david@kernel.org \
    --cc=hughd@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=usama.arif@linux.dev \
    /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