Received: by 2002:a05:6602:2086:0:0:0:0 with SMTP id a6csp3131154ioa; Mon, 25 Apr 2022 18:49:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyligEleZfQ4lPvwem/4nCbTdoc+sA0Een2ZCCeNQ0Uv/YZgzSI305hnGd7IyGN+BCXohw7 X-Received: by 2002:a05:6402:2920:b0:425:d7c7:41f with SMTP id ee32-20020a056402292000b00425d7c7041fmr12968674edb.370.1650937754290; Mon, 25 Apr 2022 18:49:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650937754; cv=none; d=google.com; s=arc-20160816; b=UQiDdS9x7z50itOAAy2b67YahRp82+T5ynSDHa+DcJuTEQ+NaFJMjCd8g6F7MqCuv9 ZpHg/XmvSBh0lK8b2F4BrTGjPFC6iYvFbUPy1W+GkJSGiBG8gN7XaorziLECmwipP5YS XVyPhPGck/i8lvZgouOEvBg1FALyQzqxSUuIgVL7zjVeXPdyX2uKFSw0cpV4E+njZp1u pCg+UDWeUx8Y7aLadDxSfAfbEBx4//UAixzYSxlO8EnK5QIxWe4ciE0uZ6BWlzf6sHXO aVrcDnIgYASMNZdY6+xcRM6I99kV5beGmTIVK6kx9aGntfKi4tQWo6fo03fZmuarcndM 7fwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date:dkim-signature; bh=nDKTXvgIrS0KW55Y8bufayt9wZdLWKMW/+y5ICeabUg=; b=JWLJnhhJB1ktbO9vhJbPlgcVXVhNBww3rHL0oV5AOt8WVHV68xbUy+j5I32PksE4O6 E5yyP+nm1QW7lik3wZvVSBAt5Ejodd1bCvN0HVQ/y60pMiL/ZD4q0mZR/ySW3yC6/95Q 6+oRPtLNkGD3U1VlXf7uhffjIczOKs0J7zBurZVavgexwsJhc3RuuriL7xILQlANpane Y84MePRAoftYu3ZJPFDCDV5z1/rpbokI0f9mIjSyEVzNkk5EwzakX2R98PlLnmBmp6oK rocsWZ7PRPHwq22itokFL/HYAW1PWn9Acdghc2usHqkuAsEzbEh+2bdICbjCWYm+fV+I rcmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gentwo.de header.s=default header.b=HUuJvmqs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gentwo.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z15-20020a05640235cf00b0041d76544adcsi15450033edc.542.2022.04.25.18.48.50; Mon, 25 Apr 2022 18:49:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gentwo.de header.s=default header.b=HUuJvmqs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gentwo.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242117AbiDYOJT (ORCPT + 99 others); Mon, 25 Apr 2022 10:09:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242356AbiDYOJN (ORCPT ); Mon, 25 Apr 2022 10:09:13 -0400 Received: from gentwo.de (gentwo.de [IPv6:2a02:c206:2048:5042::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90DD417E22 for ; Mon, 25 Apr 2022 07:06:06 -0700 (PDT) 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-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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.