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=-0.7 required=3.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 10539C433FE for ; Fri, 11 Dec 2020 18:09:58 +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 BF51523106 for ; Fri, 11 Dec 2020 18:09:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BF51523106 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.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:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=PrcGEHDSYUFx7zA60sH1BoAIvF0EK96bKCg11ZIOp9k=; b=zJf8oueEbuDC28isV+Pxi2lSa 2IUKC9sZkRT+Y2WLVaBc3zrwWlT4EnJYxSlRro12C07f/r0q5D6/O+duoTDqiz9+xLN1Uzut+2iqF YbiEcnnlbUQ6rqbBKBxUjvIcxPubjpaHuaBB7GeAYOj7EK1OKHARNS+TDh9zImiEwyn5FhiQkMs5D t9drdDUFzwxuB0Q2XHuN8ZQR5QCvpjKjdEnFGZ59YESOy6HNWnBEvQMLDEfAukqAODAuhIUiWWX4z fj9AwnqO9Ie8R1aQsubz3Vc5Ct3Ui7qUneTSPBVn9PYbL8qW3uGMcohuwspGdTS1/75hitHA5/Y3/ iKK0Clzvw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1knmq2-0002I4-VA; Fri, 11 Dec 2020 18:08:18 +0000 Received: from mail-qk1-x733.google.com ([2607:f8b0:4864:20::733]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1knmq0-0002Go-3D for linux-arm-kernel@lists.infradead.org; Fri, 11 Dec 2020 18:08:17 +0000 Received: by mail-qk1-x733.google.com with SMTP id w79so9294860qkb.5 for ; Fri, 11 Dec 2020 10:08:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=tb0y+vgKZ75r7FvS5QVh1rGnGDYz+mrb7UR1MucpS5w=; b=AUs7F4ua1aW9ZopDlCVYQZ6GvmSlovN0hlWDGixtj3frbcGgr4QNT+Ra3lpWARZXJ+ f4Nw8GgWhumDeCn1ywP5GGnzYP0vGwRIzmYXQa1XvK2YJZqHLc/N3RXUKFdOtf1qry+k jMEhOYGOcf7Ric1YLs+0HCb9OEXwRvXZ0sgKcRVOBbi7Skiz+ZMaH5Lk6a/xrpm3yOOd UuHzlapcvquwseMbWAahI5MmZPMTAjWCvkJftxW6/2YZA9njqsjT3SNz+jV9kL8mx7op Ib8+08PzSXQmMk+Hq8rSYIC+6tpL1cn7nLBpLEr1M+OrkNmqsNj/MPdRE1pMmADvWPNA qu6w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=tb0y+vgKZ75r7FvS5QVh1rGnGDYz+mrb7UR1MucpS5w=; b=eTd0ZH+nawOroGqQKEfSFk3OfWZVSYtH4nQec8g1BKqSq6Uf5lcCIO3FFVaYQc+3ZH 74eqQiUihJhwHCBEbLXHjtqCDaG7nm6TZPKKNG0LgfkcIKsvcgWrJE803LJLCCRgz86/ I0RhenF0quRP6D3K/GlgAfsr59l46BUWOnUTRYhIFPXRt/G6EM4jVzsiZ6xS79+SpFG6 VXrBI6KieBSSMYJ3OICQVSvPbb48SXcoTFa1i9bTSbCs3iv2MN1lR6eLYQoWK+uvE4X7 Bj6ReJavwHXIULlNMq3teNNwLoCMNSlGk+EefUjZcLHGAc2xwchCX7MORDlWxEgQiTGW q/zA== X-Gm-Message-State: AOAM5338ISevWE3KzV9DaFtpOrQhSlCrWtUS4xxJ4bk5qYpLcwFVsLNw Jhf8kz3e6+o787yAkW0KPyYUepgPK8hzO2v8 X-Google-Smtp-Source: ABdhPJwvJuRnmcVRNXqpa7e69IuosIRo3bP9ze7lFEvemoSBzlYKUFwNAlUgS46RCQXWVw8VE7FW0w== X-Received: by 2002:ae9:c01a:: with SMTP id u26mr17800951qkk.372.1607710091170; Fri, 11 Dec 2020 10:08:11 -0800 (PST) Received: from localhost (d27-96-190-162.evv.wideopenwest.com. [96.27.162.190]) by smtp.gmail.com with ESMTPSA id o21sm6598541qko.9.2020.12.11.10.08.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Dec 2020 10:08:10 -0800 (PST) Date: Fri, 11 Dec 2020 10:08:09 -0800 From: Yury Norov To: Thomas Gleixner Subject: Re: [PATCH v5 0/9] "Task_isolation" mode Message-ID: <20201211180809.GA397355@yury-ThinkPad> References: <8d887e59ca713726f4fcb25a316e1e932b02823e.camel@marvell.com> <20201205204049.GA8578@amd> <87h7oz96o6.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <87h7oz96o6.fsf@nanos.tec.linutronix.de> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201211_130816_157714_FD0EB750 X-CRM114-Status: GOOD ( 30.35 ) 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" , "nitesh@redhat.com" , "pauld@redhat.com" , "catalin.marinas@arm.com" , "peterz@infradead.org" , Alex Belits , "frederic@kernel.org" , "mtosatti@redhat.com" , "trix@redhat.com" , "linux-kernel@vger.kernel.org" , "rostedt@goodmis.org" , "mingo@kernel.org" , "leon@sidebranch.com" , "netdev@vger.kernel.org" , "peterx@redhat.com" , Pavel Machek , "linux-api@vger.kernel.org" , Prasun Kapoor , "will@kernel.org" , "davem@davemloft.net" , "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 Sun, Dec 06, 2020 at 12:25:45AM +0100, Thomas Gleixner wrote: > Pavel, > > On Sat, Dec 05 2020 at 21:40, Pavel Machek wrote: > > So... what kind of guarantees does this aim to provide / what tasks it > > is useful for? > > > > For real time response, we have other approaches. > > Depends on your requirements. Some problems are actually better solved > with busy polling. See below. > > > If you want to guarantee performnace of the "isolated" task... I don't > > see how that works. Other tasks on the system still compete for DRAM > > bandwidth, caches, etc... > > Applications which want to run as undisturbed as possible. There is > quite a range of those: > > - Hardware in the loop simulation is today often done with that crude > approach of "offlining" a CPU and then instead of playing dead > jumping to a preloaded bare metal executable. That's a horrible hack > and impossible to debug, but gives them the results they need to > achieve. These applications are well optimized vs. cache and memory > foot print, so they don't worry about these things too much and they > surely don't run on SMI and BIOS value add inflicted machines. > > Don't even think about waiting for an interrupt to achieve what > these folks are doing. So no, there are problems which a general > purpose realtime OS cannot solve ever. > > - HPC computations on large data sets. While the memory foot print is > large the access patterns are cache optimized. > > The problem there is that any unnecessary IPI, tick interrupt or > whatever nuisance is disturbing the carefully optimized cache usage > and alone getting rid of the timer interrupt gained them measurable > performance. Even very low single digit percentage of runtime saving > is valuable for these folks because the compute time on such beasts > is expensive. > > - Realtime guests in KVM. With posted interrupts and a fully populated > host side page table there is no point in running host side > interrupts or IPIs for random accounting or whatever purposes as > they affect the latency in the guest. With all the side effects > mitigated and a properly set up guest and host it is possible to get > to a zero exit situation after the bootup phase which means pretty > much matching bare metal behaviour. > > Yes, you can do that with e.g. Jailhouse as well, but you lose lots > of the fancy things KVM provides. And people care about these not > just because they are fancy. They care because their application > scenario needs them. > > There are more reasons why people want to be able to get as much > isolation from the OS as possible but at the same time have a sane > execution environment, debugging, performance monitoring and the OS > provided protection mechanisms instead of horrible hacks. > > Isolation makes sense for a range of applications and there is no reason > why Linux should not support them. One good client for the task isolation is Open Data Plane. There are even some code stubs supposed to enable isolation where needed. > > If you want to guarantee performnace of the "isolated" task... I don't > > see how that works. Other tasks on the system still compete for DRAM > > bandwidth, caches, etc... My experiments say that typical delay caused by dry IPI or syscall is 2000-20000 'ticks'. Typical delay caused by cache miss is 3-30 ticks. To guarantee cache / memory bandwidth, one can use resctrl. Linux has implementation of it for x86 only, but arm64 has support for for resctrl on CPU side. Thanks, Yury > Thanks, > > tglx _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel