lkml.org 
[lkml]   [2026]   [Apr]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 01/14] mm/khugepaged: remove READ_ONLY_THP_FOR_FS check
On Thu, 30 Apr 2026 10:37:52 -0400 Zi Yan <ziy@nvidia.com> wrote:

> + * MADV_COLLAPSE ignores shmem huge config, so do not check shmem
> > + *
> > + * TODO: once shmem always calls mapping_set_large_folios() on its
> > + * mapping, the shmem check can be removed.
> > + */
> > + VM_WARN_ON_ONCE(!is_shmem && !mapping_pmd_folio_support(mapping));
>
> sashiko asked:
> Is it possible for userspace to intentionally trigger this warning via
> madvise(MADV_COLLAPSE) on an unsupported read-only file? Although in
> a later commit, modified file_thp_enabled() will prevent this.
>
> Answer:
> It is possible when CONFIG_READ_ONLY_THP_FOR_FS is enabled, but it is
> unlikely a kernel will be shipped at this exact commit.

Yeah, let's not worry about minor bisection holes.

\
 
 \ /
  Last update: 2026-04-30 17:05    [W:0.120 / U:5.707 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and my Meterkast|Read the blog