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=-8.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 87EE5C10F25 for ; Fri, 6 Mar 2020 16:03:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 581D32187F for ; Fri, 6 Mar 2020 16:03:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583510626; bh=QF4D5q4VwrFUcxRBIMtk5XOzapjkh05UIXSQstGH7+0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=yQW9sENcbP2DVEZl96EMCvNNcb7UVRJTLNWyT/1Xc0n/L8rk+w1POShOHfCQUAlJd fbVKOWenD+toT1YNJ/wLx7/eVZFkTGb96RsDMxgA2VCevsLuQwCIZieKVKIq4u/kes 9KgAcOdH+HcdY0w4WKk7i8rTcPSTcSS4dTkpZxyU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727061AbgCFQDp (ORCPT ); Fri, 6 Mar 2020 11:03:45 -0500 Received: from mail.kernel.org ([198.145.29.99]:38712 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725935AbgCFQDp (ORCPT ); Fri, 6 Mar 2020 11:03:45 -0500 Received: from localhost (lfbn-ncy-1-985-231.w90-101.abo.wanadoo.fr [90.101.63.231]) (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 4721F217F4; Fri, 6 Mar 2020 16:03:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583510624; bh=QF4D5q4VwrFUcxRBIMtk5XOzapjkh05UIXSQstGH7+0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=OHD5uqdhc655gnIwuyL89XtqW8E8WwfzfAwLv7T8e04VbXb2vVdjYeGpmJAh3y2+A M4p6WF0DkIYU6ciNOv2Pmedt8CesS1mSV5GIqxVUE3tk6wwpG0Sjtz+rRZixQ7v0LV Rkka9o8uE7lJhRpKEZmpZhEofyuNNOyTTUabdEeY= Date: Fri, 6 Mar 2020 17:03:42 +0100 From: Frederic Weisbecker To: Alex Belits Cc: "rostedt@goodmis.org" , "mingo@kernel.org" , "peterz@infradead.org" , "linux-kernel@vger.kernel.org" , Prasun Kapoor , "tglx@linutronix.de" , "linux-api@vger.kernel.org" , "linux-mm@vger.kernel.org" , "linux-arch@vger.kernel.org" Subject: Re: [PATCH 08/12] task_isolation: don't interrupt CPUs with tick_nohz_full_kick_cpu() Message-ID: <20200306160341.GE8590@lenoir> References: <4473787e1b6bc3cc226067e8d122092a678b63de.camel@marvell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Mar 04, 2020 at 04:12:40PM +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: Alex Belits > --- > kernel/time/tick-sched.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c > index 1d4dec9d3ee7..fe4503ba1316 100644 > --- a/kernel/time/tick-sched.c > +++ b/kernel/time/tick-sched.c > @@ -20,6 +20,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -262,7 +263,7 @@ static void tick_nohz_full_kick(void) > */ > void tick_nohz_full_kick_cpu(int cpu) > { > - if (!tick_nohz_full_cpu(cpu)) > + if (!tick_nohz_full_cpu(cpu) || task_isolation_on_cpu(cpu)) > return; I fear you can't do that. A nohz full CPU is kicked for a reason. As for the other cases, you need to fix the callers. In the general case, randomly ignoring an interrupt is a correctness issue. Thanks.