From: Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>
To: Jessica Yu <jeyu@kernel.org>
Cc: Laura Abbott <labbott@redhat.com>,
Martin Sebor <msebor@gcc.gnu.org>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] include/linux/module.h: mark init/cleanup_module aliases as __cold
Date: Wed, 6 Feb 2019 18:28:42 +0100 [thread overview]
Message-ID: <CANiq72nBHnsHu_XCjrhrLow08gx0XHszDrm9gGL-r663Ne7rHw@mail.gmail.com> (raw)
In-Reply-To: <CANiq72=cK0oMFtMejAsphNyJmQ8KvG5=70Gyt7idbvp4ScoxgA@mail.gmail.com>
On Wed, Feb 6, 2019 at 5:31 PM Miguel Ojeda
<miguel.ojeda.sandonis@gmail.com> wrote:
>
> On Mon, Feb 4, 2019 at 4:08 PM Jessica Yu <jeyu@kernel.org> wrote:
> >
> > IMHO I think annotating with __init is more straightforward, instead
> > of cherry-picking attributes (we wouldn't know at first glance why the
> > aliases are specifically annotated with __cold without looking at git
> > history). Plus the actual module init function and alias declarations
> > would be consistent. Just looking at the __init attributes:
> >
> > #define __init __section(.init.text) __cold __latent_entropy __noinitretpoline
By the way, note that we also need to annotate the exit ones. To do
something similar, for __exit we have:
#define __exit __section(.exit.text) __exitused __cold notrace
__exitused expands to nothing when MODULE is defined.
notrace is either hotpatch(0,0) or no_instrument_function; and they
shouldn't matter in the alias since we are not generating code (and
anyway they disable the extra code, instead of enabling).
So I will also use __exit there instead of only __cold too.
Cheers,
Miguel
prev parent reply other threads:[~2019-02-06 17:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-23 17:37 [PATCH] include/linux/module.h: mark init/cleanup_module aliases as __cold Miguel Ojeda
2019-01-25 10:47 ` Laura Abbott
2019-01-31 14:22 ` Jessica Yu
2019-01-31 16:48 ` Miguel Ojeda
2019-02-04 15:08 ` Jessica Yu
2019-02-06 16:31 ` Miguel Ojeda
2019-02-06 17:28 ` Miguel Ojeda [this message]
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=CANiq72nBHnsHu_XCjrhrLow08gx0XHszDrm9gGL-r663Ne7rHw@mail.gmail.com \
--to=miguel.ojeda.sandonis@gmail.com \
--cc=jeyu@kernel.org \
--cc=labbott@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=msebor@gcc.gnu.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).