Re: [PATCH v3 2/3] mm: shmem: move unused huge shrinklist queuing past the truncation check
Qi Zheng <[email protected]> Tue, 4 Aug 2026 15:03:00 +0800
| Newsgroups | gmane.linux.kernel,gmane.linux.kernel.mm |
|---|---|
| Message-ID | <[email protected]> |
On 8/3/26 4:46 PM, Qi Zheng wrote: > From: Qi Zheng <[email protected]> > > 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 <[email protected]> missed adding: Suggested-by: Baolin Wang <[email protected]>