From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E1D74C388F9 for ; Mon, 23 Nov 2020 22:13:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 86A31206C0 for ; Mon, 23 Nov 2020 22:13:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="MdzuxRNa" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731686AbgKWWNk (ORCPT ); Mon, 23 Nov 2020 17:13:40 -0500 Received: from mail.kernel.org ([198.145.29.99]:42980 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728895AbgKWWNj (ORCPT ); Mon, 23 Nov 2020 17:13:39 -0500 Received: from localhost (unknown [176.167.152.233]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id A3C92206A5; Mon, 23 Nov 2020 22:13:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1606169619; bh=hM7jHo8zGWWV1YNICPw/kIUF7tnOsXfBCzHM7DSHFXE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=MdzuxRNaAjTWoHtlDeDAZaeRJGDegGr6iwdVkjJ6m9qRA0fiWNjMrDyNev4Pf4QI5 LiP17yfkHfJrzWPLQDlPl9boCiOxCS9cHUqBzSwWZrOkW9KL6B6jM62dMVBwxCHWlX 8oD4/sZcNIUtBNHmWTuoHcfDg4WRMQvzDSNj4wPg= Date: Mon, 23 Nov 2020 23:13:36 +0100 From: Frederic Weisbecker To: Alex Belits Cc: "nitesh@redhat.com" , Prasun Kapoor , "linux-api@vger.kernel.org" , "davem@davemloft.net" , "trix@redhat.com" , "mingo@kernel.org" , "catalin.marinas@arm.com" , "rostedt@goodmis.org" , "linux-kernel@vger.kernel.org" , "peterx@redhat.com" , "tglx@linutronix.de" , "linux-arch@vger.kernel.org" , "mtosatti@redhat.com" , "will@kernel.org" , "peterz@infradead.org" , "leon@sidebranch.com" , "linux-arm-kernel@lists.infradead.org" , "pauld@redhat.com" , "netdev@vger.kernel.org" Subject: Re: [PATCH v5 7/9] task_isolation: don't interrupt CPUs with tick_nohz_full_kick_cpu() Message-ID: <20201123221336.GB1751@lothringen> References: <8d887e59ca713726f4fcb25a316e1e932b02823e.camel@marvell.com> <76ed0b222d2f16fb5aebd144ac0222a7f3b87fa1.camel@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <76ed0b222d2f16fb5aebd144ac0222a7f3b87fa1.camel@marvell.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Alex, On Mon, Nov 23, 2020 at 05:58:22PM +0000, Alex Belits wrote: > From: Yuri Norov > > For nohz_full CPUs the desirable behavior is to receive interrupts > generated by tick_nohz_full_kick_cpu(). But for hard isolation it's > obviously not desirable because it breaks isolation. > > This patch adds check for it. > > Signed-off-by: Yuri Norov > [abelits@marvell.com: updated, only exclude CPUs running isolated tasks] > Signed-off-by: Alex Belits > --- > kernel/time/tick-sched.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c > index a213952541db..6c8679e200f0 100644 > --- a/kernel/time/tick-sched.c > +++ b/kernel/time/tick-sched.c > @@ -20,6 +20,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -268,7 +269,8 @@ static void tick_nohz_full_kick(void) > */ > void tick_nohz_full_kick_cpu(int cpu) > { > - if (!tick_nohz_full_cpu(cpu)) > + smp_rmb(); > + if (!tick_nohz_full_cpu(cpu) || task_isolation_on_cpu(cpu)) > return; Like I said in subsequent reviews, we are not going to ignore IPIs. We must fix the sources of these IPIs instead. Thanks. > > irq_work_queue_on(&per_cpu(nohz_full_kick_work, cpu), cpu); > -- > 2.20.1 >