lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 22 Sep 2008 07:52:56 -0700
From:	Dave Hansen <dave@...ux.vnet.ibm.com>
To:	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Cc:	"linux-mm@...ck.org" <linux-mm@...ck.org>,
	"balbir@...ux.vnet.ibm.com" <balbir@...ux.vnet.ibm.com>,
	"nishimura@....nes.nec.co.jp" <nishimura@....nes.nec.co.jp>,
	"xemul@...nvz.org" <xemul@...nvz.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 9/13] memcg: lookup page cgroup (and remove pointer
	from struct page)

On Mon, 2008-09-22 at 20:12 +0900, KAMEZAWA Hiroyuki wrote:
> +       /* we don't need too large hash */
> +       default_pcg_hash_size = (max_pfn/ENTS_PER_CHUNK);
> +       default_pcg_hash_size *= 2;
> +       /* if too big, use automatic calclation */
> +       if (default_pcg_hash_size > 1024 * 1024)
> +               default_pcg_hash_size = 0;
> +
> +       pcg_hashtable = alloc_large_system_hash("PageCgroup Hash",
> +                               sizeof(struct pcg_hash_head),
> +                               default_pcg_hash_size,
> +                               13,
> +                               0,
> +                               &pcg_hashshift,
> +                               &pcg_hashmask,
> +                               0);

The one thing I don't see here is much explanation about how large this
structure will get.

Basing it on max_pfn makes me nervous because of what it will do on
machines with very sparse memory.  Is this like sparsemem where the
structure can be small enough to actually span all of physical memory,
or will it be a large memory user?

Can you lay out how much memory this will use on a machine like Dave
Miller's which has 1GB of memory at 0x0 and 1GB of memory at 1TB up in
the address space?

Also, how large do the hash buckets get in the average case?

-- Dave

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ