lkml.org 
[lkml]   [2004]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] Permit inode & dentry hash tables to be allocated > MAX_ORDER size
Date

> > Here's a patch to allocate memory for big system hash tables with the bootmem
> > allocator rather than with main page allocator.
>
> umm, why?

Three reasons:

(1) So that the size can be bigger than MAX_ORDER. IBM have done some testing
on their big PPC64 systems (64GB of RAM) with linux-2.4 and found that
they get better performance if the sizes of the inode cache hash, dentry
cache hash, buffer head hash and page cache hash are increased beyond
MAX_ORDER (order 11).

Now the main allocator can't allocate anything larger than MAX_ORDER, but
the bootmem allocator can.

In 2.6 it appears that only the inode and dentry hashes remain of those
four, but there are other hash tables that could use this service.

(2) Changing MAX_ORDER appears to have a number of effects beyond just
limiting the maximum size that can be allocated in one go.

(3) Should someone want a hash table in which each bucket isn't a power of two
in size, memory will be wasted as the chunk of memory allocated will be a
power of two in size (to hold a power of two number of buckets).

On the other hand, using the bootmem allocator means the allocation will
only take up sufficient pages to hold it, rather than the next power of
two up.

Admittedly, this point doesn't apply to the dentry and inode hashes, but
it might to another hash table that might want to use this service.

David
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:03    [W:0.059 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site