mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: "Jose R. Santos" <jrsantos@austin.ibm.com>
Cc: akpm@osdl.org, linux-kernel@vger.kernel.org, slpratt@us.ibm.com
Subject: Re: [PATCH] Making i/dhash_entries cmdline work as it use to.
Date: Tue, 13 Jul 2004 13:33:40 +0100	[thread overview]
Message-ID: <4348.1089722020@redhat.com> (raw)
In-Reply-To: <20040713025643.GA7498@austin.ibm.com>


> Actualy, it doesnt look like we need MAX_SYS_HASH_TABLE_ORDER at all so
> I'm resending the patch which now limits the max size of a hash table to
> 1/16 total memory pages.  This would keep people from doing dangerous
> things when using the hash_entries.

That's an enormous limit. Consider the fact that you will have a multiplicity
of such hash tables, each potentially eating 1/16th of your total memory
(remember, the bootmem allocator's only real limit is how big a chunk of
memory it can allocate in one go).

Do you have numbers to show that committing an eighth of your memory (8GB if
you have 64GB - two hash tables at 4GB apiece) to hash tables is almost
certainly not worth it.

For instance, the dcache:

	(*) Assuming 64GB of memory, of which 1/16th allocated to the dcache
	    hash table and 1/16th allocated to the inode hash table.

	(*) dcache hash buckets are 16 bytes apiece on PPC64.

	(*) 4GB hash table gives you 256 Meg hash buckets.

		(gdb) p ((4ULL<<30)/16) / 1024 / 1024
		$1 = 256

	(*) The dentry struct on PPC64 is approx 256 bytes in size.

	(*) The remaining 56GB could provide 224 Meg dentries if allocated to
	    nothing else.

		(gdb) p (56ULL<<30) / 256 / 1024 / 1024
		$2 = 224

	(*) So you'd end up with more buckets in the hash table than you could
	    possibly allocate dentry structures.

David

  parent reply	other threads:[~2004-07-13 12:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-12 17:56 Jose R. Santos
2004-07-13  2:37 ` Jose R. Santos
2004-07-13  2:56   ` Jose R. Santos
2004-07-13  6:25   ` Dave Hansen
2004-07-13 12:59     ` Jose R. Santos
2004-07-13 12:33   ` David Howells [this message]
2004-07-13 12:54     ` Jose R. Santos
2004-07-13 10:29 ` David Howells
2004-07-13 13:17   ` Jose R. Santos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4348.1089722020@redhat.com \
    --to=dhowells@redhat.com \
    --cc=akpm@osdl.org \
    --cc=jrsantos@austin.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=slpratt@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®