From: Borislav Petkov <bp@amd64.org>
To: Andi Kleen <andi@firstfloor.org>
Cc: "Naveen N. Rao" <naveen.n.rao@linux.vnet.ibm.com>,
tony.luck@intel.com, bp@amd64.org, gong.chen@linux.intel.com,
ananth@in.ibm.com, masbock@linux.vnet.ibm.com, x86@kernel.org,
linux-kernel@vger.kernel.org, lcm@us.ibm.com, mingo@redhat.com,
tglx@linutronix.de, linux-edac@vger.kernel.org
Subject: Re: [PATCH 1/2] x86/mce: Pack boolean MCE boot flags into a structure
Date: Mon, 27 Aug 2012 16:18:45 +0200 [thread overview]
Message-ID: <20120827141845.GB27979@aftab.osrc.amd.com> (raw)
In-Reply-To: <20120827135859.GY16230@one.firstfloor.org>
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.
--
Regards/Gruss,
Boris.
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
GM: Alberto Bozzo
Reg: Dornach, Landkreis Muenchen
HRB Nr. 43632 WEEE Registernr: 129 19551
next prev parent reply other threads:[~2012-08-27 14:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-27 11:25 [PATCH 1/2] x86/mce: Pack boolean MCE boot flags into a structure Naveen N. Rao
2012-08-27 11:25 ` [PATCH 2/2] x86/mce: Honour bios-set CMCI threshold Naveen N. Rao
2012-08-27 14:48 ` Borislav Petkov
2012-08-27 15:11 ` Naveen N. Rao
2012-08-27 15:21 ` Borislav Petkov
2012-08-27 13:58 ` [PATCH 1/2] x86/mce: Pack boolean MCE boot flags into a structure Andi Kleen
2012-08-27 14:18 ` Borislav Petkov [this message]
2012-08-28 6:55 ` Naveen N. Rao
2012-08-27 14:36 ` Borislav Petkov
2012-08-27 15:35 ` Naveen N. Rao
2012-08-27 15:47 ` Borislav Petkov
2012-08-27 16:01 ` Naveen N. Rao
2012-08-27 16:34 ` Borislav Petkov
2012-08-27 17:14 ` Naveen N. Rao
2012-08-27 20:18 ` Borislav Petkov
2012-08-28 7:17 ` 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=20120827141845.GB27979@aftab.osrc.amd.com \
--to=bp@amd64.org \
--cc=ananth@in.ibm.com \
--cc=andi@firstfloor.org \
--cc=gong.chen@linux.intel.com \
--cc=lcm@us.ibm.com \
--cc=linux-edac@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=masbock@linux.vnet.ibm.com \
--cc=mingo@redhat.com \
--cc=naveen.n.rao@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).