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=-3.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,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 0A12BC2D0E4 for ; Tue, 17 Nov 2020 19:09:37 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 09DC824199 for ; Tue, 17 Nov 2020 19:09:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="UIIBD8tn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 09DC824199 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id 4B6826B0036; Tue, 17 Nov 2020 14:09:35 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 43E5A6B005C; Tue, 17 Nov 2020 14:09:35 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 305B46B0068; Tue, 17 Nov 2020 14:09:35 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0098.hostedemail.com [216.40.44.98]) by kanga.kvack.org (Postfix) with ESMTP id F28506B0036 for ; Tue, 17 Nov 2020 14:09:34 -0500 (EST) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 9F0EF8249980 for ; Tue, 17 Nov 2020 19:09:34 +0000 (UTC) X-FDA: 77494849068.28.cars57_0c0e81727334 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin28.hostedemail.com (Postfix) with ESMTP id 778B36C3B for ; Tue, 17 Nov 2020 19:09:34 +0000 (UTC) X-HE-Tag: cars57_0c0e81727334 X-Filterd-Recvd-Size: 3154 Received: from casper.infradead.org (casper.infradead.org [90.155.50.34]) by imf46.hostedemail.com (Postfix) with ESMTP for ; Tue, 17 Nov 2020 19:09:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=JNwhVR99ocXAajb6ZUgZz9EjWDerScRl3YCjCsqsxbQ=; b=UIIBD8tnrZL6TrOgMp2P5kiOoC dimE62lK1BA6PGg40AcYSegVLFS+PlL1Gm+tBtIA/jq1/plssfzE6tmnePcgXYi3hFel98RdEjV7w GlmsH/2pPk95YRsJpOaxAr+EZ09oLATDn2Z4rSz9MAJYnK7+gb2g53MfIXxMVsRgED3KwS9qKVKKP svLrPE6eRFIPkdSPWNhHB5CGKBK1GYkbz80rIrftEazBAhSPEEtmjZ1eMPM5iWirFZ5gk3hzE82dZ j1xlthGOND9mb7uJaaWWKyPAMCrKZ/yzXzcFC+b/7zLytZ66WzpqxgR5+k2vOO5zpiSBcrVNBLSm2 qrs+E5hw==; Received: from willy by casper.infradead.org with local (Exim 4.92.3 #3 (Red Hat Linux)) id 1kf6M3-0004KO-0v; Tue, 17 Nov 2020 19:09:27 +0000 Date: Tue, 17 Nov 2020 19:09:26 +0000 From: Matthew Wilcox To: Christopher Lameter Cc: Marcelo Tosatti , linux-mm@kvack.org, Andrew Morton Subject: Re: [PATCH] mm: introduce sysctl file to flush per-cpu vmstat statistics Message-ID: <20201117190926.GU29991@casper.infradead.org> References: <20201117162805.GA274911@fuller.cnet> <20201117180356.GT29991@casper.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 17, 2020 at 07:06:33PM +0000, Christopher Lameter wrote: > 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. Why does it need to be something userspace does? It would seem reasonable that the kernel could figure out for itself that it's about to start this CPU operating in isolated mode and flush all the work first?