Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1564316pxm; Thu, 24 Feb 2022 05:38:14 -0800 (PST) X-Google-Smtp-Source: ABdhPJw2jnzx3qgHyl+n+7WfVfyENbaY2qRpYKBnM+JOXCSfcFPCi2/lZOaRngmK+zt56lG1t1+J X-Received: by 2002:a63:535a:0:b0:373:d239:7c7d with SMTP id t26-20020a63535a000000b00373d2397c7dmr2259959pgl.483.1645709894068; Thu, 24 Feb 2022 05:38:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645709894; cv=none; d=google.com; s=arc-20160816; b=Hy+K3+aALm23SOTGoOp2UBmmPXlrRsxiH2n1amTXDGiY0/MyNwJJlUa+nSaU4otCk6 y+siUO4+Df3Gq1EBxCFAqvuROUg9kB0C1CplUOkGOU8HBdFlKM93dI9pPETROZmmABMJ FPS86QKMuoCeYJe3OD00cjHz/asCdBZQ1mxx2APW8sehCK4UH6Gb4awxduxkAfJBISY8 fOn3P44GvalN1zqqFVjxnBofBeb6bR51mtYidaq1rn8ruVvix+jkRS+FGTWA5WEDUDQl BF25ypBHES1ZDF8il9h10EHbJf46Sv4wEWLVOl0/B2OD5BAYoIUqicV0gbIK8ySmnJe2 qSaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=R0lJYwvTZOZVdJ4O7bKhvvzTAAdIE1Ye5K2uSbURukI=; b=0Yjfnv5I6HShnws0nZkqrBR2nNNx9t3WfGZC13v0omcnSOE8tNmxvx36yynWy6THcv m0iH6sqEnlAZusAsp7rm2aiPv2/0d6b13cUHiwxSyHoXgm4iNJbNzQq1EnsTKfhw8tcA nj9Pr861qlVR7qIAy88Pti8cuqGVv9nntWg1vIjwSH3MYeBL6n8DEjOYGZZVIBczy/PB +8ub3Kma0k42c4QQZ/SwiPaTtIV3hl1+j5Mi+8jRmK3QfktOzGM0oWW62jBBmyJGA458 KtjH7P/o7w1Ie+0TeHTYUS9oSkVXo+CKb0OX4pKaILJnc2GqURZNRfC+ZLjly0nX0uQD Zu6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="bK//y7ov"; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p13si2462889pgf.216.2022.02.24.05.37.57; Thu, 24 Feb 2022 05:38:14 -0800 (PST) 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=@redhat.com header.s=mimecast20190719 header.b="bK//y7ov"; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233085AbiBXNQA (ORCPT + 99 others); Thu, 24 Feb 2022 08:16:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231145AbiBXNP7 (ORCPT ); Thu, 24 Feb 2022 08:15:59 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3CF65166E11 for ; Thu, 24 Feb 2022 05:15:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645708528; 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=R0lJYwvTZOZVdJ4O7bKhvvzTAAdIE1Ye5K2uSbURukI=; b=bK//y7ovI88mp2+dbJg9l4vs9ciBlyCa4LCtA8EJ3yOe5/DYSSiVx4uDYpv4PPbWqBFIQk k+R5EfHQrLy66cnTyoWsrdvxyVTu0JPnOtgvBZxkCv5+Py6ymX11Hj6dPvxgwn8epgO/cW ea566Q8Y+4LSZmpekhu87fmW+L6kPo0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-643-E3FskdubMYSN1vTPcI5-nA-1; Thu, 24 Feb 2022 08:15:23 -0500 X-MC-Unique: E3FskdubMYSN1vTPcI5-nA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E2F5B1854E21; Thu, 24 Feb 2022 13:15:21 +0000 (UTC) Received: from fuller.cnet (ovpn-112-2.gru2.redhat.com [10.97.112.2]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8936310631F7; Thu, 24 Feb 2022 13:15:19 +0000 (UTC) Received: by fuller.cnet (Postfix, from userid 1000) id D8300416D862; Thu, 24 Feb 2022 10:14:58 -0300 (-03) Date: Thu, 24 Feb 2022 10:14:58 -0300 From: Marcelo Tosatti To: Aaron Tomlin Cc: Frederic Weisbecker , Christoph Lameter , tglx@linutronix.de, mingo@kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Phil Auld Subject: Re: [RFC PATCH] tick/sched: Ensure quiet_vmstat() is called when the idle tick was stopped too Message-ID: References: <20220203214339.1889971-1-atomlin@redhat.com> <20220217124729.GA743618@lothringen> <20220217142615.xqtiydixvnumyvei@ava.usersys.com> <20220217163205.GA748087@lothringen> <20220218125454.utlgmuhijklzr3if@ava.usersys.com> <20220219154616.pwsvh445x3vn7ltf@ava.usersys.com> <20220224130014.rmhtx3xlepybuxn2@ava.usersys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220224130014.rmhtx3xlepybuxn2@ava.usersys.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE 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 Thu, Feb 24, 2022 at 01:00:14PM +0000, Aaron Tomlin wrote: > On Thu 2022-02-24 09:27 -0300, Marcelo Tosatti wrote: > > But Aaron, vmstat_shepherd should be ensuring that per-CPU vmstat_update > > work are queued, if the per-CPU vmstat are out of sync. > > Hi Marcelo, > > Yes, I agree; albeit, as far as I understand, in the context of a nohz_full > CPU that has its scheduling-clock tick stopped, we cannot rely on any > deferred work. > > The purpose of my patch was to prevent a nohz_full CPU from entering idle > state when CPU-specific vmstat data is non-zero. > > > And: > > > > static void > > trigger_dyntick_cpu(struct timer_base *base, struct timer_list *timer) > > { > > if (!is_timers_nohz_active()) > > return; > > > > /* > > * TODO: This wants some optimizing similar to the code below, but we > > * will do that when we switch from push to pull for deferrable timers. > > */ > > if (timer->flags & TIMER_DEFERRABLE) { > > if (tick_nohz_full_cpu(base->cpu)) > > wake_up_nohz_cpu(base->cpu); > > return; > > } > > > > * @TIMER_DEFERRABLE: A deferrable timer will work normally when the > > * system is busy, but will not cause a CPU to come out of idle just > > * to service it; instead, the timer will be serviced when the CPU > > * eventually wakes up with a subsequent non-deferrable timer. > > > > You'd want that vmstat_update to execute regardless of whether there are > > armed non-deferrable timers. > > > > Should fix both 1 and 2 AFAICS. > > > > If I understand correctly, you are suggesting to switch to a non-deferred > timer for such work when the scheduling-clock tick is stopped? Indeed, it > would address both scenarios yet I'm not sure we'd want that due to the > performance impact which might be more than negligible. Aaron, If the per-CPU vmstat_update is limited to happen once per second, that shouldnt be a significant performance impact?