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 BDD11C433EF for ; Wed, 16 Feb 2022 14:34:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 172126B0073; Wed, 16 Feb 2022 09:34:18 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 0F8646B0074; Wed, 16 Feb 2022 09:34:18 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E8D406B0078; Wed, 16 Feb 2022 09:34:17 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id D6A106B0073 for ; Wed, 16 Feb 2022 09:34:17 -0500 (EST) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 94C0F21063 for ; Wed, 16 Feb 2022 14:34:17 +0000 (UTC) X-FDA: 79148888154.01.1F3E29A Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf12.hostedemail.com (Postfix) with ESMTP id 0358A4000F for ; Wed, 16 Feb 2022 14:34:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645022056; 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=uAZTsZWbYnZinl4NvmWIbH2gwEcwA0kzPtah3A0t9z8=; b=KAmkwMMixQlpoQ+saS9f/0n5o0aU3bihhgH2kuA+fteuWo02vh8oy753wtGe9QmOuf75NN Im+mWppdliwKJjelfHmmrH/6rmI8ou8k+qZLbp5hq2tH6p4bPfFP7X8P2bMPgSIy07ld26 HT3WMI26MIfhQayKuVVzB6O5QeHj8n8= Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-536-TnrkKYY8NBi24s5QkdJc_g-1; Wed, 16 Feb 2022 09:34:15 -0500 X-MC-Unique: TnrkKYY8NBi24s5QkdJc_g-1 Received: by mail-wr1-f70.google.com with SMTP id e1-20020adfa741000000b001e2e74c3d4eso1146295wrd.12 for ; Wed, 16 Feb 2022 06:34:15 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=uAZTsZWbYnZinl4NvmWIbH2gwEcwA0kzPtah3A0t9z8=; b=2rLqMd41a0Up5kxkM1gumpLaAboNownavzdGnvAAnZ3CUUukhFV6u87+CiGMITxslx tNBlNVg8IpWehF1IVz10heX/K4dvgaeKDSyo//pTwM2US06o1afbOppEsYxBY6/g5OKU JOMgpNDeR5EbTlLAUjn6aLHeFm2HChAtnqkLPUvohmGVpoLWKNLVAcmq7KFVYKN0WOIw FC0mzzNBUGRapHBnjMkXqTXxDiu2bJ4YwFO7ETbU7xs61N1TLTFPPDEAFQWEDdiRrEfu cI6GdKRceC5lQagLwnhjIfXyvB2Dbqr+KjDoFXGe772xWTYN5UvUVCzh6SvoxhBWsQLq bTVw== X-Gm-Message-State: AOAM532F0ufO21kIq97n/qvkYct7DqVNB7Fet+PU/lcFyOidp/8GWOU1 P8FWp0qLuq6kQHmFKKX/rwKmjR70b1qBPxljnXG1shKsI8NGZSjdYz6OvMvoSbKHUaCIi75gvYz KConmMbL+pw== X-Received: by 2002:a05:600c:364a:b0:37b:ac5d:b77b with SMTP id y10-20020a05600c364a00b0037bac5db77bmr1893322wmq.82.1645022054232; Wed, 16 Feb 2022 06:34:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJzzApKQp57v8R5P0ECy6xhaxHgRhVyGNnH56VU0prns/IVuxgeGt0IWLf+ZxRJdmdEh/jD6kg== X-Received: by 2002:a05:600c:364a:b0:37b:ac5d:b77b with SMTP id y10-20020a05600c364a00b0037bac5db77bmr1893300wmq.82.1645022053978; Wed, 16 Feb 2022 06:34:13 -0800 (PST) Received: from localhost (cpc111743-lutn13-2-0-cust979.9-3.cable.virginm.net. [82.17.115.212]) by smtp.gmail.com with ESMTPSA id l12sm32506343wrs.11.2022.02.16.06.34.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 06:34:13 -0800 (PST) Date: Wed, 16 Feb 2022 14:34:12 +0000 From: Aaron Tomlin To: Phil Auld Cc: frederic@kernel.org, tglx@linutronix.de, mingo@kernel.org, mingo@redhat.com, atomlin@atomlin.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [RFC PATCH] tick/sched: Ensure quiet_vmstat() is called when the idle tick was stopped too Message-ID: <20220216143412.dwxjlkq4w2zeweld@ava.usersys.com> X-PGP-Key: http://pgp.mit.edu/pks/lookup?search=atomlin%40redhat.com X-PGP-Fingerprint: 7906 84EB FA8A 9638 8D1E 6E9B E2DE 9658 19CC 77D6 References: <20220203214339.1889971-1-atomlin@redhat.com> MIME-Version: 1.0 In-Reply-To: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Rspamd-Server: rspam09 X-Rspamd-Queue-Id: 0358A4000F X-Rspam-User: Authentication-Results: imf12.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=KAmkwMMi; spf=none (imf12.hostedemail.com: domain of atomlin@redhat.com has no SPF policy when checking 170.10.133.124) smtp.mailfrom=atomlin@redhat.com; dmarc=pass (policy=none) header.from=redhat.com X-Stat-Signature: j93oa18etradb9sj3sgiaoj3ntx7bh8h X-HE-Tag: 1645022056-236936 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000040, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Thu 2022-02-03 17:22 -0500, Phil Auld wrote: > As I said earlier, I don't think you want to call quiet_vmstat() > unconditionally. And I don't think this will catch the cases you are > trying to fix. Once the tick is stopped tick_nohz_stop_tick should not be > getting called again until it's been restarted. Phil, Sorry about the delay. If I understand correctly, I see a scenario by which tick_nohz_stop_tick() can be called on transition/or exit from idle (e.g. default_idle_call()): 1. The idle/or scheduling-clock was previously stopped 2. It is considered safe for the scheduling-clock tick to remain "stopped"/or omitted; no need to reprogram and enable a periodic tick (e.g. no queued/or expired pending timer) ... do_idle cpuidle_idle_call { ... .-- default_idle_call | arch_cpu_idle | goto exit_idle | | exit_idle: | __current_set_polling() | | } | tick_nohz_idle_exit() | { | | tick_stopped = ts->tick_stopped | | if (tick_stopped) | tick_nohz_idle_update_tick(ts, now) | if (tick_nohz_full_cpu(smp_processor_id())) | __tick_nohz_full_update_tick(ts, now) | { | int cpu = smp_processor_id() | | if (can_stop_full_tick(cpu, ts)) | tick_nohz_stop_sched_tick(ts, cpu) | if (tick_nohz_next_event(ts, cpu)) '-- tick_nohz_stop_tick(ts, cpu) } } If I understand correctly, __tick_nohz_full_update_tick() can return with no changes to the current tick (e.g. expire time == KTIME_MAX), no? Kind regards, -- Aaron Tomlin