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 8A9CFC2D0E4 for ; Tue, 17 Nov 2020 20:23:59 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EDF342467B for ; Tue, 17 Nov 2020 20:23:58 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="h5YMp0h8" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EDF342467B 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 3CF5E6B0036; Tue, 17 Nov 2020 15:23:58 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 357A06B005C; Tue, 17 Nov 2020 15:23:58 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2201C6B0068; Tue, 17 Nov 2020 15:23:58 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0223.hostedemail.com [216.40.44.223]) by kanga.kvack.org (Postfix) with ESMTP id E61A46B0036 for ; Tue, 17 Nov 2020 15:23:57 -0500 (EST) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 8BA491EE6 for ; Tue, 17 Nov 2020 20:23:57 +0000 (UTC) X-FDA: 77495036514.26.bells76_38145a427334 Received: from filter.hostedemail.com (10.5.16.251.rfc1918.com [10.5.16.251]) by smtpin26.hostedemail.com (Postfix) with ESMTP id 6E2C91804B667 for ; Tue, 17 Nov 2020 20:23:57 +0000 (UTC) X-HE-Tag: bells76_38145a427334 X-Filterd-Recvd-Size: 4133 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by imf22.hostedemail.com (Postfix) with ESMTP for ; Tue, 17 Nov 2020 20:23:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1605644636; 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=M4/K13i/gDkeo7SUM6xn9dz8mY5P5nUUp4MlMl0XONw=; b=h5YMp0h8E2/OihOEETswYmg51hn9byFvbxFcGJLTvG+Aotm4gFNt3pXhNoh9oKwWnBsdMa ana/3Hamn6VjiF2ena0cWQFNx4+iWvaopi77L7aRSGNwbbTXjvF46+Q5+w0v26LtFmMmvM Zws0V1E6tRQoUn7EYFU3bH899nk+pBE= 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-353-1YiivpNhPk2Ndkkzw2Eyaw-1; Tue, 17 Nov 2020 15:23:49 -0500 X-MC-Unique: 1YiivpNhPk2Ndkkzw2Eyaw-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 331B9186DD2B; Tue, 17 Nov 2020 20:23:48 +0000 (UTC) Received: from fuller.cnet (ovpn-112-7.gru2.redhat.com [10.97.112.7]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B384C1841D; Tue, 17 Nov 2020 20:23:47 +0000 (UTC) Received: by fuller.cnet (Postfix, from userid 1000) id CFE27417F246; Tue, 17 Nov 2020 17:23:17 -0300 (-03) Date: Tue, 17 Nov 2020 17:23:17 -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: <20201117202317.GA282679@fuller.cnet> References: <20201117162805.GA274911@fuller.cnet> <20201117180356.GT29991@casper.infradead.org> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 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 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.