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 9A28FC433F5 for ; Mon, 25 Apr 2022 14:06:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 205DB6B0075; Mon, 25 Apr 2022 10:06:08 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 18E856B0078; Mon, 25 Apr 2022 10:06:08 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 030CE6B007B; Mon, 25 Apr 2022 10:06:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.27]) by kanga.kvack.org (Postfix) with ESMTP id E91086B0075 for ; Mon, 25 Apr 2022 10:06:07 -0400 (EDT) Received: from smtpin28.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id CE8BC80986 for ; Mon, 25 Apr 2022 14:06:07 +0000 (UTC) X-FDA: 79395575574.28.326F472 Received: from gentwo.de (gentwo.de [161.97.139.209]) by imf08.hostedemail.com (Postfix) with ESMTP id 29F9A160035 for ; Mon, 25 Apr 2022 14:06:02 +0000 (UTC) Received: by gentwo.de (Postfix, from userid 1001) id C740DB007C2; Mon, 25 Apr 2022 16:06:04 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gentwo.de; s=default; t=1650895564; bh=nDKTXvgIrS0KW55Y8bufayt9wZdLWKMW/+y5ICeabUg=; h=Date:From:To:cc:Subject:In-Reply-To:References:From; b=HUuJvmqsL7jRfNorE28mQo/poBW1j2BTtD+bAkVS0T2ya8XCyVi6D6LmbvBwM9ZTQ w7uRR+5vOektZFT775qvqH1rkaDOXVQadFuq5m7fcwiMI8X+mttqoaJounXE2plgKJ zgbkKdWGpTyGl9KPIjyXN06vx0uesngoxynakt5ApbNgzkR4dr55macmGAIyf0YG7t 18z5bg6hMaAJHJt9CaTI6UhZLiqE1RsBp7ll/UBEEaqxxewjCncuX2+LQFA9DrkPyj fxZYsmCL0d8dEfO0Ij8cXUEC+hipz/sIRRWwDT7Mzzn1EfLylaF1xkICRIz74FMT/E 1gUlxM8QLcUpw== Received: from localhost (localhost [127.0.0.1]) by gentwo.de (Postfix) with ESMTP id C5F84B0072F; Mon, 25 Apr 2022 16:06:04 +0200 (CEST) Date: Mon, 25 Apr 2022 16:06:04 +0200 (CEST) From: Christoph Lameter To: Peter Zijlstra cc: Aaron Tomlin , frederic@kernel.org, mtosatti@redhat.com, tglx@linutronix.de, mingo@kernel.org, pauld@redhat.com, neelx@redhat.com, oleksandr@natalenko.name, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [RFC PATCH v3] tick/sched: Ensure quiet_vmstat() is called when the idle tick was stopped too In-Reply-To: <20220425132700.GK2731@worktop.programming.kicks-ass.net> Message-ID: References: <20220422193647.3808657-1-atomlin@redhat.com> <20220425113909.u3smtztp66svlw4o@ava.usersys.com> <20220425132700.GK2731@worktop.programming.kicks-ass.net> User-Agent: Alpine 2.22 (DEB 394 2020-01-19) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 29F9A160035 Authentication-Results: imf08.hostedemail.com; dkim=pass header.d=gentwo.de header.s=default header.b=HUuJvmqs; spf=pass (imf08.hostedemail.com: domain of cl@gentwo.de designates 161.97.139.209 as permitted sender) smtp.mailfrom=cl@gentwo.de; dmarc=pass (policy=none) header.from=gentwo.de X-Rspam-User: X-Stat-Signature: k5g8p81c51pxzesqeq9wzorm3m3ihwhw X-HE-Tag: 1650895562-86333 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 Mon, 25 Apr 2022, Peter Zijlstra wrote: > > Folding the vmstat diffs *always* when entering idle prevents unnecessary > > wakeups and processing in the future and also provides more accurate > > counters for the VM allowing better decision to be made on reclaim. > > I'm thinking you're going to find a ton of regressions if you try it > though; some workloads go idle *very* shortly, doing all this accounting > is going to be counter-productive. Well there is usually not much to do in terms of accounting. If there are a lot of updates then it is worthwhile because if the numbers are off too much then the VM has trouble assessing its own situation. It may depend though on how long the idle periods are. Do we have statistics on the duration? Always folding the vmstat deltas may also increase the length of the idle periods.