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:	Tue, 2 Oct 2007 11:29:51 -0700 (PDT)
From:	Christoph Lameter <clameter@....com>
To:	Yasunori Goto <y-goto@...fujitsu.com>
cc:	Andrew Morton <akpm@...l.org>,
	Linux Kernel ML <linux-kernel@...r.kernel.org>,
	linux-mm <linux-mm@...ck.org>
Subject: Re: [Patch / 002](memory hotplug) Callback function to create
 kmem_cache_node.

On Tue, 2 Oct 2007, Yasunori Goto wrote:

> Do you mean that just nr_slabs should be checked like followings?
> I'm not sure this is enough.
> 
>     :
> if (s->node[nid]) {
> 	n = get_node(s, nid);
> 	if (!atomic_read(&n->nr_slabs)) {
> 		s->node[nid] = NULL;
> 		kmem_cache_free(kmalloc_caches, n);
> 	}
> }
>     :
>     :

That would work. But it would be better to shrink the cache first. The 
first 2 slabs on a node may be empty and the shrinking will remove those. 
If you do not shrink then the code may falsely assume that there are 
objects on the node.
-
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