On 11/10/2025 7:22 PM, Lorenzo Stoakes wrote: > On Mon, Nov 10, 2025 at 01:47:10PM +0000, Matthew Wilcox wrote: >> On Mon, Nov 10, 2025 at 11:32:53AM +0000, Shivank Garg wrote: >>> When MADV_COLLAPSE is called on file-backed mappings (e.g., executable >>> text sections), the pages may still be dirty from recent writes. The >> >> That explanation derails my brain entirely. Text isn't writable! How >> can the pages be dirty and file-backed text? > > Because they just compiled it and it's not been written back to disk yet :) Hi, It's not about compilation. My binaries are already compiled. The issue is copying those binary to a freshly mounted filesystem. The page cache folios remain dirty until background writeback completes. Reproduces 100% for me: fresh XFS/EXT4 mount -> copy binary -> execute -> MADV_COLLAPSE fails. Detail logs: https://lore.kernel.org/all/[email protected] Thanks, Shivank
- Re: [PATCH 1/2] mm/k... Lorenzo Stoakes
- Re: [PATCH 1/2] mm/k... Zi Yan
- Re: [PATCH 1/2] mm/k... Lorenzo Stoakes
- Re: [PATCH 1/2] mm/k... Garg, Shivank
- Re: [PATCH 1/2] mm/khugepaged: do synchro... Dev Jain
- Re: [PATCH 1/2] mm/khugepaged: do syn... Lorenzo Stoakes
- Re: [PATCH 1/2] mm/khugepaged: do... Dev Jain
- Re: [PATCH 1/2] mm/khugepaged: do synchronous ... Matthew Wilcox
- Re: [PATCH 1/2] mm/khugepaged: do synchro... Lorenzo Stoakes
- Re: [PATCH 1/2] mm/khugepaged: do syn... Matthew Wilcox
- Re: [PATCH 1/2] mm/khugepaged: do syn... Garg, Shivank
- Re: [PATCH 1/2] mm/khugepaged: do... Lorenzo Stoakes
- Re: [PATCH 1/2] mm/khugepaged: do... Matthew Wilcox
- Re: [PATCH 1/2] mm/khugepaged... Garg, Shivank
- Re: [PATCH 1/2] mm/khuge... David Hildenbrand (Red Hat)
- Re: [PATCH 1/2] mm/khugepaged: do synchro... David Hildenbrand (Red Hat)
- Re: [PATCH 1/2] mm/khugepaged: do syn... Matthew Wilcox
- Re: [PATCH 1/2] mm/khugepaged: do... Lorenzo Stoakes
- Re: [PATCH 1/2] mm/khugepaged... David Hildenbrand (Red Hat)
- Re: [PATCH 1/2] mm/khugepaged: do synchronous ... kernel test robot
