From: Jessica Yu <jeyu@kernel.org>
To: Johan Hovold <johan@kernel.org>
Cc: linux-kernel@vger.kernel.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Rob Herring <robh+dt@kernel.org>,
Frank Rowand <frowand.list@gmail.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Arnd Bergmann <arnd@arndb.de>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
David Miller <davem@davemloft.net>,
Jakub Jelinek <jakub@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Steven Rostedt <rostedt@goodmis.org>,
Daniel Kurtz <djkurtz@chromium.org>,
linux-arch@vger.kernel.org, linux-m68k@lists.linux-m68k.org
Subject: Re: [PATCH 0/8] linker-section array fix and clean ups
Date: Wed, 25 Nov 2020 15:51:20 +0100 [thread overview]
Message-ID: <20201125145118.GA32446@linux-8ccs> (raw)
In-Reply-To: <X7uRZUY+2L9Yg9wt@localhost>
+++ Johan Hovold [23/11/20 11:39 +0100]:
>On Fri, Nov 13, 2020 at 03:18:36PM +0100, Johan Hovold wrote:
>> On Wed, Nov 11, 2020 at 04:47:16PM +0100, Jessica Yu wrote:
>>
>> > Thanks for providing the links and references. Your explanation and
>> > this reply from Jakub [1] clarified things for me. I was not aware of
>> > the distinction gcc made between aligned attributes on types vs. on
>> > variables. So from what I understand now, gcc suppresses the
>> > optimization when the alignment is specified in the variable
>> > declaration, but not necessarily when the aligned attribute is just on
>> > the type.
>> >
>> > Even though it's been in use for a long time, I think it would be
>> > really helpful if this gcc quirk was explained just a bit more in the
>> > patch changelogs, especially since this is undocumented behavior.
>> > I found the explanation in [1] (as well as in your cover letter) to be
>> > sufficient. Maybe something like "GCC suppresses any optimizations
>> > increasing alignment when the alignment is specified in the variable
>> > declaration, as opposed to just on the type definition. Therefore,
>> > explicitly specify type alignment when declaring entries to prevent
>> > gcc from increasing alignment."
>>
>> Sure, I can try to expand the commit messages a bit.
>
>I've amended the commit messages of the relevant patches to make it more
>clear that the optimisation can be suppressed by specifying alignment
>when declaring variables, but without making additional claims about the
>type attribute. I hope the result is acceptable to you.
>
>Perhaps you can include a lore link to the patches when applying so that
>this thread can be found easily if needed.
Hi Johan,
Good idea, I've included a link to this thread for each patch.
I've queued up patches 3, 4, 6, 7, 8 for testing before pushing them
out to modules-next.
Thanks!
Jessica
next prev parent reply other threads:[~2020-11-25 14:51 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-03 17:57 [PATCH 0/8] linker-section array fix and clean ups Johan Hovold
2020-11-03 17:57 ` [PATCH 1/8] of: fix linker-section match-table corruption Johan Hovold
2020-11-03 17:57 ` [PATCH 2/8] earlycon: simplify earlycon-table implementation Johan Hovold
2020-11-03 17:57 ` [PATCH 3/8] module: drop version-attribute alignment Johan Hovold
2020-11-03 17:57 ` [PATCH 4/8] module: simplify version-attribute handling Johan Hovold
2020-11-03 17:57 ` [PATCH 5/8] init: use type alignment for kernel parameters Johan Hovold
2020-11-03 17:57 ` [PATCH 6/8] params: drop redundant "unused" attributes Johan Hovold
2020-11-03 17:57 ` [PATCH 7/8] params: use type alignment for kernel parameters Johan Hovold
2020-11-03 17:57 ` [PATCH 8/8] params: clean up module-param macros Johan Hovold
2020-11-04 9:16 ` get_maintainer.pl bug? (was: Re: [PATCH 0/8] linker-section array fix and clean ups) Johan Hovold
2020-11-04 12:04 ` Joe Perches
2020-11-04 15:31 ` Johan Hovold
2020-11-06 16:03 ` [PATCH 0/8] linker-section array fix and clean ups Jessica Yu
2020-11-06 16:45 ` Johan Hovold
2020-11-06 16:55 ` Steven Rostedt
2020-11-06 17:02 ` Johan Hovold
2020-11-11 15:47 ` Jessica Yu
2020-11-13 14:18 ` Johan Hovold
2020-11-23 10:39 ` Johan Hovold
2020-11-25 14:51 ` Jessica Yu [this message]
2020-11-27 9:59 ` Johan Hovold
2020-12-01 9:55 ` Jessica Yu
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=20201125145118.GA32446@linux-8ccs \
--to=jeyu@kernel.org \
--cc=arnd@arndb.de \
--cc=davem@davemloft.net \
--cc=djkurtz@chromium.org \
--cc=dmitry.torokhov@gmail.com \
--cc=frowand.list@gmail.com \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=jakub@redhat.com \
--cc=johan@kernel.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-m68k@lists.linux-m68k.org \
--cc=peterz@infradead.org \
--cc=robh+dt@kernel.org \
--cc=rostedt@goodmis.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.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).