[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0803111256110.18261@blonde.site>
Date: Tue, 11 Mar 2008 13:05:44 +0000 (GMT)
From: Hugh Dickins <hugh@...itas.com>
To: Balbir Singh <balbir@...ux.vnet.ibm.com>
cc: Pavel Emelyanov <xemul@...nvz.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Sudhir Kumar <skumar@...ux.vnet.ibm.com>,
YAMAMOTO Takashi <yamamoto@...inux.co.jp>,
Paul Menage <menage@...gle.com>, lizf@...fujitsu.com,
linux-kernel@...r.kernel.org, taka@...inux.co.jp,
linux-mm@...ck.org, David Rientjes <rientjes@...gle.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>
Subject: Re: [PATCH] Move memory controller allocations to their own slabs
(v2)
On Tue, 11 Mar 2008, Balbir Singh wrote:
>
> 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
I expect you got those numbers with 2.6.25-rc4? Towards the end of -rc5
there's a patch from Nick to make SLUB's treatment of HWCACHE_ALIGN the
same as SLAB's, so I expect you'd be back to a similar poor density with
SLUB too. (But I'm replying without actually testing it out myself.)
I think you'd need a strong reason to choose HWCACHE_ALIGN for these.
Consider: the (normal configuration) x86_64 struct page size was 56
bytes for a long time (and still is without MEM_RES_CTLR), but we've
never inserted padding to make that a round 64 bytes (and they would
benefit additionally from some simpler arithmetic, not the case with
page_cgroups). Though it's good to avoid unnecessary sharing and
multiple cacheline accesses, it's not so good as to justify almost
doubling the size of a very very common structure. I think.
Hugh
--
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