linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [00/18] Virtual Compound Page Support V2
@ 2007-10-04  3:59 Christoph Lameter
  2007-10-04  3:59 ` [01/18] vmalloc: clean up page array indexing Christoph Lameter
                   ` (17 more replies)
  0 siblings, 18 replies; 44+ messages in thread
From: Christoph Lameter @ 2007-10-04  3:59 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, linux-kernel

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. If an allocation specifies
GFP_VFALLBACK then the page allocator will first attempt to satisfy
the request with physically contiguous memory. If that is not possible
then the page allocator will create a virtually contiguous memory
area for the caller. That way large allocations may perhaps be
considered "reliable" indepedent of the memory fragmentation situation.

This means that memory with optimal performance is used when available.
We are currently gradually introducing methods to reduce memory
defragmentation. The better these methods become the less the
chances that fallback will occur.

Fallback is rare in particular on machines with contemporary memory
sizes of 1G or more. It seems to take special load situations that
pin a lot of memory and systems with low memory in order to get
system memory so fragmented that the fallback scheme must kick in.

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

The patchset then addresses a series of issues in the current code
through the use of fallbacks:

- Fallback for x86_64 stack allocations. The default stack size
  is 8k which requires an order 1 allocation.

- Removes the manual fallback to vmalloc for sparsemem
  through the use of GFP_VFALLBACK.

- Uses a compound page for the wait table in the zone thereby
  avoiding having to go through a page table to get to the
  data structures used for waiting on events in pages.

- Allows fallback for the order 2 allocation in the crypto
  subsystem.

- Allows fallback for the caller table used by SLUB when determining
  the call sites for slab caches for sysfs output.

- Allows a configurable stack size on x86_64 (up to 32k).

More uses are possible by simply adding GFP_VFALLBACK to the page
flags or by converting vmalloc calls to regular page allocator calls.

It is likely that we have had to avoid the use of larger memory areas
because of the reliability issues. The patch may simplify future coding
of handling large memoryh areas because these issues are taken care of
by the page allocator. For HPC uses we constantly have to deal with
demands for larger and larger memory areas to speed up various loads.

Additional patches exist to enable SLUB and the Large Blocksize Patchset
to use these fallbacks.

The patchset is also available via git from the largeblock git tree via

git pull
  git://git.kernel.org/pub/scm/linux/kernel/git/christoph/largeblocksize.git
    vcompound

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

-- 

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 44+ messages in thread
[parent not found: <20071011075743.GA4654@skynet.ie>]

end of thread, other threads:[~2007-10-17 10:04 UTC | newest]

Thread overview: 44+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-04  3:59 [00/18] Virtual Compound Page Support V2 Christoph Lameter
2007-10-04  3:59 ` [01/18] vmalloc: clean up page array indexing Christoph Lameter
2007-10-04  3:59 ` [02/18] vunmap: return page array passed on vmap() Christoph Lameter
2007-10-04  3:59 ` [03/18] vmalloc_address(): Determine vmalloc address from page struct Christoph Lameter
2007-10-04  3:59 ` [04/18] Vcompound: Smart up virt_to_head_page() Christoph Lameter
2007-10-04  3:59 ` [05/18] Page flags: Add PageVcompound() Christoph Lameter
2007-10-04  3:59 ` [06/18] Vcompound: Update page address determination Christoph Lameter
2007-10-04  3:59 ` [07/18] Vcompound: Add compound_nth_page() to determine nth base page Christoph Lameter
2007-10-04  3:59 ` [08/18] GFP_VFALLBACK: Allow fallback of compound pages to virtual mappings Christoph Lameter
2007-10-04  3:59 ` [09/18] Vcompound: GFP_VFALLBACK debugging aid Christoph Lameter
2007-10-04  3:59 ` [10/18] Sparsemem: Use fallback for the memmap Christoph Lameter
2007-10-04  3:59 ` [11/18] Page allocator: Use a higher order allocation for the zone wait table Christoph Lameter
2007-10-04  3:59 ` [12/18] Wait: Allow bit_waitqueue to wait on a bit in a virtual compound page Christoph Lameter
2007-10-04  3:59 ` [13/18] x86_64: Allow fallback for the stack Christoph Lameter
2007-10-04 11:56   ` Andi Kleen
2007-10-04 12:08     ` Peter Zijlstra
2007-10-04 12:25       ` Andi Kleen
2007-10-04 12:30         ` Peter Zijlstra
2007-10-04 17:40         ` Christoph Lameter
2007-10-04 19:20     ` Christoph Lameter
2007-10-04 19:39       ` Rik van Riel
2007-10-04 21:20         ` Christoph Lameter
2007-10-07  7:35           ` Nick Piggin
2007-10-08 17:36             ` Christoph Lameter
2007-10-08 12:55               ` Nick Piggin
2007-10-09 18:39                 ` Christoph Lameter
2007-10-09  8:46                   ` Nick Piggin
2007-10-10  1:26                     ` Christoph Lameter
2007-10-09  9:56                       ` Nick Piggin
2007-10-10  3:36                         ` where to get ZONE_MOVABLE pathces? Jacky(GuangXiang  Lee)
2007-10-10 10:32                           ` Mel Gorman
2007-10-06 18:53         ` [13/18] x86_64: Allow fallback for the stack Bill Davidsen
2007-10-04  3:59 ` [14/18] Configure stack size Christoph Lameter
2007-10-04  4:36   ` Arjan van de Ven
2007-10-04  4:43     ` David Miller, Arjan van de Ven
2007-10-04 19:34       ` Christoph Lameter
2007-10-04  9:11   ` Andi Kleen
2007-10-04 19:26     ` Christoph Lameter
2007-10-04  3:59 ` [15/18] Fallback for temporary order 2 allocation Christoph Lameter
2007-10-04  3:59 ` [16/18] Virtual Compound page allocation from interrupt context Christoph Lameter
2007-10-04  3:59 ` [17/18] Virtual compound page freeing in " Christoph Lameter
2007-10-04  3:59 ` [18/18] SLUB: Use fallback for table of callers/freers of a slab cache Christoph Lameter
     [not found] <20071011075743.GA4654@skynet.ie>
     [not found] ` <01f601c80be8$39537c70$3708a8c0@arcapub.arca.com>
     [not found]   ` <20071011095622.GB4654@skynet.ie>
     [not found]     ` <040c01c80cab$02e6a4f0$3708a8c0@arcapub.arca.com>
     [not found]       ` <20071012101955.GA27254@skynet.ie>
     [not found]         ` <003601c80ee8$c6487ce0$3708a8c0@arcapub.arca.com>
     [not found]           ` <20071015092426.GA31490@skynet.ie>
     [not found]             ` <016401c80f21$bf0e6c30$3708a8c0@arcapub.arca.com>
     [not found]               ` <20071015130744.GA26741@skynet.ie>
     [not found]                 ` <024a01c80fcd$ff785e50$3708a8c0@arcapub.arca.com>
     [not found]                   ` <20071016125035.GA4294@skynet.ie>
2007-10-17  7:06                     ` where to get ZONE_MOVABLE pathces? Jacky(GuangXiang  Lee)
2007-10-17 10:04                       ` Mel Gorman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).