From: Frederic Weisbecker <frederic@kernel.org>
To: Peter Zijlstra <peterz@infradead.org>
Cc: LKML <linux-kernel@vger.kernel.org>, Mel Gorman <mgorman@suse.de>,
Michal Hocko <mhocko@kernel.org>,
Thomas Gleixner <tglx@linutronix.de>,
"Paul E . McKenney" <paulmck@kernel.org>,
Ingo Molnar <mingo@redhat.com>, Michal Hocko <mhocko@suse.com>
Subject: Re: [RFC PATCH 6/7] preempt/dynamic: Provide irqentry_exit_cond_resched() static call
Date: Tue, 10 Nov 2020 14:45:03 +0100 [thread overview]
Message-ID: <20201110134503.GC48886@lothringen> (raw)
In-Reply-To: <20201110103221.GC2594@hirez.programming.kicks-ass.net>
On Tue, Nov 10, 2020 at 11:32:21AM +0100, Peter Zijlstra wrote:
> On Tue, Nov 10, 2020 at 01:56:08AM +0100, Frederic Weisbecker wrote:
> > [convert from static key to static call, only define static call when
> > PREEMPT_DYNAMIC]
>
> > noinstr void irqentry_exit(struct pt_regs *regs, irqentry_state_t state)
> > {
> > @@ -383,8 +386,13 @@ noinstr void irqentry_exit(struct pt_regs *regs, irqentry_state_t state)
> > }
> >
> > instrumentation_begin();
> > - if (IS_ENABLED(CONFIG_PREEMPTION))
> > + if (IS_ENABLED(CONFIG_PREEMPTION)) {
> > +#ifdef CONFIG_PREEMT_DYNAMIC
> > + static_call(irqentry_exit_cond_resched)();
> > +#else
> > irqentry_exit_cond_resched();
> > +#endif
> > + }
> > /* Covers both tracing and lockdep */
> > trace_hardirqs_on();
> > instrumentation_end();
>
> The reason I had this a static_branch() is that because if you look at
> the code-gen of this function, you'll find it will inline the call.
>
> Not sure it matters much, but it avoids a CALL+RET.
I wouldn't mind turning it to a static key but that adds one more
requirement for the architectures that want this, namely proper
support for static key. Now probably architectures supporting
static call inline (for now only x86) will have proper static
key support as well. So this probably doesn't matter after all.
Thanks.
next prev parent reply other threads:[~2020-11-10 13:45 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-10 0:56 [RFC PATCH 0/7] preempt: Tune preemption flavour on boot v3 Frederic Weisbecker
2020-11-10 0:56 ` [RFC PATCH 1/7] static_call/x86: Add __static_call_returnl0() Frederic Weisbecker
2020-11-10 9:55 ` Peter Zijlstra
2020-11-10 10:13 ` Peter Zijlstra
2020-11-10 13:42 ` Frederic Weisbecker
2020-11-10 13:53 ` Peter Zijlstra
2020-11-10 13:24 ` Frederic Weisbecker
2020-11-10 10:06 ` Peter Zijlstra
2020-11-10 0:56 ` [RFC PATCH 2/7] static_call: Pull some static_call declarations to the type headers Frederic Weisbecker
2020-11-10 0:56 ` [RFC PATCH 3/7] preempt: Introduce CONFIG_PREEMPT_DYNAMIC Frederic Weisbecker
2020-11-10 0:56 ` [RFC PATCH 4/7] preempt/dynamic: Provide cond_resched() and might_resched() static calls Frederic Weisbecker
2020-11-10 10:39 ` Peter Zijlstra
2020-11-10 10:48 ` Peter Zijlstra
2021-01-18 13:58 ` Frederic Weisbecker
2020-11-10 0:56 ` [RFC PATCH 5/7] preempt/dynamic: Provide preempt_schedule[_notrace]() " Frederic Weisbecker
2020-11-10 0:56 ` [RFC PATCH 6/7] preempt/dynamic: Provide irqentry_exit_cond_resched() static call Frederic Weisbecker
2020-11-10 10:32 ` Peter Zijlstra
2020-11-10 13:45 ` Frederic Weisbecker [this message]
2020-11-10 0:56 ` [RFC PATCH 7/7] preempt/dynamic: Support dynamic preempt with preempt= boot option Frederic Weisbecker
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=20201110134503.GC48886@lothringen \
--to=frederic@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mgorman@suse.de \
--cc=mhocko@kernel.org \
--cc=mhocko@suse.com \
--cc=mingo@redhat.com \
--cc=paulmck@kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
/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