From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sergey Senozhatsky Subject: Re: [PATCH] RFC: console: hack up console_lock more v3 Date: Fri, 10 May 2019 18:51:41 +0900 Message-ID: <20190510095141.GA32171@jagdpanzerIV> References: <20190509120903.28939-1-daniel.vetter@ffwll.ch> <20190509145620.2pjqko7copbxuzth@pathway.suse.cz> <20190510091537.44e3aeb7gcrcob76@pathway.suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <20190510091537.44e3aeb7gcrcob76@pathway.suse.cz> Sender: linux-kernel-owner@vger.kernel.org To: Petr Mladek Cc: Daniel Vetter , Intel Graphics Development , DRI Development , Daniel Vetter , Peter Zijlstra , Ingo Molnar , Will Deacon , Sergey Senozhatsky , Steven Rostedt , John Ogness , Chris Wilson , Linux Kernel Mailing List List-Id: intel-gfx@lists.freedesktop.org On (05/10/19 11:15), Petr Mladek wrote: [..] > arch/x86/kernel/smp.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > --- a/arch/x86/kernel/smp.c > +++ b/arch/x86/kernel/smp.c > @@ -124,7 +124,8 @@ static bool smp_no_nmi_ipi = false; > */ > static void native_smp_send_reschedule(int cpu) > { > - if (unlikely(cpu_is_offline(cpu))) { > + if (unlikely(cpu_is_offline(cpu) && > + atomic_read(&stopping_cpu) < 0)) { > WARN(1, "sched: Unexpected reschedule of offline CPU#%d!\n", cpu); > return; > } I think we need to remove CPU which we IPI_STOP from idle_cpus_mask. So then scheduler won't pick up stopped CPUs (cpumask_first(nohz.idle_cpus_mask)) and attempt rescheduling to them. It seems that currently native_stop_other_cpus() doesn't do that. -ss