[v2,0/2] mm: Don't set and reset page count in MEMINIT_EARLY

Message ID 20230925072150.386880-1-yajun.deng@linux.dev
Headers
Series mm: Don't set and reset page count in MEMINIT_EARLY |

Message

Yajun Deng Sept. 25, 2023, 7:21 a.m. UTC
  __init_single_page would set page count and __free_pages_core would
reset it. A lot of pages don't need to do this when in MEMINIT_EARLY
context. It's unnecessary and time-consuming.

The 1st patch is pass page count and reserved to __init_single_page.
It's in preparation for the 2nd patch, it didn't change anything.

The 2nd patch only set page count for the reserved region, not all
of the region.

Yajun Deng (2):
  mm: pass page count and reserved to __init_single_page
  mm: Init page count in reserve_bootmem_region when MEMINIT_EARLY

 mm/hugetlb.c    |  2 +-
 mm/internal.h   |  8 +++++++-
 mm/mm_init.c    | 45 ++++++++++++++++++++++++++++-----------------
 mm/page_alloc.c | 20 ++++++++++++--------
 4 files changed, 48 insertions(+), 27 deletions(-)