mbox series

[0/5] create hugetlb flags to consolidate state

Message ID 20210116003105.182918-1-mike.kravetz@oracle.com (mailing list archive)
Headers show
Series create hugetlb flags to consolidate state | expand


Mike Kravetz Jan. 16, 2021, 12:31 a.m. UTC
While discussing a series of hugetlb fixes in [1], it became evident
that the hugetlb specific page state information is stored in a somewhat
haphazard manner.  Code dealing with state information would be easier
to read, understand and maintain if this information was stored in a
consistent manner.

This series uses page.private of the hugetlb head page for storing a
set of hugetlb specific page flags.  Routines are priovided for test,
set and clear of the flags.

[1] https://lore.kernel.org/r/20210106084739.63318-1-songmuchun@bytedance.com

  Simplified to use a single set of flag manipulation routines (Oscar)
  Moved flags and routines to hugetlb.h (Muchun)
  Changed format of page flag names (Muchun)
  Changed subpool routine names (Matthew)
  More comments in code (Oscar)

Based on v5.11-rc3-mmotm-2021-01-12-01-57

Mike Kravetz (5):
  hugetlb: use page.private for hugetlb specific page flags
  hugetlb: convert page_huge_active() to HP_Migratable flag
  hugetlb: only set HP_Migratable for migratable hstates
  hugetlb: convert PageHugeTemporary() to HP_Temporary flag
  hugetlb: convert PageHugeFreed to HP_Freed flag

 fs/hugetlbfs/inode.c       |  14 +---
 include/linux/hugetlb.h    |  81 ++++++++++++++++++++
 include/linux/page-flags.h |   6 --
 mm/hugetlb.c               | 150 +++++++++++--------------------------
 mm/memory_hotplug.c        |   8 +-
 mm/migrate.c               |  12 ---
 6 files changed, 137 insertions(+), 134 deletions(-)