lkml.org 
[lkml]   [2020]   [Nov]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/8] linker-section array fix and clean ups
On Fri, Nov 06, 2020 at 11:55:23AM -0500, Steven Rostedt wrote:
> On Fri, 6 Nov 2020 17:45:37 +0100
> Johan Hovold <johan@kernel.org> wrote:
>
> > It's simply specifying alignment when declaring the variable that
> > prevents this optimisation. The relevant code is in the function
> > align_variable() in [1] where DATA_ALIGNMENT() is never called in case
> > an alignment has been specified (!DECL_USER_ALIGN(decl)).
> >
> > There's no mention in the documentation of this that I'm aware of, but
> > this is the way the aligned attribute has worked since its introduction
> > judging from the commit history.
> >
> > As mentioned above, we've been relying on this for kernel parameters and
> > other structures since 2003-2004 so if it ever were to change we'd find
> > out soon enough.
> >
> > It's about to be used for scheduler classes as well. [2]
>
> Is this something that gcc folks are aware of? Yes, we appear to be relying
> on undocumented implementations, but that hasn't caused gcc to break the
> kernel in the past.

The scheduler change was suggested by Jakub so at least some of them
are.

Johan

\
 
 \ /
  Last update: 2020-11-06 18:03    [W:0.101 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site