Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S940205AbdD3LcJ (ORCPT ); Sun, 30 Apr 2017 07:32:09 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:33507 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932494AbdD3LcA (ORCPT ); Sun, 30 Apr 2017 07:32:00 -0400 From: Wei Yang To: cl@linux.com, penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, Wei Yang Subject: [PATCH 0/3] try to save some memory for kmem_cache in some cases Date: Sun, 30 Apr 2017 19:31:49 +0800 Message-Id: <20170430113152.6590-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 771 Lines: 20 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. 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 | 6 +++- mm/slub.c | 88 ++++++++++++++++++++++++++++++++---------------- 2 files changed, 64 insertions(+), 30 deletions(-) -- 2.11.0