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=-5.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 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 55AA4C64E7B for ; Wed, 2 Dec 2020 17:43:51 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 98DB92086A for ; Wed, 2 Dec 2020 17:43:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 98DB92086A Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id C51846B0036; Wed, 2 Dec 2020 12:43:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id C012A6B005C; Wed, 2 Dec 2020 12:43:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B17696B005D; Wed, 2 Dec 2020 12:43:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0173.hostedemail.com [216.40.44.173]) by kanga.kvack.org (Postfix) with ESMTP id 9B3786B0036 for ; Wed, 2 Dec 2020 12:43:49 -0500 (EST) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 627A91EFD for ; Wed, 2 Dec 2020 17:43:49 +0000 (UTC) X-FDA: 77549064978.05.power09_0b005df273b5 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id 44DD5180163CD for ; Wed, 2 Dec 2020 17:43:49 +0000 (UTC) X-HE-Tag: power09_0b005df273b5 X-Filterd-Recvd-Size: 4292 Received: from gentwo.org (gentwo.org [3.19.106.255]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Wed, 2 Dec 2020 17:43:48 +0000 (UTC) Received: by gentwo.org (Postfix, from userid 1002) id 0A6E53F1E1; Wed, 2 Dec 2020 17:43:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 07FA43EF55; Wed, 2 Dec 2020 17:43:48 +0000 (UTC) Date: Wed, 2 Dec 2020 17:43:48 +0000 (UTC) From: Christoph Lameter X-X-Sender: cl@www.lameter.com To: Thomas Gleixner cc: Marcelo Tosatti , Matthew Wilcox , linux-mm@kvack.org, Andrew Morton , Alex Belits , Phil Auld , Frederic Weisbecker , Peter Zijlstra Subject: Re: [PATCH] mm: introduce sysctl file to flush per-cpu vmstat statistics In-Reply-To: <87h7p4dwus.fsf@nanos.tec.linutronix.de> Message-ID: References: <20201117162805.GA274911@fuller.cnet> <20201117180356.GT29991@casper.infradead.org> <20201117202317.GA282679@fuller.cnet> <20201127154845.GA9100@fuller.cnet> <87h7p4dwus.fsf@nanos.tec.linutronix.de> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, 2 Dec 2020, Thomas Gleixner wrote: > prctl() is the right thing to do. Ok great consensus on that one. > >> In addition to quiescing pending activities on the CPU, it would > >> also be useful to assign a per-task attribute (which is then assigned > >> to a per-CPU attribute), indicating whether that CPU is running > >> an isolated task or not. > > > > Sounds good but what would this do? Give a warning like the isolation > > patchset? > > This all needs a lot more thought about the overall picture. We already > have too many knobs and ad hoc hooks which fiddle with isolation. > > The current CPU isolation is a best effort approach and I agree that for > more strict isolation modes we need to be able to enforce that and hunt > down offenders and think about them one by one. There are two apprahces actually to make the OS quiet. One is the best effort approach which is more like the current NOHZ one with additional actions to flush things. The other is the strict approach were one wants a guarantee that the OS does not do anything at all. > > >> To be called before real time loop, one would have: > > Can we please agree in the first place, that "real time" is absolutely > the wrong term here? Sorry I once swore that I would not use real time since that term is so damaged by multiple meanings and marketing endeavor. "to be called before a loop without any disturbance by the operating system" > It's about running undisturbed CPU bound computations whatever nature > they are. It does not matter whether that loop does busy polling ala > DPDK, whether it runs a huge math computation on a data set or > whatever people come up with. Right. > > Often code can tolerate a few interruptions (in some code branches > > regular syscalls may be needed) but one wants the thread to be > > as quiet as possible. > > So you say some code can tolerate a few interrupts, then comes Alex and > says 'no disturbance' at all. Yes that is the current NOHZ approach. You switch it on and after the OS detects are polling loop it will quiet things down. Instead of detecting it we are actively telling the OS to quiet down now. > We really need to stop to look at particular workloads and defining > adhoc solutions tailored to their particular itch if we don't want to > end up with an uncoordinated and unmaintainable zoo of interfaces, hooks > and knobs. True....Multiple subsystem needs to be hooked into this to quiet things down. > That allows Marcelo to start tackling the vmstat side and Alex can > utilize that and build the other parts into it piece by piece. Yup. I agree.