Skip to content

Arch independent quicklists V1

Christoph Lameter linux-ia64 lkml 1 version In review

Get series with b4
b4 am 20070311020923.19905.49260.sendpatchset@schroedinger.engr.sgi.com

Versions newest first

  1. v1 Latest6 patches 17 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6Extract quicklist implementation from IA64arch/ia64/Kconfig arch/ia64/mm/contig.c arch/ia64/mm/discontig.c +6 more+182 -1190 replies
2/6i386: quicklist supportarch/i386/Kconfig arch/i386/kernel/process.c arch/i386/kernel/smp.c +4 more+30 -501 reply
3/6i386: Use standard list manipulators for pgd_listarch/i386/mm/fault.c arch/i386/mm/pageattr.c arch/i386/mm/pgtable.c +1 more+9 -280 replies
4/6x86_64: Single Quicklistarch/x86_64/Kconfig arch/x86_64/kernel/process.c arch/x86_64/kernel/smp.c +2 more+28 -113 replies
5/6x86_64: Separate quicklist for pgdsarch/x86_64/Kconfig arch/x86_64/mm/fault.c include/asm-x86_64/pgalloc.h +1 more+36 -450 replies
6/6slub: remove special casing for PAGE_SIZE slabsmm/slub.c+0 -190 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [QUICKLIST 0/6] Arch independent quicklists V1

This patchset introduces an arch independent framework to handle lists of recently used page table pages.

Page table pages have the characteristics that they are typically zero or in a known state when they are freed. This is usually the exactly same state as needed after allocation. So it makes sense to build a list of freed page table pages and then consume the pages already in use first. Those pages have already been initialized correctly (thus no need to zero them) and are likely already cached in such a way that the MMU can use them most effectively.

Such an implementation already exits for ia64. If I remember correctly it was done by Robin Holt. Howver, that implementation did not support constructors and destructors as needed by i386 / x86_64. It also only supported a single quicklist. The implementation here has constructor and destructor support as well as the ability for an arch to specify how many quicklists are needed.

Quicklists are defined by an arch defining the necessary number of quicklists in arch/<arch>/Kconfig. F.e. i386 needs two and thus has

config NR_QUICK
int
default 2

If an arch has requested quicklist support then pages can be allocated from the quicklist (or from the page allocator if the quicklist is empty) via:

quicklist_alloc(<quicklist-nr>, <gfpflags>, <constructor>)

Page table pages can be freed using:

quicklist_free(<quicklist-nr>, <destructor>, <page>)

Pages must have a definite state after allocation and before they are freed. If no constructor is specified then pages will be zeroed on allocation and must be zeroed before they are freed.

If a constructor is used then the constructor will establish a definite page state. F.e. the i386 and x86_64 pgd constructors establish certain mappings.

Constructors and destructors can also be used to track the pages. i386 and x86_64 use a list of pgds in order to be able to dynamically update standard mappings.

6 patches follow this message:

[QUICKLIST 1/6] Extract quicklist implementation from IA64 [QUICKLIST 2/6] i386: quicklist support
[QUICKLIST 3/6] i386: Use standard list manipulators for pgd_list [QUICKLIST 4/6] x86_64: Single quicklist
[QUICKLIST 5/6] x86_64: Separate quicklist for pgds [QUICKLIST 6/6] slub: remove special casing for PAGE_SIZE slabs