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 E02A4C433FE for ; Mon, 3 Oct 2022 12:44:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0B9546B0072; Mon, 3 Oct 2022 08:44:52 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 068336B0073; Mon, 3 Oct 2022 08:44:52 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E717E8E0001; Mon, 3 Oct 2022 08:44:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id D3CE76B0072 for ; Mon, 3 Oct 2022 08:44:51 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 96CE71C5F9E for ; Mon, 3 Oct 2022 12:44:51 +0000 (UTC) X-FDA: 79979607582.06.8A69B04 Received: from mail3-166.sinamail.sina.com.cn (mail3-166.sinamail.sina.com.cn [202.108.3.166]) by imf24.hostedemail.com (Postfix) with ESMTP id 51FA5180018 for ; Mon, 3 Oct 2022 12:44:48 +0000 (UTC) Received: from unknown (HELO localhost.localdomain)([114.249.56.115]) by sina.com (172.16.97.23) with ESMTP id 633AD8E500028F9E; Mon, 3 Oct 2022 20:43:19 +0800 (CST) X-Sender: hdanton@sina.com X-Auth-ID: hdanton@sina.com X-SMAIL-MID: 50903454919665 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: Mon, 3 Oct 2022 20:44:35 +0800 Message-Id: <20221003124435.1769-1-hdanton@sina.com> In-Reply-To: <20220926092004.to2zrcxjz5oj3lid@ava.usersys.com> References: <20220924152227.819815-1-atomlin@redhat.com> <20220925010511.1482-1-hdanton@sina.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1664801091; a=rsa-sha256; cv=none; b=p0bW5J54oeCSsmlCmrsVDHSupjRDguz1oDMcacNXJulhWf9emTv5zJbhzJ+FWWgmp9RVmo H2RH6IBcMcmFQuculycUPF89spSH7nkAXmmLXfWTckYllvSgnMh2glGIk9mFbSVlB7S2AG jdBsOjgNRMcml82Jrd1BKXyIA39NI0o= ARC-Authentication-Results: i=1; imf24.hostedemail.com; dkim=none; spf=pass (imf24.hostedemail.com: domain of hdanton@sina.com designates 202.108.3.166 as permitted sender) smtp.mailfrom=hdanton@sina.com; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1664801091; 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=sUnp0uuFqIA5Wi7bzR6pgkuPtUOWEkbqFQrmtv+xerE=; b=QpkWMXjO4WA3PgiPdYenA+h0pW6rsd+8G3fY+bzDfEmuaRqsDG0jZKhL77D8nMQ3YQMpeV +5ZwU/NqNSS0UiaX0D3kI2uXMcOpQHFNkiwHasYa/K3NfS3JfLpshQnHBve/+XeXdSKtRS eGotC7IbCztfE6n4jeAJCnUjAFPB15w= X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: 51FA5180018 X-Rspam-User: Authentication-Results: imf24.hostedemail.com; dkim=none; spf=pass (imf24.hostedemail.com: domain of hdanton@sina.com designates 202.108.3.166 as permitted sender) smtp.mailfrom=hdanton@sina.com; dmarc=none X-Stat-Signature: f9tp1numrj9pnm4m37q1t5r493zzjc7b X-HE-Tag: 1664801088-84244 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 26 Sep 2022 10:20:04 +0100 Aaron Tomlin wrote: > On Sun 2022-09-25 09:05 +0800, Hillf Danton wrote: > > 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? > > Hi Hillf, > > I'm not sure I understand your question. > > In this context, when tick processing is stopped, delayed work is not going > to be handled until the CPU exits idle. Given work canceled because per-CPU pages can be freed remotely from housekeeping CPUs (see patch 3/5), what is added here is not needed. IOW which one is incorrect? BTW given delayed work is not going to be handled until the CPU exits idle, canceling work is noop in 3/5, despite what the vmstat shepherd does depends not on tick.