mbox series

[0/5] Minor mm/struct page work

Message ID 20211013160034.3472923-1-kent.overstreet@gmail.com (mailing list archive)
Headers show
Series Minor mm/struct page work | expand

Message

Kent Overstreet Oct. 13, 2021, 4 p.m. UTC
Some small buddy allocator/struct page patches

The first two patches are small buddy allocator cleanups - they were supposed to
be prep work patches to replacing buddy allocator freelists with radix trees,
but I'm not sure if that's actually going to be feasible due to highmem - but
the patches are still improvements so I wanted to send them out.

The third, to mm/page_reporting, also came about because that code walks buddy
allocator freelists but is a much more significant cleanup. I have no idea how
to test page reporting though so it's only Correct By Obviousness, so hopefully
Alexander can help us out with that.

The last two patches are important for the struct page cleanups currently
underway. We have a lot of code using page->index and page->mapping in ad-hoc
ways, and this is a real problem given our goal of cutting struct page up into
different types that each have a well defined purpose - and it turns out that a
lot of that code is using those fields for very minor conveniences. We still
need a lot more cleanups like this, I've only done two of the easier ones.

Kent Overstreet (5):
  mm: Make free_area->nr_free per migratetype
  mm: Introduce struct page_free_list
  mm/page_reporting: Improve control flow
  md: Kill usage of page->index
  brd: Kill usage of page->index

 drivers/block/brd.c    |   4 --
 drivers/md/md-bitmap.c |  44 ++++++------
 include/linux/mmzone.h |  22 ++++--
 kernel/crash_core.c    |   4 +-
 mm/compaction.c        |  20 +++---
 mm/page_alloc.c        |  50 +++++++------
 mm/page_reporting.c    | 158 +++++++++++++++--------------------------
 mm/vmstat.c            |  28 +-------
 8 files changed, 138 insertions(+), 192 deletions(-)