login
Header Space

 
 

Re: [13/14] vcompound: Use vcompound for swap_map

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Christoph Lameter <clameter@...>
Cc: <linux-mm@...>, <linux-kernel@...>
Date: Friday, March 21, 2008 - 5:25 pm

Christoph Lameter <clameter@sgi.com> writes:


Have you considered the potential memory wastage from rounding up
to the next page order now? (similar in all the other patches
to change vmalloc). e.g. if the old size was 64k + 1 byte it will
suddenly get 128k now. That is actually not a uncommon situation
in my experience; there are often power of two buffers with 
some small headers.

A long time ago (in 2.4-aa) I did something similar for module loading
as an experiment to avoid too many TLB misses. The module loader
would first try to get a continuous range in the direct mapping and 
only then fall back to vmalloc.

But I used a simple trick to avoid the waste problem: it allocated a
continuous range rounded up to the next page-size order and then freed
the excess pages back into the page allocator. That was called
alloc_exact(). If you replace vmalloc with alloc_pages you should
use something like that too I think.

-Andi

--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[13/14] vcompound: Use vcompound for swap_map, Christoph Lameter, (Fri Mar 21, 2:17 am)
Re: [13/14] vcompound: Use vcompound for swap_map, Andi Kleen, (Fri Mar 21, 5:25 pm)
Re: [13/14] vcompound: Use vcompound for swap_map, Christoph Lameter, (Mon Mar 24, 3:54 pm)
Re: [13/14] vcompound: Use vcompound for swap_map, Andi Kleen, (Tue Mar 25, 3:52 am)
Re: [13/14] vcompound: Use vcompound for swap_map, Christoph Lameter, (Tue Mar 25, 1:45 pm)
Re: [13/14] vcompound: Use vcompound for swap_map, Andi Kleen, (Tue Mar 25, 1:55 pm)
Re: [13/14] vcompound: Use vcompound for swap_map, Christoph Lameter, (Tue Mar 25, 1:51 pm)
Re: [13/14] vcompound: Use vcompound for swap_map, Christoph Lameter, (Fri Mar 21, 5:33 pm)
speck-geostationary