Re: [PATCH -mm] add a kmem_cache for nsproxy objects

2007-06-22 Thread Christoph Lameter
On Fri, 22 Jun 2007, Cedric Le Goater wrote: > the macro sets the align parameter to "__alignof__(struct)" by default. > is that something we want to do all the time ? if so, why not change > kmem_cache_create() directly ? Its a safety net. If there is some reason that the structure needs a la

Re: [PATCH -mm] add a kmem_cache for nsproxy objects

2007-06-22 Thread Cedric Le Goater
Christoph Lameter wrote: > On Tue, 19 Jun 2007, Andrew Morton wrote: > >> On Mon, 18 Jun 2007 22:53:13 +0200 >> Cedric Le Goater <[EMAIL PROTECTED]> wrote: >> >>> +static int __init nsproxy_cache_init(void) >>> +{ >>> + nsproxy_cachep = kmem_cache_create("nsproxy", sizeof(struct nsproxy), >>> +

Re: [PATCH -mm] add a kmem_cache for nsproxy objects

2007-06-19 Thread Pekka Enberg
Hi Christoph x 2, On Tue, 19 Jun 2007, Christoph Hellwig wrote: > Hmm, I must have missed the macro going in. Frankly speaking I plain hate > it. It's a rather useless obsfucation. I hate the name, but the macro is far from useless. On 6/19/07, Christoph Lameter <[EMAIL PROTECTED]> wrote:

Re: [PATCH -mm] add a kmem_cache for nsproxy objects

2007-06-19 Thread Christoph Lameter
On Tue, 19 Jun 2007, Andrew Morton wrote: > On Mon, 18 Jun 2007 22:53:13 +0200 > Cedric Le Goater <[EMAIL PROTECTED]> wrote: > > > +static int __init nsproxy_cache_init(void) > > +{ > > + nsproxy_cachep = kmem_cache_create("nsproxy", sizeof(struct nsproxy), > > +

Re: [PATCH -mm] add a kmem_cache for nsproxy objects

2007-06-19 Thread Christoph Lameter
On Tue, 19 Jun 2007, Christoph Hellwig wrote: > Hmm, I must have missed the macro going in. Frankly speaking I plain hate > it. It's a rather useless obsfucation. It makes the code easier to review and reduces errors by establishing a standard way of defining a slab with minimal effort. You ca

Re: [PATCH -mm] add a kmem_cache for nsproxy objects

2007-06-19 Thread Christoph Hellwig
On Tue, Jun 19, 2007 at 11:35:01AM -0700, Andrew Morton wrote: > On Mon, 18 Jun 2007 22:53:13 +0200 > Cedric Le Goater <[EMAIL PROTECTED]> wrote: > > > +static int __init nsproxy_cache_init(void) > > +{ > > + nsproxy_cachep = kmem_cache_create("nsproxy", sizeof(struct nsproxy), > > +

Re: [PATCH -mm] add a kmem_cache for nsproxy objects

2007-06-19 Thread Andrew Morton
On Mon, 18 Jun 2007 22:53:13 +0200 Cedric Le Goater <[EMAIL PROTECTED]> wrote: > +static int __init nsproxy_cache_init(void) > +{ > + nsproxy_cachep = kmem_cache_create("nsproxy", sizeof(struct nsproxy), > +0, SLAB_PANIC, NULL, NULL); > + return 0; >

[PATCH -mm] add a kmem_cache for nsproxy objects

2007-06-18 Thread Cedric Le Goater
It should improve performance in some scenarii where a lot of these nsproxy objects are created by unsharing namespaces. This is a typical use of virtual servers that are being created or entered. This is also a good tool to find leaks and gather statistics on namespace usage. Signed-off-by: Ced