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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id DCB56C32771 for ; Sun, 25 Sep 2022 01:05:28 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E697E8E0018; Sat, 24 Sep 2022 21:05:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E192D8E0007; Sat, 24 Sep 2022 21:05:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CE03F8E0018; Sat, 24 Sep 2022 21:05:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id BA47E8E0007 for ; Sat, 24 Sep 2022 21:05:27 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 8350CC0480 for ; Sun, 25 Sep 2022 01:05:27 +0000 (UTC) X-FDA: 79948814694.09.B07CDBC Received: from mail3-165.sinamail.sina.com.cn (mail3-165.sinamail.sina.com.cn [202.108.3.165]) by imf27.hostedemail.com (Postfix) with ESMTP id 465FF40003 for ; Sun, 25 Sep 2022 01:05:24 +0000 (UTC) Received: from unknown (HELO localhost.localdomain)([114.249.60.74]) by sina.com (172.16.97.32) with ESMTP id 632FA8F10001B3E7; Sun, 25 Sep 2022 09:03:47 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com X-SMAIL-MID: 424420630201 From: Hillf Danton To: Aaron Tomlin Cc: frederic@kernel.org, mtosatti@redhat.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v8 5/5] tick/sched: Ensure quiet_vmstat() is called when the idle tick was stopped too Date: Sun, 25 Sep 2022 09:05:11 +0800 Message-Id: <20220925010511.1482-1-hdanton@sina.com> In-Reply-To: <20220924152441.822460-1-atomlin@redhat.com> References: <20220924152227.819815-1-atomlin@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1664067927; a=rsa-sha256; cv=none; b=adXvKIuAgrwqImhhLx/N4f+SsWqKzESIhVfiaLZk68nRBf0QZL4kGvDMe6adbfTBPsSp2f 2hux0SA3+nFF4WfyCBuTGY7LY3SCG5bJdPG4UkV3NmHTIYGAJknBr5WzznDx9E5nrXGTEY 7ogO3B+JeYVdM/khxZq1FGGFCc7wWzU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1664067927; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Rsu3sackevG2Zkwl5J/YGVjzfR+P2GpyJutOfofAygk=; b=ahPR2nssdfNRFn3Yp9X4mGK00s2hdiouFEOtgIBetdtqhzrnZ//neHY38lrJmNBrFgFgOQ 1gfbou/ktbb+LQ0cWSLFj3uvV9JEzeT00aQ7pi/BKvZCJAq8ePge3LxZNyDNeaws+V0We1 EHQyddSbyuC72DeQKSfX+Jj36y9xtko= ARC-Authentication-Results: i=1; imf27.hostedemail.com; dkim=none; spf=pass (imf27.hostedemail.com: domain of hdanton@sina.com designates 202.108.3.165 as permitted sender) smtp.mailfrom=hdanton@sina.com; dmarc=none X-Stat-Signature: frg8ww9dcautfww4z3qry4t7pc64aaen X-Rspamd-Queue-Id: 465FF40003 Authentication-Results: imf27.hostedemail.com; dkim=none; spf=pass (imf27.hostedemail.com: domain of hdanton@sina.com designates 202.108.3.165 as permitted sender) smtp.mailfrom=hdanton@sina.com; dmarc=none X-Rspamd-Server: rspam02 X-Rspam-User: X-HE-Tag: 1664067924-966829 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 24 Sep 2022 16:24:41 +0100 Aaron Tomlin wrote: > > In the context of the idle task and an adaptive-tick mode/or a nohz_full > CPU, quiet_vmstat() can be called: before stopping the idle tick, > entering an idle state and on exit. In particular, for the latter case, > when the idle task is required to reschedule, the idle tick can remain > stopped and the timer expiration time endless i.e., KTIME_MAX. Now, > indeed before a nohz_full CPU enters an idle state, CPU-specific vmstat > counters should be processed to ensure the respective values have been > reset and folded into the zone specific 'vm_stat[]'. That being said, it > can only occur when: the idle tick was previously stopped, and > reprogramming of the timer is not required. > > A customer provided some evidence which indicates that the idle tick was > stopped; albeit, CPU-specific vmstat counters still remained populated. > Thus one can only assume quiet_vmstat() was not invoked on return to the > idle loop. Why did housekeeping CPUs fail to do their works, with this assumption put aside? > [ log message of > [PATCH v8 3/5] mm/vmstat: Do not queue vmstat_update if tick is stopped > > From the vmstat shepherd, for CPUs that have the tick stopped, do not > queue local work to flush the per-CPU vmstats, since in that case the > flush is performed on return to userspace or when entering idle. > Also cancel any delayed work on the local CPU, when entering idle on nohz > full CPUs. Per-CPU pages can be freed remotely from housekeeping CPUs. > > end of log message]