Skip to content

RFC Dynamically allocated pageflags.

Nigel Cunningham lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest5 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5Dynamically allocated pageflags - core code.include/linux/dyn_pageflags.h init/main.c mm/Makefile +2 more+845 -10 replies
2/5Dynamically allocated pageflags - PageMappedToDisk conversion.include/linux/page-flags.h mm/dyn_pageflags.c mm/page_alloc.c+9 -50 replies
3/5Dynamically allocated pageflags - PageSwapCache conversion.include/linux/page-flags.h mm/dyn_pageflags.c+7 -30 replies
4/5Dynamically allocated pageflags - PageSlab conversion.include/linux/page-flags.h mm/dyn_pageflags.c mm/page_alloc.c +1 more+12 -80 replies
5/5Dynamically allocated pageflags - PageBuddy conversion.include/linux/page-flags.h mm/dyn_pageflags.c mm/page_alloc.c+12 -100 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC] [PATCH 0/5] Dynamically allocated pageflags.

Hi all.

As we all know, pageflags have been a scarce resource for a while now. These patches seek to help address that issue by adding support for a new type of 'dynamically allocated' pageflag.

The basic idea is that we use per node & zone bitmaps built out of order zero allocations, to replace bits in page->flags. Bitmaps can be sparse, being populated when a bit on the page is set, and returning zero for all bits in sparse pages. Untested hotplug support is included.

This method of storing the data does of course come with a performance hit. I've included some simple timing loops in #ifdef'd code that help quantify that.

Interestingly, the new implementation is actually quicker under some circumstances. In cases where the usage pattern involves operating on the flags for a number of pages in succession, the hit involved in getting the struct pages from main memory appears to be greater than that involved in calculating which unsigned long and bit to test.

Tested only on UP (x86_64) so far.

Regards,

Nigel