Skip to content

Virtual Compound Page Support V3

Christoph Lameter linux-ia64 linux-mm lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest14 patches 72 repliesIn review

Changes in v1 from the cover letter

- Complete support for all compound functions for virtual compound pages (including the compound_nth_page() necessary for LBS mmap support)
- Fix various bugs
- Fix i386 build

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14vcompound: Return page array on vunmapinclude/linux/vmalloc.h mm/vmalloc.c+23 -110 replies
2/14vcompound: pageflags: Add PageVcompound()include/linux/page-flags.h+18 -00 replies
3/14vmallocinfo: Support display of vcompound for a virtual compound pageinclude/linux/vmalloc.h mm/vmalloc.c+4 -02 replies
4/14vcompound: Core pieceinclude/linux/vmalloc.h mm/vmalloc.c+211 -02 replies
5/14vcompound: Debugging aidlib/Kconfig.debug mm/vmalloc.c+26 -30 replies
6/14vcompound: Virtual fallback for sparsememmm/sparse.c+2 -230 replies
7/14vcompound: bit waitqueue supportkernel/wait.c+2 -10 replies
8/14vcompound: Fallback for zone wait tablemm/page_alloc.c+2 -10 replies
9/14vcompound: crypto: Fallback for temporary order 2 allocationcrypto/xor.c+2 -20 replies
10/14vcompound: slub: Use for buffer to correlate allocation addressesmm/slub.c+3 -30 replies
11/14vcompound: Fallbacks for order 1 stack allocations on IA64 and x86include/asm-ia64/thread_info.h include/asm-x86/thread_info_32.h include/asm-x86/thread_info_64.h+8 -751 replies
12/14vcompound: Avoid vmalloc in e1000 driverdrivers/net/e1000/e1000_main.c drivers/net/e1000e/netdev.c+17 -181 reply
13/14vcompound: Use vcompound for swap_mapmm/swapfile.c+4 -47 replies
14/14vcompound: Avoid vmalloc for ehash_locksinclude/net/inet_hashtables.h+3 -26 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [00/14] Virtual Compound Page Support V3

Allocations of larger pages are not reliable in Linux. If larger pages have to be allocated then one faces various choices of allowing graceful fallback or using vmalloc with a performance penalty due to the use of a page table. Virtual Compound pages are
a simple solution out of this dilemma.

A virtual compound allocation means that there will be first of all an attempt to satisfy the request with physically contiguous memory. If that is not possible then a virtually contiguous memory will be created.

This has two advantages:

1. Current uses of vmalloc can be converted to allocate virtual compounds instead. In most cases physically contiguous memory can be used which avoids the vmalloc performance penalty. See f.e. the e1000 driver patch.

2. Uses of higher order allocations (stacks, buffers etc) can be converted to use virtual compounds instead. Physically contiguous memory will still be used for those higher order allocs in general but the system can degrade to the use of vmalloc should memory become heavily fragmented.

There is a compile time option to switch on fallback for testing purposes. Virtually mapped mmemory may behave differently and the CONFIG_FALLBACK_ALWAYS option will ensure that the code is tested to deal with virtual memory.

V2->V3:
- Put the code into mm/vmalloc.c and leave the page allocator alone.
- Add a series of examples where virtual compound pages can be used.
- Diffed on top of the page flags and the vmalloc info patches already in mm.
- Simplify things by omitting some of the more complex code that used to be in there.

V1->V2
- Remove some cleanup patches and the SLUB patches from this set.
- Transparent vcompound support through page_address() and virt_to_head_page().
- Additional use cases.
- Factor the code better for an easier read
- Add configurable stack size.
- Follow up on various suggestions made for V1

RFC->V1
- Complete support for all compound functions for virtual compound pages (including the compound_nth_page() necessary for LBS mmap support)
- Fix various bugs
- Fix i386 build

Signature · 5 lines
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>