Re: [RFC][PATCH] Manage jbd allocations from its own slabs

Badari Pulavarty <[email protected]> Thu, 24 Aug 2006 12:11:25 -0700
Newsgroups gmane.comp.file-systems.ext2.devel,gmane.linux.kernel
Message-ID <[email protected]>
Christoph Hellwig wrote:
> On Wed, Aug 23, 2006 at 04:08:15PM -0700, Badari Pulavarty wrote:
>   
>> Hi,
>>
>> Here is the fix to "bh: Ensure bh fits within a page" problem
>> caused by JBD.
>>
>> BTW, I realized that this problem can happen only with 1k, 2k
>> filesystems - as 4k, 8k allocations disable slab debug 
>> automatically. But for completeness, I created slabs for those
>> also.
>>
>> What do you think ? I ran basic tests and things are fine.
>>     
>
> Why can't you just use alloc_page?  I bet the whole slab overhead
> eats more memory than what's wasted when using alloc_pages.  Especially
> as the typical usecase is a 4k blocks filesystem with 4k pagesize
> where the overhead of alloc_page is non-existant.
>   

Yes. That was what proposed earlier. But for 1k, 2k allocations we end 
up wasting whole page.
Isn't it ? Thats why I created right sized slabs and disable slab-debug. 
I guess, I can do this
only for 1k, 2k filesystems and directly use alloc_page() for 4k and 8k 
- but that would make
code ugly and also it doesn't handle cases for bigger base pagesize 
systems (64k power).

Thanks,
Badari



-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642