Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1950282AbdD3VW7 (ORCPT ); Sun, 30 Apr 2017 17:22:59 -0400 Received: from resqmta-ch2-05v.sys.comcast.net ([69.252.207.37]:51246 "EHLO resqmta-ch2-05v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1424322AbdD3VWv (ORCPT ); Sun, 30 Apr 2017 17:22:51 -0400 Date: Sun, 30 Apr 2017 16:22:47 -0500 (CDT) From: Christoph Lameter X-X-Sender: cl@east.gentwo.org To: Wei Yang cc: penberg@kernel.org, rientjes@google.com, iamjoonsoo.kim@lge.com, akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/3] try to save some memory for kmem_cache in some cases In-Reply-To: <20170430113152.6590-1-richard.weiyang@gmail.com> Message-ID: References: <20170430113152.6590-1-richard.weiyang@gmail.com> Content-Type: text/plain; charset=US-ASCII X-CMAE-Envelope: MS4wfA93A44XfAxOEwBoD++4xvXkgi3m4R6Iz8QpJ8jOAn0wE3RtGyl6aa2EsXSyFF75oKRYBFb4zBYxWVJvVuIJNj3KJG9FCPdJiviM68mEr6BVoFZP+46d tc5oyIdQRhvnaSgmDyPQOD0N2hT9x1teiewwx8+gA8H6ch5wCaeZBnTz4Ks19oFwfDHWSDgQ6pId1CJ1gm1oJy1uBQjyaftEgX3FYD7AsjA1CafMTwsai85l pMDmz+O0U7RZ+GIblxXocaVC7mxCsNQ4qgClrk6FBR+rJBVAWcjkHHeV0yQ56STeLXqsWQiHtXv37NIjHENNYZFegbdhO21FoWjnqQ59/1EiVN8M5ZKz1zPN 54wvXG3YojhwW/vKYkYOk9CDDQiEtg== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 531 Lines: 12 On Sun, 30 Apr 2017, Wei Yang wrote: > 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. This looks fine. But do we really want to add that amount of ifdeffery? How much memory does this save?