[00/17] Virtual Compound Page Support V1

Previous thread: [patch 4/4] ext4: fix rec_len overflow for 64KB block size by Christoph Lameter on Tuesday, September 25, 2007 - 7:30 pm. (1 message)

Next thread: [02/17] vmalloc: add const by Christoph Lameter on Tuesday, September 25, 2007 - 7:42 pm. (1 message)
To: <unlisted-recipients@...>, <@...>
Cc: <linux-fsdevel@...>, <linux-kernel@...>
Date: Tuesday, September 25, 2007 - 7:42 pm

RFC->V1
- 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

Currently there is a strong tendency to avoid larger page allocations in
the kernel because of past fragmentation issues and the current
defragmentation methods are still evolving. It is not clear to what extend
they can provide reliable allocations for higher order pages (plus the
definition of "reliable" seems to be in the eye of the beholder).

We use vmalloc allocations in many locations to provide a safe
way to allocate larger arrays. That is due to the danger of higher order
allocations failing. Virtual Compound pages allow the use of regular
page allocator allocations that will fall back only if there is an actual
problem with acquiring a higher order page.

This patch set provides a way for a higher page allocation to fall back.
Instead of a physically contiguous page a virtually contiguous page
is provided. The functionality of the vmalloc layer is used to provide
the necessary page tables and control structures to establish a virtually
contiguous area.

Advantages:

- If higher order allocations are failing then virtual compound pages
consisting of a series of order-0 pages can stand in for those
allocations.

- Reliability as long as the vmalloc layer can provide virtual mappings.

- Ability to reduce the use of vmalloc layer significantly by using
physically contiguous memory instead of virtual contiguous memory.
Most uses of vmalloc() can be converted to page allocator calls.

- The use of physically contiguous memory instead of vmalloc may allow the
use larger TLB entries thus reducing TLB pressure. Also reduces the need
for page table walks.

Disadvantages:

- In order to use fall back the logic accessing the memory must be
aware that the memory could be backed by a virtual mapping and take
precautions. virt_to_page() and page_address() may not work and
vmall...

Previous thread: [patch 4/4] ext4: fix rec_len overflow for 64KB block size by Christoph Lameter on Tuesday, September 25, 2007 - 7:30 pm. (1 message)

Next thread: [02/17] vmalloc: add const by Christoph Lameter on Tuesday, September 25, 2007 - 7:42 pm. (1 message)