All of lore.kernel.org
 help / color / mirror / Atom feed
From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: Pavel Emelyanov <xemul@openvz.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Hugh Dickins <hugh@veritas.com>,
	Sudhir Kumar <skumar@linux.vnet.ibm.com>,
	YAMAMOTO Takashi <yamamoto@valinux.co.jp>,
	Paul Menage <menage@google.com>,
	lizf@cn.fujitsu.com, linux-kernel@vger.kernel.org,
	taka@valinux.co.jp, linux-mm@kvack.org,
	David Rientjes <rientjes@google.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: Re: [PATCH] Move memory controller allocations to their own slabs (v2)
Date: Tue, 11 Mar 2008 16:39:25 +0530	[thread overview]
Message-ID: <47D66865.1080508@linux.vnet.ibm.com> (raw)
In-Reply-To: <47D6443D.9000904@openvz.org>

Pavel Emelyanov wrote:
> Balbir Singh wrote:
>> Pavel Emelyanov wrote:
>>> Balbir Singh wrote:
>>>> Move the memory controller data structure page_cgroup to its own slab cache.
>>>> It saves space on the system, allocations are not necessarily pushed to order
>>>> of 2 and should provide performance benefits. Users who disable the memory
>>>> controller can also double check that the memory controller is not allocating
>>>> page_cgroup's.
>>> Can you, please, check how many objects-per-page we have with and 
>>> without this patch for SLAB and SLUB?
>>>
>>> Thanks.
>> I can for objects-per-page with this patch for SLUB and SLAB. I am not sure
>> about what to check for without this patch. The machine is temporarily busy,
> 
> Well, the objects-per-page without the patch is objects-per-page for
> according kmalloc cache :)
> 

OK, so here is the data

On my 64 bit powerpc system (structure size could be different on other systems)

1. sizeof page_cgroup is 40 bytes
   which means kmalloc will allocate 64 bytes
2. With 4K pagesize SLAB with HWCACHE_ALIGN, 59 objects are packed per slab
3. With SLUB the value is 102 per slab



-- 
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL

WARNING: multiple messages have this Message-ID (diff)
From: Balbir Singh <balbir@linux.vnet.ibm.com>
To: Pavel Emelyanov <xemul@openvz.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Hugh Dickins <hugh@veritas.com>,
	Sudhir Kumar <skumar@linux.vnet.ibm.com>,
	YAMAMOTO Takashi <yamamoto@valinux.co.jp>,
	Paul Menage <menage@google.com>,
	lizf@cn.fujitsu.com, linux-kernel@vger.kernel.org,
	taka@valinux.co.jp, linux-mm@kvack.org,
	David Rientjes <rientjes@google.com>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: Re: [PATCH] Move memory controller allocations to their own slabs (v2)
Date: Tue, 11 Mar 2008 16:39:25 +0530	[thread overview]
Message-ID: <47D66865.1080508@linux.vnet.ibm.com> (raw)
In-Reply-To: <47D6443D.9000904@openvz.org>

Pavel Emelyanov wrote:
> Balbir Singh wrote:
>> Pavel Emelyanov wrote:
>>> Balbir Singh wrote:
>>>> Move the memory controller data structure page_cgroup to its own slab cache.
>>>> It saves space on the system, allocations are not necessarily pushed to order
>>>> of 2 and should provide performance benefits. Users who disable the memory
>>>> controller can also double check that the memory controller is not allocating
>>>> page_cgroup's.
>>> Can you, please, check how many objects-per-page we have with and 
>>> without this patch for SLAB and SLUB?
>>>
>>> Thanks.
>> I can for objects-per-page with this patch for SLUB and SLAB. I am not sure
>> about what to check for without this patch. The machine is temporarily busy,
> 
> Well, the objects-per-page without the patch is objects-per-page for
> according kmalloc cache :)
> 

OK, so here is the data

On my 64 bit powerpc system (structure size could be different on other systems)

1. sizeof page_cgroup is 40 bytes
   which means kmalloc will allocate 64 bytes
2. With 4K pagesize SLAB with HWCACHE_ALIGN, 59 objects are packed per slab
3. With SLUB the value is 102 per slab



-- 
	Warm Regards,
	Balbir Singh
	Linux Technology Center
	IBM, ISTL

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2008-03-11 11:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-11  6:18 [PATCH] Move memory controller allocations to their own slabs (v2) Balbir Singh
2008-03-11  6:18 ` Balbir Singh
2008-03-11  8:11 ` Pavel Emelyanov
2008-03-11  8:11   ` Pavel Emelyanov
2008-03-11  8:15   ` Balbir Singh
2008-03-11  8:15     ` Balbir Singh
2008-03-11  8:35     ` Pavel Emelyanov
2008-03-11  8:35       ` Pavel Emelyanov
2008-03-11 11:09       ` Balbir Singh [this message]
2008-03-11 11:09         ` Balbir Singh
2008-03-11 13:05         ` Hugh Dickins
2008-03-11 13:05           ` Hugh Dickins
2008-03-12  3:38           ` Nick Piggin
2008-03-12  3:38             ` Nick Piggin
2008-03-12  3:48           ` Balbir Singh
2008-03-12  3:48             ` Balbir Singh
2008-03-11 12:55 ` Hugh Dickins
2008-03-11 12:55   ` Hugh Dickins
2008-03-11 18:47   ` Balbir Singh
2008-03-11 18:47     ` Balbir Singh

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=47D66865.1080508@linux.vnet.ibm.com \
    --to=balbir@linux.vnet.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=hugh@veritas.com \
    --cc=kamezawa.hiroyu@jp.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lizf@cn.fujitsu.com \
    --cc=menage@google.com \
    --cc=rientjes@google.com \
    --cc=skumar@linux.vnet.ibm.com \
    --cc=taka@valinux.co.jp \
    --cc=xemul@openvz.org \
    --cc=yamamoto@valinux.co.jp \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.