login
Header Space

 
 

Re: [00/17] [RFC] Virtual Compound Page Support

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Christoph Lameter <clameter@...>
Cc: Christoph Hellwig <hch@...>, Mel Gorman <mel@...>, David Chinner <dgc@...>, Jens Axboe <jens.axboe@...>, <linux-fsdevel@...>, <linux-kernel@...>
Date: Wednesday, September 19, 2007 - 3:34 am

Hi Christoph,

On 19 Sep 2007, at 04:36, Christoph Lameter wrote:

I like this a lot.  It will get rid of all the silly games we have to  
play when needing both large allocations and efficient allocations  
where possible.  In NTFS I can then just allocated higher order pages  
instead of having to mess about with the allocation size and  
allocating a single page if the requested size is <= PAGE_SIZE or  
using vmalloc() if the size is bigger.  And it will make it faster  
because a lot of the time a higher order page allocation will succeed  
with your patchset without resorting to vmalloc() so that will be a  
lot faster.

So where I currently have fs/ntfs/malloc.h the below mess I could get  
rid of it completely and just use the normal page allocator/ 
deallocator instead...

static inline void *__ntfs_malloc(unsigned long size, gfp_t gfp_mask)
{
         if (likely(size <= PAGE_SIZE)) {
                 BUG_ON(!size);
                 /* kmalloc() has per-CPU caches so is faster for  
now. */
                 return kmalloc(PAGE_SIZE, gfp_mask & ~__GFP_HIGHMEM);
                 /* return (void *)__get_free_page(gfp_mask); */
         }
         if (likely(size >> PAGE_SHIFT < num_physpages))
                 return __vmalloc(size, gfp_mask, PAGE_KERNEL);
         return NULL;
}

And other places in the kernel can make use of the same.  I think XFS  
does very similar things to NTFS in terms of larger allocations at  
least and there are probably more places I don't know about off the  
top of my head...

I am looking forward to your patchset going into mainline.  (-:

Best regards,

	Anton


Best regards,

	Anton
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer, http://www.linux-ntfs.org/


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

Messages in current thread:
[00/17] [RFC] Virtual Compound Page Support, Christoph Lameter, (Tue Sep 18, 11:36 pm)
Re: [00/17] [RFC] Virtual Compound Page Support, Andi Kleen, (Wed Sep 19, 4:24 am)
Re: [00/17] [RFC] Virtual Compound Page Support, Christoph Lameter, (Wed Sep 19, 1:36 pm)
Re: [00/17] [RFC] Virtual Compound Page Support, Anton Altaparmakov, (Wed Sep 19, 3:34 am)
Re: [00/17] [RFC] Virtual Compound Page Support, Eric Dumazet, (Wed Sep 19, 4:34 am)
Re: [00/17] [RFC] Virtual Compound Page Support, Christoph Lameter, (Wed Sep 19, 1:33 pm)
speck-geostationary