From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out30-112.freemail.mail.aliyun.com (out30-112.freemail.mail.aliyun.com [115.124.30.112]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 438DB1F09A5 for ; Wed, 5 Aug 2026 03:20:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=115.124.30.112 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785900050; cv=none; b=XzgeOyUeiiGfwHJ+91UTem/r86FXhzgDY30P4ttb9nYmmOvc0Ui/btT90M+Q2DJ0U+XHgci/Qs3Ox+kkh8H4xUYjaCeFIy1a5chNN+tBcHfEMSOXNTc3AZDef3w0gxQcF9Ttzf+PLOiWSGPAsBHXYkEOpeTNIrYcdwGfBYJFWUM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1785900050; c=relaxed/simple; bh=+V9IZ41mAylkDYldI5zacSBCruJPdtzVCVfO0bDhslc=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=bVFff4PttCjnuSTw8bDvqslnveTnP8EFUTiLz1lEfae4dqksZG97vGYbuyXtkk2s3MbtoPNxHDSGf81i9WTcg87B54dU3cxRHPFKFj3TVFGUfRQgb+2N12+xDPB8MFPhb+yBgsFQQZOHosYN1AvxMxYf473XX+DImkb07NgQo08= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com; spf=pass smtp.mailfrom=linux.alibaba.com; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b=p9bw/J/M; arc=none smtp.client-ip=115.124.30.112 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.alibaba.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.alibaba.com header.i=@linux.alibaba.com header.b="p9bw/J/M" DKIM-Signature:v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.alibaba.com; s=default; t=1785900045; h=Message-ID:Date:MIME-Version:Subject:To:From:Content-Type; bh=EQ4zAu9Mk3RCyEmBGHgbe0sr3WORbbBmO5hX6+6SKwg=; b=p9bw/J/Migv5d9U+0zJkMBHsAnqSqZbyZ9GPP3TVJN11xFNjxkQLltcUN8mOj1HoSXjTUBUaWsXryZ/c9c1GfvIDrodWN2Yn3BOr3wDc/XkHwl11/J94/97yAiHmKZpye5SG0wMhoEK/mH5ierMwGf7rnxaSQG93LPNtHmXq0vs= X-Alimail-AntiSpam:AC=PASS;BC=-1|-1;BR=01201311R891e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=maildocker-contentspam033037033178;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=9;SR=0;TI=SMTPD_---0X8PuU9P_1785900043; Received: from 30.74.144.139(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0X8PuU9P_1785900043 cluster:ay36) by smtp.aliyun-inc.com; Wed, 05 Aug 2026 11:20:44 +0800 Message-ID: <59c321e1-b58c-4531-bafc-5c1493d92309@linux.alibaba.com> Date: Wed, 5 Aug 2026 11:20:42 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 2/3] mm: shmem: move unused huge shrinklist queuing past the truncation check To: Qi Zheng , 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 References: From: Baolin Wang In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 8/3/26 4:46 PM, Qi Zheng wrote: > From: Qi Zheng > > 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 > --- LGTM. Thanks. Reviewed-by: Baolin Wang