[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAK8P3a0N-ZuSEZyw5ub1vr3VP2Bdoa2Wq=No1gad+SyqquQXfw@mail.gmail.com>
Date: Wed, 13 Oct 2021 21:37:01 +0200
From: Arnd Bergmann <arnd@...nel.org>
To: Peter Zijlstra <peterz@...radead.org>
Cc: Vasily Gorbik <gor@...ux.ibm.com>,
Josh Poimboeuf <jpoimboe@...hat.com>,
Jiri Kosina <jikos@...nel.org>,
Miroslav Benes <mbenes@...e.cz>,
Petr Mladek <pmladek@...e.com>, Ingo Molnar <mingo@...nel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
joe.lawrence@...hat.com,
Frédéric Weisbecker <fweisbec@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Heiko Carstens <hca@...ux.ibm.com>, svens@...ux.ibm.com,
sumanthk@...ux.ibm.com, live-patching@...r.kernel.org,
"Paul E. McKenney" <paulmck@...nel.org>,
Steven Rostedt <rostedt@...dmis.org>,
"the arch/x86 maintainers" <x86@...nel.org>
Subject: Re: [PATCH v2 05/11] sched,livepatch: Use wake_up_if_idle()
On Wed, Sep 29, 2021 at 6:10 PM Peter Zijlstra <peterz@...radead.org> wrote:
>
> Make sure to prod idle CPUs so they call klp_update_patch_state().
>
> Signed-off-by: Peter Zijlstra (Intel) <peterz@...radead.org>
> ---
> kernel/livepatch/transition.c | 5 ++++-
> 1 file changed, 4 insertions(+), 1 deletion(-)
>
> --- a/kernel/livepatch/transition.c
> +++ b/kernel/livepatch/transition.c
> @@ -413,8 +413,11 @@ void klp_try_complete_transition(void)
> for_each_possible_cpu(cpu) {
> task = idle_task(cpu);
> if (cpu_online(cpu)) {
> - if (!klp_try_switch_task(task))
> + if (!klp_try_switch_task(task)) {
> complete = false;
> + /* Make idle task go through the main loop. */
> + wake_up_if_idle(cpu);
> + }
This caused a build regression on non-SMP kernels:
x86_64-linux-ld: kernel/livepatch/transition.o: in function
`klp_try_complete_transition':
transition.c:(.text+0x106e): undefined reference to `wake_up_if_idle'
Maybe add a IS_ENABLED(CONFIG_SMP) check to one of the if() conditions?
Arnd
Powered by blists - more mailing lists