[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170502144533.10729-1-richard.weiyang@gmail.com>
Date: Tue, 2 May 2017 22:45:30 +0800
From: Wei Yang <richard.weiyang@...il.com>
To: cl@...ux.com, penberg@...nel.org, rientjes@...gle.com,
iamjoonsoo.kim@....com, akpm@...ux-foundation.org,
willy@...radead.org
Cc: linux-mm@...ck.org, linux-kernel@...r.kernel.org,
Wei Yang <richard.weiyang@...il.com>
Subject: [PATCH V2 0/3] try to save some memory for kmem_cache in some cases
kmem_cache is a frequently used data in kernel. During the code reading, I
found maybe we could save some space in some cases.
1. On 64bit arch, type int will occupy a word if it doesn't sit well.
2. cpu_slab->partial is just used when CONFIG_SLUB_CPU_PARTIAL is set
3. cpu_partial is just used when CONFIG_SLUB_CPU_PARTIAL is set, while just
save some space on 32bit arch.
v2:
define some macro to make the code more elegant
Wei Yang (3):
mm/slub: pack red_left_pad with another int to save a word
mm/slub: wrap cpu_slab->partial in CONFIG_SLUB_CPU_PARTIAL
mm/slub: wrap kmem_cache->cpu_partial in config
CONFIG_SLUB_CPU_PARTIAL
include/linux/slub_def.h | 34 ++++++++++++++++++-
mm/slub.c | 85 ++++++++++++++++++++++++++----------------------
2 files changed, 80 insertions(+), 39 deletions(-)
--
2.11.0
Powered by blists - more mailing lists