[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LSU.2.21.2109101130560.19415@pobox.suse.cz>
Date: Fri, 10 Sep 2021 11:32:19 +0200 (CEST)
From: Miroslav Benes <mbenes@...e.cz>
To: Vasily Gorbik <gor@...ux.ibm.com>
cc: Josh Poimboeuf <jpoimboe@...hat.com>,
Jiri Kosina <jikos@...nel.org>, Petr Mladek <pmladek@...e.com>,
Joe Lawrence <joe.lawrence@...hat.com>,
Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>,
Frederic Weisbecker <fweisbec@...il.com>,
Thomas Gleixner <tglx@...utronix.de>,
Heiko Carstens <hca@...ux.ibm.com>,
Sven Schnelle <svens@...ux.ibm.com>,
Sumanth Korikkar <sumanthk@...ux.ibm.com>,
live-patching@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] livepatch: Fix idle cpu's tasks transition
On Thu, 9 Sep 2021, Vasily Gorbik wrote:
> On an idle system with large amount of cpus it might happen that
> klp_update_patch_state() is not reached in do_idle() for a long periods
> of time. With debug messages enabled log is filled with:
> [ 499.442643] livepatch: klp_try_switch_task: swapper/63:0 is running
>
> without any signs of progress. Ending up with "failed to complete
> transition".
>
> On s390 LPAR with 128 cpus not a single transition is able to complete
> and livepatch kselftests fail. Tests on idling x86 kvm instance with 128
> cpus demonstrate similar symptoms with and without CONFIG_NO_HZ.
>
> To deal with that, since runqueue is already locked in
> klp_try_switch_task() identify idling cpus and trigger rescheduling
> potentially waking them up and making sure idle tasks break out of
> do_idle() inner loop and reach klp_update_patch_state(). This helps to
> speed up transition time while avoiding unnecessary extra system load.
>
> Signed-off-by: Vasily Gorbik <gor@...ux.ibm.com>
Seems reasonable to me.
Acked-by: Miroslav Benes <mbenes@...e.cz>
M
Powered by blists - more mailing lists