[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <3e191b63-9125-25a8-4784-e7a737d71b05@oracle.com>
Date: Wed, 6 May 2020 14:42:33 +0200
From: Alexandre Chartre <alexandre.chartre@...cle.com>
To: Thomas Gleixner <tglx@...utronix.de>,
LKML <linux-kernel@...r.kernel.org>
Cc: x86@...nel.org, "Paul E. McKenney" <paulmck@...nel.org>,
Andy Lutomirski <luto@...nel.org>,
Frederic Weisbecker <frederic@...nel.org>,
Paolo Bonzini <pbonzini@...hat.com>,
Sean Christopherson <sean.j.christopherson@...el.com>,
Masami Hiramatsu <mhiramat@...nel.org>,
Petr Mladek <pmladek@...e.com>,
Steven Rostedt <rostedt@...dmis.org>,
Joel Fernandes <joel@...lfernandes.org>,
Boris Ostrovsky <boris.ostrovsky@...cle.com>,
Juergen Gross <jgross@...e.com>,
Brian Gerst <brgerst@...il.com>,
Mathieu Desnoyers <mathieu.desnoyers@...icios.com>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Will Deacon <will@...nel.org>
Subject: Re: [patch V4 part 1 04/36] sched: Make scheduler_ipi inline
On 5/5/20 3:16 PM, Thomas Gleixner wrote:
> Now that the scheduler IPI is trivial and simple again there is no point to
> have the little function out of line. This simplifies the effort of
> constraining the instrumentation nicely.
>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> ---
> include/linux/sched.h | 10 +++++++++-
> kernel/sched/core.c | 10 ----------
> 2 files changed, 9 insertions(+), 11 deletions(-)
Reviewed-by: Alexandre Chartre <alexandre.chartre@...cle.com>
alex.
> --- a/include/linux/sched.h
> +++ b/include/linux/sched.h
> @@ -1719,7 +1719,15 @@ extern char *__get_task_comm(char *to, s
> })
>
> #ifdef CONFIG_SMP
> -void scheduler_ipi(void);
> +static __always_inline void scheduler_ipi(void)
> +{
> + /*
> + * Fold TIF_NEED_RESCHED into the preempt_count; anybody setting
> + * TIF_NEED_RESCHED remotely (for the first time) will also send
> + * this IPI.
> + */
> + preempt_fold_need_resched();
> +}
> extern unsigned long wait_task_inactive(struct task_struct *, long match_state);
> #else
> static inline void scheduler_ipi(void) { }
> --- a/kernel/sched/core.c
> +++ b/kernel/sched/core.c
> @@ -2312,16 +2312,6 @@ static void wake_csd_func(void *info)
> sched_ttwu_pending();
> }
>
> -void scheduler_ipi(void)
> -{
> - /*
> - * Fold TIF_NEED_RESCHED into the preempt_count; anybody setting
> - * TIF_NEED_RESCHED remotely (for the first time) will also send
> - * this IPI.
> - */
> - preempt_fold_need_resched();
> -}
> -
> static void ttwu_queue_remote(struct task_struct *p, int cpu, int wake_flags)
> {
> struct rq *rq = cpu_rq(cpu);
>
Powered by blists - more mailing lists