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=ham 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 E67E9C10DCE for ; Fri, 6 Mar 2020 16:03:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B14502187F for ; Fri, 6 Mar 2020 16:03:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1583510625; bh=QF4D5q4VwrFUcxRBIMtk5XOzapjkh05UIXSQstGH7+0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=sn+B4I0/ua9fjKnM5IIyFL4d6c+KSj0PA3Mpl4/WP8s681P0jmKvCaiDNQxbC0Egk oP8rU3H5EACGK1TjhGk2doyY8VD6hy2hTo/YU/awdQ0Us2WDJBkWvD0Xr3VhARJLff TpNKaJmcEyTXmxBohdmnb7QmEz1c61F3Fzvao1lc= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727000AbgCFQDp (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-api-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-api@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.