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=-10.5 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED 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 D3AB9C4363C for ; Sun, 4 Oct 2020 15:24:37 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 412FA206B6 for ; Sun, 4 Oct 2020 15:24:37 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="prBbr+rJ"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=marvell.com header.i=@marvell.com header.b="LAOPMsu/"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=marvell.onmicrosoft.com header.i=@marvell.onmicrosoft.com header.b="T+0UYXuB" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 412FA206B6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=marvell.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Content-ID:In-Reply-To:References: Message-ID:Date:Subject:To:From:Reply-To:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=JPet+ShNc4vhuuJKqGFN8PBaxXefyftRNkNJEKRvJM8=; b=prBbr+rJmZRzMcxnWtqHqGTJU c8tToaMV2aRvELMOOLHw5rvyUjD6+nYcPVJhemTXzF9kQhKv7jA0L5FFPfeVUFY6+vH0ItQDjDkTL o+2yEC+z7f92xy/xJB4/Gj4HjLS96PsgtEPkVg3ECVnqNc5YwhcPnNnIAvuJYVPNdEggOYv25LzXS vJfREMDeZPLR0+vvX6a2aLcsQSgAPGyqPsG+P3xR9+juaAFkIJ+oKj1y9seuvVLwiPpUsFQ+1kp+s E2oh3z/Gqa2myIJ+owWJ45ekWyNwRBLaHrLNVa7TYBYZ6TuPDEZijkByZ1MgGBcgQCQ16jjvA5AgG G7Qs+rwOA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kP5qh-0007Wm-EI; Sun, 04 Oct 2020 15:22:55 +0000 Received: from mx0b-0016f401.pphosted.com ([67.231.156.173]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kP5qd-0007WL-42 for linux-arm-kernel@lists.infradead.org; Sun, 04 Oct 2020 15:22:51 +0000 Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 094FKBGd024313; Sun, 4 Oct 2020 08:22:15 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : references : in-reply-to : content-type : content-id : content-transfer-encoding : mime-version; s=pfpt0220; bh=zxgz1HvTOVZep6VwpdPMO19oBEeYFvSxsta1UZPlHTc=; b=LAOPMsu/nm0I4nsh4x4/W8OMnZLIE8FOosoh6hQh4uf+3a7+sPd6KvwxJw1inQGfOKdh Ou3arn67E7gQkX08jfceLwCa1QCpG0kw36M7FVhRu/u75S0nPaHkXSaV5wtoCmiD1Gkw g4VXg1CYePhwLIqUkBtzeJpC2Ts83O7JXuE+piHGv4NR3hdY1bDm8mEPERJrw9/8QprE b0bMDMGL7QzmeZSD4IrimigZZWqJ4LM1t7N25shMpcJ1dNCaGtE3orHVF5d5J48O83+H UclJtnPjy1dugpIvkT+pG/AgjAR8eToaMR5zlcemiIEsh7hb0qNEoLZZ5eKbV8VKPWV8 Og== Received: from sc-exch01.marvell.com ([199.233.58.181]) by mx0b-0016f401.pphosted.com with ESMTP id 33xrtna9vq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT); Sun, 04 Oct 2020 08:22:15 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Sun, 4 Oct 2020 08:22:13 -0700 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.177) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server (TLS) id 15.0.1497.2 via Frontend Transport; Sun, 4 Oct 2020 08:22:13 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gCJ/XoHljAzJg/YH7cYrtvCgw9/iTr7g5Ld+vFZOIgO+Q3VQYNxoRBbFsBlOHGQme1zXDUT9UByaGrRyWA61NLqB3H59KI14mZbY/bZaoRyNxO2qovGk/X/QjECdPmBb58WPyyv/7b/0YDCfgnky/6aZvV8ubkDvajiWvAe1HSYL7LFSQ3riuNoJVgzNUKW6ihK6Xjjmf2st4VUOt3+b2jOJzTi1cex5OzC4Vxicml+TswIM40Y85KHZ9X/+D5BCXg/K8uI908dL1IpvarIhs8yP9KM58CqgCuzFkGFAoSYVoZnhZVAskQVy5u8SBnBKrnK7hJnDHDj9j6reizvj2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zxgz1HvTOVZep6VwpdPMO19oBEeYFvSxsta1UZPlHTc=; b=iIwRsfKusndYnIuF41MMBVP3Sc2fpwBy+ux5bbssZC0FGO6IoM2zTgr5QMns3iYmPc4Ikxq6DtizWPP07zjMkP9cUcV1+vkxyQon+/FZ3hMWNTEttsmTipJptQ9GP/uxckLs96BydjGUQW0uiCc2Q58zAjGBlHhg1KInvqzHLPfIwHZcxwPh8oLiblj4my9ptH7oN74Ey2bEclurRT9Z7lqK9659PhGPmUK6ZHVKGQ/kTAl5eTwRuZ9BgEnOtRkMVWauAjcz+Ihkx0sGJ1e2uh+/snFnTah2eNXs2mDPhcD/tOoBVub3a/FNj8QoFoRIoqv13SlgniFFd95XhUuKNQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=marvell.com; dmarc=pass action=none header.from=marvell.com; dkim=pass header.d=marvell.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.onmicrosoft.com; s=selector1-marvell-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=zxgz1HvTOVZep6VwpdPMO19oBEeYFvSxsta1UZPlHTc=; b=T+0UYXuBBplwHxbXb6Gi2s7WGg3MPuIMme1TkLaLKYyLVKxNuYHAfW876KE/Fmw9VYSJMm54r3bOPaUpF7altEvQaJZm7I+6qvjXB1lY9gcjKQQFuI/8W8P6Vf/MTp8ZVetp3hn0sCYrO3bAKV1So56ThJU/3LBLijlA6h/sK8s= Received: from MW2PR18MB2267.namprd18.prod.outlook.com (2603:10b6:907:3::11) by MW2PR18MB2156.namprd18.prod.outlook.com (2603:10b6:907:a::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.38; Sun, 4 Oct 2020 15:22:10 +0000 Received: from MW2PR18MB2267.namprd18.prod.outlook.com ([fe80::54a1:710f:41a5:c76f]) by MW2PR18MB2267.namprd18.prod.outlook.com ([fe80::54a1:710f:41a5:c76f%5]) with mapi id 15.20.3433.043; Sun, 4 Oct 2020 15:22:10 +0000 From: Alex Belits To: "frederic@kernel.org" Subject: Re: [EXT] Re: [PATCH v4 10/13] task_isolation: don't interrupt CPUs with tick_nohz_full_kick_cpu() Thread-Topic: [EXT] Re: [PATCH v4 10/13] task_isolation: don't interrupt CPUs with tick_nohz_full_kick_cpu() Thread-Index: AQHWYDhuh3VfINlM20KwSBz5WuaF0amDQmgAgATBZ4A= Date: Sun, 4 Oct 2020 15:22:09 +0000 Message-ID: References: <04be044c1bcd76b7438b7563edc35383417f12c8.camel@marvell.com> <5acf7502c071c0d1365ba5e5940e003a7da6521f.camel@marvell.com> <20201001144454.GB6595@lothringen> In-Reply-To: <20201001144454.GB6595@lothringen> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=marvell.com; x-originating-ip: [173.228.7.197] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 423b07b7-549d-41bb-01cd-08d868794348 x-ms-traffictypediagnostic: MW2PR18MB2156: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: T7ZqZ/yd2UMF8qe74j5icVgXXAMEzZiskQBSjkYpVIJM9hylSHJ0B1930a60vaqXTVzXGho7NsNLsaVTnMaKSD3L+43W/LsyZn/Y1BhHsGaxSg8wrL0+i+VjXaOzPMXPrHrX0Hc+jc2gb13ElMhisSewtivo1b38haTDMvb+mybjOoNd5xlg18V2S19g6mSwg3RdLQG4mGSdovfy+Rfd8vpKKekCBNkrOLoTlH9LttHJJDKLPIwl1ZcU5E8n/9HsoaosfkVN/u5FN43C2DjiViQJVvgYb8bUAzrvziApcyzCyXXV6m/uOG1pxY13sWMnTZgu7++OFlztVOQklh74VQ== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW2PR18MB2267.namprd18.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(396003)(39850400004)(376002)(346002)(366004)(136003)(91956017)(76116006)(83380400001)(8676002)(6916009)(6506007)(54906003)(66556008)(66446008)(6512007)(316002)(478600001)(36756003)(66476007)(7416002)(64756008)(66946007)(8936002)(71200400001)(2616005)(5660300002)(186003)(26005)(86362001)(4326008)(6486002)(2906002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: MREOlZXh5y6yiN+3zYYDwiDLlkWXWgFg/2gk2WOjEuY67r9BQWvyvVAtMUj4brqqZTRhBHk3nGqQ4E0hCtu6snsfRBQtMu4UfyIBA/LVmux/DknzuI236fXyWmDqmFjc5jdSrkYL5KPtT/NAWGaTpNQ+QbI0ILzt6gN60aCMi23DesVS2S65LnOxzvpq7iHkpZmmKZ3cMpCDQ1vipyNxbmZRT4siShFtPxhjPyAQI/BwsLrqN7aVaWdKj2WA/YjaipzOS+lIZdRT27rM2tq3zYQAwUj5oOY+AQcrjQb2Uf4H8A/IlnfyD4DB/BHUk6X07ME/RqzBVVcMnT9E8W4fuTIJcTfUexn4VHh2BpBZKE6pDlw/eRkgoYfSxEHL9LcXy3M2VqZZLHvjCn8/60My5sDiHOoKCsjmn060ln2SZm5aggxD2Y6oMqYdKg1Peb59yM8BKN73XiicSOrERBq9kuYC1w5rd1IX/Otmm80+1qW+0mVR2MS9JfroaHpxX0vl5RpzR52xKvyG3xaaR8vJN14btsOoCWFW4lUEUL9xKYTlBfsxOGv9fnHixossp41XRE8SIkgz07wXByRmoIYfydkAtydZwv7X2CdV4xp7ZeF1uiE8VWrtSafspWUbhHYXj95XZy8OJDngtSqgp5bMxA== Content-ID: <6D203A5F6D453444A31FB4AECFDED90E@namprd18.prod.outlook.com> MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW2PR18MB2267.namprd18.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 423b07b7-549d-41bb-01cd-08d868794348 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Oct 2020 15:22:10.0040 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 70e1fb47-1155-421d-87fc-2e58f638b6e0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 58ykxhWvgeFjHAaulvYh2/d5BQ90CqSKf1R82himN9VnTLvBXvopbJcj075Mx6fGwx8o2o/DH1vdToQprCE2Ng== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW2PR18MB2156 X-OriginatorOrg: marvell.com X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.235, 18.0.687 definitions=2020-10-04_13:2020-10-02, 2020-10-04 signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201004_112251_229065_98EE903B X-CRM114-Status: GOOD ( 32.02 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "linux-arch@vger.kernel.org" , "peterz@infradead.org" , "linux-api@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "rostedt@goodmis.org" , "davem@davemloft.net" , "netdev@vger.kernel.org" , "catalin.marinas@arm.com" , Prasun Kapoor , "tglx@linutronix.de" , "will@kernel.org" , "mingo@kernel.org" , "linux-arm-kernel@lists.infradead.org" Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, 2020-10-01 at 16:44 +0200, Frederic Weisbecker wrote: > External Email > > ------------------------------------------------------------------- > --- > On Wed, Jul 22, 2020 at 02:57:33PM +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 6e4cd8459f05..2f82a6daf8fc 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(); > > What is it ordering? ll_isol_flags will be read in task_isolation_on_cpu(), that accrss should be ordered against writing in task_isolation_kernel_enter(), fast_task_isolation_cpu_cleanup() and task_isolation_start(). Since task_isolation_on_cpu() is often called for multiple CPUs in a sequence, it would be wasteful to include a barrier inside it. > > + if (!tick_nohz_full_cpu(cpu) || task_isolation_on_cpu(cpu)) > > return; > > You can't simply ignore an IPI. There is always a reason for a > nohz_full CPU > to be kicked. Something triggered a tick dependency. It can be posix > cpu timers > for example, or anything. I realize that this is unusual, however the idea is that while the task is running in isolated mode in userspace, we assume that from this CPUs point of view whatever is happening in kernel, can wait until CPU is back in kernel, and when it first enters kernel from this mode, it should "catch up" with everything that happened in its absence. task_isolation_kernel_enter() is supposed to do that, so by the time anything should be done involving the rest of the kernel, CPU is back to normal. It is application's responsibility to avoid triggering things that break its isolation, so the application assumes that everything that involves entering kernel will not be available while it is isolated. If isolation will be broken, or application will request return from isolation, everything will go back to normal environment with all functionality available. > > > > irq_work_queue_on(&per_cpu(nohz_full_kick_work, cpu), cpu); > > -- > > 2.26.2 > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel