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 52941C63798 for ; Fri, 20 Nov 2020 18:03:10 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id CA67F206B7 for ; Fri, 20 Nov 2020 18:03:09 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Tcip3u8U" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CA67F206B7 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 4F3CE6B0072; Fri, 20 Nov 2020 13:03:09 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 4A3546B0073; Fri, 20 Nov 2020 13:03:09 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 36BEE6B0074; Fri, 20 Nov 2020 13:03:09 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 07EF26B0072 for ; Fri, 20 Nov 2020 13:03:08 -0500 (EST) Received: from smtpin05.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id A49198249980 for ; Fri, 20 Nov 2020 18:03:08 +0000 (UTC) X-FDA: 77505568056.05.scale80_3b1199b2734d Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin05.hostedemail.com (Postfix) with ESMTP id 849041826B6C1 for ; Fri, 20 Nov 2020 18:03:08 +0000 (UTC) X-HE-Tag: scale80_3b1199b2734d X-Filterd-Recvd-Size: 4342 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [63.128.21.124]) by imf27.hostedemail.com (Postfix) with ESMTP for ; Fri, 20 Nov 2020 18:03:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605895386; 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=PXuZd+r7Gpg3S7NcYossMNAies2VWLYlPRKDy0lFLy0=; b=Tcip3u8UZ3wus6EcKanj1zpQhAT/8+8K9uN46HIGyEb5b9k0DqzVghGndQEg7NVOh5lmUt D0ivEAERN/JmfZKidE/+8dxK+JAIQxruK8Bxn0h0hdo85tjfziwjBWagdjfdmHR7aQFXGD K26Wh2FYbJfLAOiWssL7jaz9KmqT8WA= 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-446-_plXQbL6OOOguxgsa6I9QQ-1; Fri, 20 Nov 2020 13:03:02 -0500 X-MC-Unique: _plXQbL6OOOguxgsa6I9QQ-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 CDDE31015C83; Fri, 20 Nov 2020 18:03:01 +0000 (UTC) Received: from fuller.cnet (ovpn-112-9.gru2.redhat.com [10.97.112.9]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8D8DB6064B; Fri, 20 Nov 2020 18:03:01 +0000 (UTC) Received: by fuller.cnet (Postfix, from userid 1000) id B8C09416D864; Fri, 20 Nov 2020 15:02:32 -0300 (-03) Date: Fri, 20 Nov 2020 15:02:32 -0300 From: Marcelo Tosatti To: Christopher Lameter Cc: Matthew Wilcox , linux-mm@kvack.org, Andrew Morton Subject: Re: [PATCH] mm: introduce sysctl file to flush per-cpu vmstat statistics Message-ID: <20201120180232.GA60575@fuller.cnet> References: <20201117162805.GA274911@fuller.cnet> <20201117180356.GT29991@casper.infradead.org> <20201117202317.GA282679@fuller.cnet> MIME-Version: 1.0 In-Reply-To: <20201117202317.GA282679@fuller.cnet> User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=mtosatti@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 05:23:17PM -0300, Marcelo Tosatti wrote: > 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? > > The application should not start its time sensitive loop until the > workqueues have finished execution. > > > 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? > > 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. > > Thanks. Hi Christoph, Can you expand on the suggestion? TIA