[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <503C6B5D.9030100@linux.vnet.ibm.com>
Date: Tue, 28 Aug 2012 12:25:25 +0530
From: "Naveen N. Rao" <naveen.n.rao@...ux.vnet.ibm.com>
To: Borislav Petkov <bp@...64.org>
CC: Andi Kleen <andi@...stfloor.org>, tony.luck@...el.com,
gong.chen@...ux.intel.com, ananth@...ibm.com,
masbock@...ux.vnet.ibm.com, x86@...nel.org,
linux-kernel@...r.kernel.org, lcm@...ibm.com, mingo@...hat.com,
tglx@...utronix.de, linux-edac@...r.kernel.org
Subject: Re: [PATCH 1/2] x86/mce: Pack boolean MCE boot flags into a structure
On 08/27/2012 07:48 PM, Borislav Petkov wrote:
> On Mon, Aug 27, 2012 at 03:58:59PM +0200, Andi Kleen wrote:
>> On Mon, Aug 27, 2012 at 04:55:03PM +0530, Naveen N. Rao wrote:
>>> Many MCE boot flags are boolean in nature, but are declared as integers
>>> currently. We can pack these into a bitfield to save some space.
>>
>> Note that this doesn't necessarily save anything because it needs more
>> code to access, and accesses are more common than the flag
>>
>> cmpl $0,foo(%rip) 7 bytes
>> testl $1,foo(%rip) 10 bytes
>
> I got 7 bytes:
>
> 12e9: f6 05 00 00 00 00 02 testb $0x2,0x0(%rip) # 12f0 <mce_start_timer.isra.18+0x30>
>
> vs the old:
>
> 1654: 83 3d 00 00 00 00 00 cmpl $0x0,0x0(%rip) # 165b <mce_start_timer.clone.15+0x37>
>
> also 7 bytes.
>
I'm seeing the same here. GCC v4.7 with -O2 generates testb and cmpb,
which are both 7 bytes long.
Thanks,
Naveen
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists