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 D9503C2D0E4 for ; Tue, 17 Nov 2020 19:06:36 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 247472220B for ; Tue, 17 Nov 2020 19:06:35 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 247472220B 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 46B646B0036; Tue, 17 Nov 2020 14:06:35 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 41C426B005C; Tue, 17 Nov 2020 14:06:35 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2E41A6B0068; Tue, 17 Nov 2020 14:06:35 -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 F1C996B0036 for ; Tue, 17 Nov 2020 14:06:34 -0500 (EST) Received: from smtpin11.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id 7E92C3624 for ; Tue, 17 Nov 2020 19:06:34 +0000 (UTC) X-FDA: 77494841508.11.music01_100a2d527333 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin11.hostedemail.com (Postfix) with ESMTP id 45A3C180F8B82 for ; Tue, 17 Nov 2020 19:06:34 +0000 (UTC) X-HE-Tag: music01_100a2d527333 X-Filterd-Recvd-Size: 2232 Received: from gentwo.org (gentwo.org [3.19.106.255]) by imf46.hostedemail.com (Postfix) with ESMTP for ; Tue, 17 Nov 2020 19:06:33 +0000 (UTC) Received: by gentwo.org (Postfix, from userid 1002) id 422AD3F4C9; Tue, 17 Nov 2020 19:06:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by gentwo.org (Postfix) with ESMTP id 4017A3F1C3; Tue, 17 Nov 2020 19:06:33 +0000 (UTC) Date: Tue, 17 Nov 2020 19:06:33 +0000 (UTC) From: Christopher Lameter X-X-Sender: cl@www.lameter.com To: Matthew Wilcox cc: Marcelo Tosatti , linux-mm@kvack.org, Andrew Morton Subject: Re: [PATCH] mm: introduce sysctl file to flush per-cpu vmstat statistics In-Reply-To: <20201117180356.GT29991@casper.infradead.org> Message-ID: References: <20201117162805.GA274911@fuller.cnet> <20201117180356.GT29991@casper.infradead.org> 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 Tue, 17 Nov 2020, Matthew Wilcox wrote: > On Tue, Nov 17, 2020 at 01:28:06PM -0300, Marcelo Tosatti wrote: > > For isolated applications that busy loop (packet processing with DPDK, > > for example), workqueue functions either stall (if the -rt app priority > > is higher than kworker thread priority) or interrupt the -rt app > > (if the -rt app priority is lower than kworker thread priority. > > This seems a bit obscure to expect an application to do. Can we make > this happen automatically when we bind an rt task to a group of CPUs? Well the way we used it was just to let things be and run in the busy loop. There could be another flush of the vmstat data and then the vmstat worker will disable itself. So two more workqueue executions before the processor completely dies down. But then we also need a period like that to trigger the NOHZ logic to switch off the timer. Right? 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.