[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210127163308.cgiq7jxx2uziuhcc@treble>
Date: Wed, 27 Jan 2021 10:33:08 -0600
From: Josh Poimboeuf <jpoimboe@...hat.com>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Frederic Weisbecker <frederic@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
Mel Gorman <mgorman@...e.de>, Michal Hocko <mhocko@...nel.org>,
Thomas Gleixner <tglx@...utronix.de>,
"Paul E . McKenney" <paulmck@...nel.org>,
Ingo Molnar <mingo@...hat.com>, Michal Hocko <mhocko@...e.com>,
rostedt@...dmis.org, jbaron@...mai.com, ardb@...nel.org
Subject: Re: [RFC PATCH 6/8] preempt/dynamic: Provide
preempt_schedule[_notrace]() static calls
On Wed, Jan 27, 2021 at 05:19:02PM +0100, Peter Zijlstra wrote:
> On Wed, Jan 27, 2021 at 09:59:14AM -0600, Josh Poimboeuf wrote:
> > On Wed, Jan 27, 2021 at 12:27:09PM +0100, Peter Zijlstra wrote:
> > > On Wed, Jan 27, 2021 at 10:13:47AM +0100, Peter Zijlstra wrote:
> > > > On Tue, Jan 26, 2021 at 05:57:30PM -0600, Josh Poimboeuf wrote:
> > >
> > > > > Well, I hate it, but I'm not sure I have any better ideas. It should be
> > > > > possible to use kallsyms, instead of the rb-tree/register nonsense. Not
> > > > > sure about the performance impact though. Might be a good reason to
> > > > > speed up kallsyms!
> > > >
> > > > Oh right, let me see if I can make that work.
> > >
> > > Something like so compiles.. but it does make the whole thing depend on
> > > KALLSYMS_ALL, which is somewhat yuck.
> > >
> > > Also, kallsyms_lookup_name() is horrible, but not trivial to fix because
> > > of that compression scheme used.
> >
> > The KALLSYMS_ALL dependency doesn't bother me personally but I assume
> > some of the tinyconfig folks might not appreciate it being on
> > permanently.
>
> I suppose this ought to cure the _ALL thing.
>
> diff --git a/scripts/kallsyms.c b/scripts/kallsyms.c
> index 7ecd2ccba531..83586cc4d954 100644
> --- a/scripts/kallsyms.c
> +++ b/scripts/kallsyms.c
> @@ -260,6 +260,12 @@ static int symbol_valid(const struct sym_entry *s)
> {
> const char *name = sym_name(s);
>
> + /*
> + * Always emit __SCK__ symbols for static_call_add_module().
> + */
> + if (!strncmp(name, "__SCK__", 7))
> + return 1;
> +
> /* if --all-symbols is not specified, then symbols outside the text
> * and inittext sections are discarded */
> if (!all_symbols) {
This made me LOL for some reason. I like it though.
What did you think about .static_call_tramp_key? I could whip up a
patch later unless you beat me to it.
--
Josh
Powered by blists - more mailing lists