public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>
To: Tony Luck <tony.luck@intel.com>, bp@amd64.org
Cc: andi@firstfloor.org, gong.chen@linux.intel.com,
	ananth@in.ibm.com, x86@kernel.org, linux-kernel@vger.kernel.org,
	mingo@redhat.com, hpa@zytor.com, tglx@linutronix.de,
	gregkh@suse.de, linux-edac@vger.kernel.org
Subject: Re: [PATCH 2/3] x86/mce: Pack boolean MCE flags into a structure
Date: Thu, 06 Sep 2012 12:18:31 +0530	[thread overview]
Message-ID: <5048473F.9070704@linux.vnet.ibm.com> (raw)
In-Reply-To: <CA+8MBb+T6H1jK624qkPPmK8BJ0T1-FcRM+9JPKubq65wKvfueA@mail.gmail.com>

On 09/06/2012 12:26 AM, Tony Luck wrote:
> On Wed, Sep 5, 2012 at 3:22 AM, Naveen N. Rao
> <naveen.n.rao@linux.vnet.ibm.com> wrote:
>> Many MCE flags are boolean in nature, but are declared as integers
>> currently. We can pack these into a bitfield to save some space.
>
> Before this patch:
> size arch/x86/kernel/cpu/mcheck/mce.o
>     text	   data	    bss	    dec	    hex	filename
>    18946	   4930	    776	  24652	   604c	arch/x86/kernel/cpu/mcheck/mce.o
>
> After:
> size arch/x86/kernel/cpu/mcheck/mce.o
>     text	   data	    bss	    dec	    hex	filename
>    19335	   4890	    776	  25001	   61a9	arch/x86/kernel/cpu/mcheck/mce.o
>
> So we do indeed see "data" reduced by 40 bytes. But
> "text" is up by 389.  This seems to be because you have
> another change, not described in the commit log, buried
> in part 2 to add get_dont_log_ce(), set_dont_log_ce() etc.
>
> Compiler version: gcc version 4.4.6 20120305 (Red Hat 4.4.6-4) (GCC)
>
> I know I'm contradicting the feedback you got from Borislav here, but
> is this code churn really worth it to save 40 bytes? I don't think so.

Hmm.. I think I agree. I don't see a good way to get rid of the 
individual getters and setters without adding some more code churn. I 
guess using boolean would be better. Boris?


Thanks,
Naveen


  reply	other threads:[~2012-09-06  6:50 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-05 10:21 [PATCH 0/3] x86:mce: Some cleanups and bios-set CMCI thresholds Naveen N. Rao
2012-09-05 10:21 ` [PATCH 1/3] x86/mce: Make sysfs tunables available globally across all cpus Naveen N. Rao
2012-09-05 10:32   ` [PATCH] [mcelog] Start using the new sysfs tunables location Naveen N. Rao
2012-09-05 18:47     ` Andi Kleen
2012-09-05 19:09       ` Tony Luck
2012-09-06  6:40         ` Naveen N. Rao
2012-09-06 12:28         ` Andi Kleen
2012-09-06 12:34           ` Naveen N. Rao
2012-09-06 12:51             ` Alan Cox
2012-09-06 13:21             ` Andi Kleen
2012-09-05 10:22 ` [PATCH 2/3] x86/mce: Pack boolean MCE flags into a structure Naveen N. Rao
2012-09-05 17:15   ` Joe Perches
2012-09-05 18:56   ` Tony Luck
2012-09-06  6:48     ` Naveen N. Rao [this message]
2012-09-06 12:15       ` Borislav Petkov
2012-09-05 10:22 ` [PATCH 3/3] x86/mce: Honour bios-set CMCI threshold Naveen N. Rao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5048473F.9070704@linux.vnet.ibm.com \
    --to=naveen.n.rao@linux.vnet.ibm.com \
    --cc=ananth@in.ibm.com \
    --cc=andi@firstfloor.org \
    --cc=bp@amd64.org \
    --cc=gong.chen@linux.intel.com \
    --cc=gregkh@suse.de \
    --cc=hpa@zytor.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox