public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Randy Dunlap <rdunlap@xenotime.net>
To: "H.J. Lu" <hjl.tools@gmail.com>
Cc: "H. Peter Anvin" <hpa@zytor.com>,
	Andi Kleen <andi@firstfloor.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: PATCH] Use -mpreferred-stack-boundary=3 on x86-64 if supported
Date: Sat, 23 Jun 2012 15:57:44 -0700	[thread overview]
Message-ID: <4FE649E8.5090103@xenotime.net> (raw)
In-Reply-To: <CAMe9rOrH6_0mDzCnfTtydEVCn11A9wqn7MD0xHz9dOhPw1WZ1w@mail.gmail.com>

On 06/23/2012 09:49 AM, H.J. Lu wrote:

> On Sat, Jun 23, 2012 at 9:17 AM, H. Peter Anvin <hpa@zytor.com> wrote:
>> To keep gcc from paddong the stack to maintain a nonexistent alignment.
>>
>> Andi Kleen <andi@firstfloor.org> wrote:
>>
>>>> This patch uses -mpreferred-stack-boundary=3 on x86-64 if it is
>>> supported.
>>>> I have been running 3.4 kernel compiled with this option for weeks.
>>>
>>> But why?
>>>
>>> All the SSE code in the kernel should adjust manually. And the other
>>> code doesn't need it.
>>>
>>> Besides the entry points do not guarantee alignment.
>>>
>>> For the kernel it would be probably more useful to have a attribute
>>> per function that forces alignment.
> 
> There was an attempt from you to do it in 2007:
> 
> http://lkml.indiana.edu/hypermail/linux/kernel/0708.2/2604.html
> http://gcc.gnu.org/ml/gcc-patches/2007-07/msg01697.html
> 
> But the gcc patch was never checked in.
> 
> 


Some (most) of this explanation needs to be in the patch description.


-- 
~Randy

  reply	other threads:[~2012-06-23 22:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-23 16:06 PATCH] Use -mpreferred-stack-boundary=3 on x86-64 if supported H.J. Lu
2012-06-23 16:13 ` Andi Kleen
2012-06-23 16:17   ` H. Peter Anvin
2012-06-23 16:49     ` H.J. Lu
2012-06-23 22:57       ` Randy Dunlap [this message]
2012-06-23 19:27     ` Andi Kleen
2012-06-23 19:45       ` H. Peter Anvin
2012-06-24  3:13 ` [tip:x86/build] x86-64, gcc: Use -mpreferred-stack-boundary= 3 " tip-bot for H.J. Lu

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=4FE649E8.5090103@xenotime.net \
    --to=rdunlap@xenotime.net \
    --cc=andi@firstfloor.org \
    --cc=hjl.tools@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.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