From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752331AbbFKJbs (ORCPT ); Thu, 11 Jun 2015 05:31:48 -0400 Received: from mail-lb0-f178.google.com ([209.85.217.178]:35627 "EHLO mail-lb0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750790AbbFKJbn (ORCPT ); Thu, 11 Jun 2015 05:31:43 -0400 From: Rasmus Villemoes To: Ingo Molnar Cc: "Rafael J. Wysocki" , "Paul E. McKenney" , linux-kernel@vger.kernel.org Subject: Re: [PATCH 0/5] kernel/cpu.c: eliminate some indirection Organization: D03 References: <1430952775-4266-1-git-send-email-linux@rasmusvillemoes.dk> X-Hashcash: 1:20:150611:paulmck@linux.vnet.ibm.com::wIQ0bRp35FZlxUYp:000000000000000000000000000000000003Lbo X-Hashcash: 1:20:150611:rafael.j.wysocki@intel.com::kDD6FOrMeFF54uDb:00000000000000000000000000000000000409i X-Hashcash: 1:20:150611:linux-kernel@vger.kernel.org::zyJodAkPZwwZYZfV:0000000000000000000000000000000004Yw1 X-Hashcash: 1:20:150611:mingo@kernel.org::5Qnqt8iZyfliccI/:0EVPT Date: Thu, 11 Jun 2015 11:31:41 +0200 In-Reply-To: <1430952775-4266-1-git-send-email-linux@rasmusvillemoes.dk> (Rasmus Villemoes's message of "Thu, 7 May 2015 00:52:49 +0200") Message-ID: <87ioauegle.fsf@rasmusvillemoes.dk> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 07 2015, Rasmus Villemoes wrote: > The four cpumasks cpu_{possible,online,present,active}_bits are > exposed readonly via the corresponding const variables > cpu_xyz_mask. But they are also accessible for arbitrary writing via > the exposed functions set_cpu_xyz. There's quite a bit of code > throughout the kernel which iterates over or otherwise accesses these > bitmaps, and having the access go via the cpu_xyz_mask variables is > simply a useless indirection. > > The first four patches eliminate the cpu_xyz_mask variables by simply > exposing the actual bitmaps, after renaming them to discourage direct > access - that still happens through cpu_xyz_mask, which are now simply > macros with the same type and value as they used to have. > > After that, there's no longer any reason to have the setter functions > be out-of-line: The boolean parameter is almost always a literal true > or false, so by making them static inlines they will usually compile > to one or two instructions. > > Altogether, bloat-o-meter reports a saving of ~2600 bytes. ping...