From: Pankaj Raghav <p.raghav@samsung.com>
As all the helper functions has been renamed from *_page to *_folio,
rename the MM flag from MMF_HUGE_ZERO_PAGE to MMF_HUGE_ZERO_FOLIO.
No functional changes.
Suggested-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Pankaj Raghav <p.raghav@samsung.com>
---
include/linux/mm_types.h | 2 +-
mm/huge_memory.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 1ec273b06691..2ad5eaddfcce 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -1753,7 +1753,7 @@ enum {
#define MMF_RECALC_UPROBES 20 /* MMF_HAS_UPROBES can be wrong */
#define MMF_OOM_SKIP 21 /* mm is of no interest for the OOM killer */
#define MMF_UNSTABLE 22 /* mm is unstable for copy_from_user */
-#define MMF_HUGE_ZERO_PAGE 23 /* mm has ever used the global huge zero page */
+#define MMF_HUGE_ZERO_FOLIO 23 /* mm has ever used the global huge zero folio */
#define MMF_DISABLE_THP 24 /* disable THP for all VMAs */
#define MMF_DISABLE_THP_MASK (1 << MMF_DISABLE_THP)
#define MMF_OOM_REAP_QUEUED 25 /* mm was queued for oom_reaper */
diff --git a/mm/huge_memory.c b/mm/huge_memory.c
index 6625514f622b..ff06dee213eb 100644
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@ -248,13 +248,13 @@ static void put_huge_zero_folio(void)
struct folio *mm_get_huge_zero_folio(struct mm_struct *mm)
{
- if (test_bit(MMF_HUGE_ZERO_PAGE, &mm->flags))
+ if (test_bit(MMF_HUGE_ZERO_FOLIO, &mm->flags))
return READ_ONCE(huge_zero_folio);
if (!get_huge_zero_folio())
return NULL;
- if (test_and_set_bit(MMF_HUGE_ZERO_PAGE, &mm->flags))
+ if (test_and_set_bit(MMF_HUGE_ZERO_FOLIO, &mm->flags))
put_huge_zero_folio();
return READ_ONCE(huge_zero_folio);
@@ -262,7 +262,7 @@ struct folio *mm_get_huge_zero_folio(struct mm_struct *mm)
void mm_put_huge_zero_folio(struct mm_struct *mm)
{
- if (test_bit(MMF_HUGE_ZERO_PAGE, &mm->flags))
+ if (test_bit(MMF_HUGE_ZERO_FOLIO, &mm->flags))
put_huge_zero_folio();
}
--
2.49.0
On Mon, Aug 04, 2025 at 02:13:53PM +0200, Pankaj Raghav (Samsung) wrote: > From: Pankaj Raghav <p.raghav@samsung.com> > > As all the helper functions has been renamed from *_page to *_folio, > rename the MM flag from MMF_HUGE_ZERO_PAGE to MMF_HUGE_ZERO_FOLIO. > > No functional changes. > > Suggested-by: David Hildenbrand <david@redhat.com> > Signed-off-by: Pankaj Raghav <p.raghav@samsung.com> LGTM, so: Reviewed-by: Lorenzo Stoakes <lorenzo.stoakes@oracle.com> > --- > include/linux/mm_types.h | 2 +- > mm/huge_memory.c | 6 +++--- > 2 files changed, 4 insertions(+), 4 deletions(-) > > diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h > index 1ec273b06691..2ad5eaddfcce 100644 > --- a/include/linux/mm_types.h > +++ b/include/linux/mm_types.h > @@ -1753,7 +1753,7 @@ enum { > #define MMF_RECALC_UPROBES 20 /* MMF_HAS_UPROBES can be wrong */ > #define MMF_OOM_SKIP 21 /* mm is of no interest for the OOM killer */ > #define MMF_UNSTABLE 22 /* mm is unstable for copy_from_user */ > -#define MMF_HUGE_ZERO_PAGE 23 /* mm has ever used the global huge zero page */ > +#define MMF_HUGE_ZERO_FOLIO 23 /* mm has ever used the global huge zero folio */ > #define MMF_DISABLE_THP 24 /* disable THP for all VMAs */ > #define MMF_DISABLE_THP_MASK (1 << MMF_DISABLE_THP) > #define MMF_OOM_REAP_QUEUED 25 /* mm was queued for oom_reaper */ > diff --git a/mm/huge_memory.c b/mm/huge_memory.c > index 6625514f622b..ff06dee213eb 100644 > --- a/mm/huge_memory.c > +++ b/mm/huge_memory.c > @@ -248,13 +248,13 @@ static void put_huge_zero_folio(void) > > struct folio *mm_get_huge_zero_folio(struct mm_struct *mm) > { > - if (test_bit(MMF_HUGE_ZERO_PAGE, &mm->flags)) > + if (test_bit(MMF_HUGE_ZERO_FOLIO, &mm->flags)) > return READ_ONCE(huge_zero_folio); > > if (!get_huge_zero_folio()) > return NULL; > > - if (test_and_set_bit(MMF_HUGE_ZERO_PAGE, &mm->flags)) > + if (test_and_set_bit(MMF_HUGE_ZERO_FOLIO, &mm->flags)) > put_huge_zero_folio(); > > return READ_ONCE(huge_zero_folio); > @@ -262,7 +262,7 @@ struct folio *mm_get_huge_zero_folio(struct mm_struct *mm) > > void mm_put_huge_zero_folio(struct mm_struct *mm) > { > - if (test_bit(MMF_HUGE_ZERO_PAGE, &mm->flags)) > + if (test_bit(MMF_HUGE_ZERO_FOLIO, &mm->flags)) > put_huge_zero_folio(); > } > > -- > 2.49.0 >
On 04.08.25 14:13, Pankaj Raghav (Samsung) wrote: > From: Pankaj Raghav <p.raghav@samsung.com> > > As all the helper functions has been renamed from *_page to *_folio, > rename the MM flag from MMF_HUGE_ZERO_PAGE to MMF_HUGE_ZERO_FOLIO. > > No functional changes. > > Suggested-by: David Hildenbrand <david@redhat.com> > Signed-off-by: Pankaj Raghav <p.raghav@samsung.com> > --- Acked-by: David Hildenbrand <david@redhat.com> -- Cheers, David / dhildenb
On 4 Aug 2025, at 8:13, Pankaj Raghav (Samsung) wrote: > From: Pankaj Raghav <p.raghav@samsung.com> > > As all the helper functions has been renamed from *_page to *_folio, > rename the MM flag from MMF_HUGE_ZERO_PAGE to MMF_HUGE_ZERO_FOLIO. > > No functional changes. > > Suggested-by: David Hildenbrand <david@redhat.com> > Signed-off-by: Pankaj Raghav <p.raghav@samsung.com> > --- > include/linux/mm_types.h | 2 +- > mm/huge_memory.c | 6 +++--- > 2 files changed, 4 insertions(+), 4 deletions(-) > Reviewed-by: Zi Yan <ziy@nvidia.com> Best Regards, Yan, Zi
© 2016 - 2025 Red Hat, Inc.