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=-7.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,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 42196C56202 for ; Tue, 24 Nov 2020 21:12:58 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 72F9720715 for ; Tue, 24 Nov 2020 21:12:57 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="SlsTsuL7" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 72F9720715 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 7A6826B006E; Tue, 24 Nov 2020 16:12:56 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 755F26B0070; Tue, 24 Nov 2020 16:12:56 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 644706B0071; Tue, 24 Nov 2020 16:12:56 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0238.hostedemail.com [216.40.44.238]) by kanga.kvack.org (Postfix) with ESMTP id 4AEAD6B006E for ; Tue, 24 Nov 2020 16:12:56 -0500 (EST) Received: from smtpin27.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id 0AEA3181AEF23 for ; Tue, 24 Nov 2020 21:12:56 +0000 (UTC) X-FDA: 77520561552.27.girls14_4b1519527371 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin27.hostedemail.com (Postfix) with ESMTP id EF78E3D668 for ; Tue, 24 Nov 2020 21:12:55 +0000 (UTC) X-HE-Tag: girls14_4b1519527371 X-Filterd-Recvd-Size: 4123 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf04.hostedemail.com (Postfix) with ESMTP for ; Tue, 24 Nov 2020 21:12:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1606252374; 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=NXDgjUSKVmaMxP5Ej5vJVP3Yboi59btyCQFSTLeCsr0=; b=SlsTsuL7hQdePZ8phPeG8x41bGGpQ9Snl30wZpgEYw9uYXwwB3vkhAYP6NGlHeh7LGuE1p vLzjH4u4j5nTd79tBW6ZXr4XMneAJAuDbCZbdsYL792HmEPvFu7lxyMwKqgNBfc+MEWjFw 6aH9RpByXuGH6HPi8abWSMPspI3ToPY= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-183-dCyNPPViNvmmpX4NcWdmLA-1; Tue, 24 Nov 2020 16:12:50 -0500 X-MC-Unique: dCyNPPViNvmmpX4NcWdmLA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F0A3880EDB7; Tue, 24 Nov 2020 21:12:48 +0000 (UTC) Received: from fuller.cnet (ovpn-112-5.gru2.redhat.com [10.97.112.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id AF1D11F0; Tue, 24 Nov 2020 21:12:48 +0000 (UTC) Received: by fuller.cnet (Postfix, from userid 1000) id 958BF416D899; Tue, 24 Nov 2020 16:52:03 -0300 (-03) Date: Tue, 24 Nov 2020 16:52:03 -0300 From: Marcelo Tosatti To: Vlastimil Babka Cc: Christopher Lameter , Matthew Wilcox , linux-mm@kvack.org, Andrew Morton , Linux API Subject: Re: [PATCH] mm: introduce sysctl file to flush per-cpu vmstat statistics Message-ID: <20201124195203.GB3635@fuller.cnet> References: <20201117162805.GA274911@fuller.cnet> <20201117180356.GT29991@casper.infradead.org> <20201117202317.GA282679@fuller.cnet> <72f598ea-9fdf-537d-0b3a-aac2251d347c@suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <72f598ea-9fdf-537d-0b3a-aac2251d347c@suse.cz> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 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 Tue, Nov 24, 2020 at 06:12:29PM +0100, Vlastimil Babka wrote: > On 11/20/20 7:20 PM, Christopher Lameter wrote: > > On Tue, 17 Nov 2020, Marcelo Tosatti wrote: > > > > > > So what we would need would be something like a sysctl that puts the > > > > system into a quiet state by completing all workqueue items. Idle all > > > > subsystems that need it and put the cpu into NOHZ mode. > > > > > > Are you suggesting that instead of a specific file to control vmstat > > > workqueue only, a more generic sysctl could be used? > > > > Yes. Introduce a sysctl to quiet down the system. Clean caches that will > > trigger kernel threads and whatever else is pending on that processor. > > Please CC linux-api on future postings that introduce stuff like this. Thanks, will do. > > > About NOHZ mode: the CPU should enter NOHZ automatically as soon as > > > there is a single thread running, so unclear why that would be needed. > > > > There are typically pending actions that still trigger interruptions. > > > > If you would immediately quiet down the system if there is only one thread > > runnable then you would compromise system performance through frequent > > counter folding and cache cleaning etc. > > If someone goes through the trouble of setting up NOHZ, these disruptions > should be only temporary and happen during the setup, no? There is no way for the userspace application to know when the disruptions are gone (vmstat work function executed). But yes, they are temporary and happen during setup.