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.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS 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 931C1C4361B for ; Mon, 7 Dec 2020 19:01:50 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 24A86238D6 for ; Mon, 7 Dec 2020 19:01:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 24A86238D6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linutronix.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4E9228D000B; Mon, 7 Dec 2020 14:01:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 499D38D0001; Mon, 7 Dec 2020 14:01:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 3D7EF8D000B; Mon, 7 Dec 2020 14:01:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0101.hostedemail.com [216.40.44.101]) by kanga.kvack.org (Postfix) with ESMTP id 2793B8D0001 for ; Mon, 7 Dec 2020 14:01:49 -0500 (EST) Received: from smtpin22.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id DC0D28249980 for ; Mon, 7 Dec 2020 19:01:48 +0000 (UTC) X-FDA: 77567405496.22.desk97_5415cda273e0 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin22.hostedemail.com (Postfix) with ESMTP id B617518038E67 for ; Mon, 7 Dec 2020 19:01:48 +0000 (UTC) X-HE-Tag: desk97_5415cda273e0 X-Filterd-Recvd-Size: 4133 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Mon, 7 Dec 2020 19:01:47 +0000 (UTC) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1607367705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=JSbzXyB7mHExeF65teMUaleQsoQyg1vAvrs5K1V5uHA=; b=aPmp5JyO/DTE1l5EooqkvAHvoiDyHWniabh/ZtJcENYCPs5JB+l3rYvoXwkXfB/AIpLt87 6/nHVVPlv+BURx97f0TdX2V1NR0fHIljWKbKU+XqknQ6+iqfR3tTKVkFBZmAKTJGkJ4hjT PhuxwBxOWGGXZDDe1N0aWwRoo+rK7oJ5619vj8oVM0Vieb/1wtdrE2BOmYmHPll1WFt92h Bw4y315YMV00eCtwpw9IO/agNcc6qJEY6tNAmw2vGMbqmp+F4DMq0VZrmblukNRs008DEd MgqK6NRn5t4ujWDPwyWPhOios1VpsoyorBTFwkGDd668K7fGPO42R0qRRKmORA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1607367705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=JSbzXyB7mHExeF65teMUaleQsoQyg1vAvrs5K1V5uHA=; b=TDMyc9ZKuuemRztHXCuvU2XRh0p+PbCCLTpfksVEC3l3h0YYP2Kgog5P5t+8msRpEN8sq2 iIQhXcoI3BmdpeDA== To: Christoph Lameter 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: <87lfe961jk.fsf@nanos.tec.linutronix.de> References: <20201117162805.GA274911@fuller.cnet> <20201117180356.GT29991@casper.infradead.org> <20201117202317.GA282679@fuller.cnet> <20201127154845.GA9100@fuller.cnet> <87h7p4dwus.fsf@nanos.tec.linutronix.de> <87v9djd1db.fsf@nanos.tec.linutronix.de> <87lfe961jk.fsf@nanos.tec.linutronix.de> Date: Mon, 07 Dec 2020 20:01:45 +0100 Message-ID: <87im9d4ezq.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain 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 Mon, Dec 07 2020 at 17:09, Thomas Gleixner wrote: > On Mon, Dec 07 2020 at 08:08, Christoph Lameter wrote: >> This a clearly defined set of functions and I am not sure how policy fits >> into that. > > It's about silencing different and largely independent parts of the OS > on a particular CPU. Just defining upfront that there is only the choice > of all or nothing _is_ policy. Plus about the way to silence them because that's a matter of costs. Depending on the usage scenario you want to carefully weigh the costs against the benefits. If you go into I/O polling forever you don't care how long it takes to fully quiesce the CPU. It simply does not matter at all. In a real-world usecase we had the situation of compute bursts and an unfortunate hw enforced requirement to go into the kernel between them for synchronization between the compute threads and hardware (A quick hardware assisted save/load). Unmodified NOHZ full accumulated to more than 6% loss compared to a fully undisturbed run. Most of it was caused by cache effects and not by the actually used CPU time. A full enforced quiescing upfront gained ~2-3%, but a lazy approach of accepting that some stuff might happen once and does not happen again gained almost 5%. In that particular scenario 5% _is_ a huge win. There is a world outside of the high frequency gambling bubble and there is neither a technical nor a justification to declare that everything has to be a nail just because the kernel provides is a hammer. Thanks, tglx