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.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,NICE_REPLY_A,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 49C95C63777 for ; Tue, 24 Nov 2020 17:15:17 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7E90B206F7 for ; Tue, 24 Nov 2020 17:15:16 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7E90B206F7 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 8B9B56B0070; Tue, 24 Nov 2020 12:15:15 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 86A636B0071; Tue, 24 Nov 2020 12:15:15 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7A74E6B0073; Tue, 24 Nov 2020 12:15:15 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0045.hostedemail.com [216.40.44.45]) by kanga.kvack.org (Postfix) with ESMTP id 617606B0070 for ; Tue, 24 Nov 2020 12:15:15 -0500 (EST) Received: from smtpin25.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 99F693633 for ; Tue, 24 Nov 2020 17:15:13 +0000 (UTC) X-FDA: 77519962506.25.story30_34052aa2736f Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin25.hostedemail.com (Postfix) with ESMTP id C8A95180397F0 for ; Tue, 24 Nov 2020 17:12:31 +0000 (UTC) X-HE-Tag: story30_34052aa2736f X-Filterd-Recvd-Size: 2622 Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by imf11.hostedemail.com (Postfix) with ESMTP for ; Tue, 24 Nov 2020 17:12:31 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id CA717AC90; Tue, 24 Nov 2020 17:12:29 +0000 (UTC) Subject: Re: [PATCH] mm: introduce sysctl file to flush per-cpu vmstat statistics To: Christopher Lameter , Marcelo Tosatti Cc: Matthew Wilcox , linux-mm@kvack.org, Andrew Morton , Linux API References: <20201117162805.GA274911@fuller.cnet> <20201117180356.GT29991@casper.infradead.org> <20201117202317.GA282679@fuller.cnet> From: Vlastimil Babka Message-ID: <72f598ea-9fdf-537d-0b3a-aac2251d347c@suse.cz> Date: Tue, 24 Nov 2020 18:12:29 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.4.3 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit 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 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. >> 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?