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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id DB34BC7EE24 for ; Fri, 2 Jun 2023 10:40:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234817AbjFBKkn (ORCPT ); Fri, 2 Jun 2023 06:40:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59788 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235227AbjFBKjc (ORCPT ); Fri, 2 Jun 2023 06:39:32 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2001:67c:2178:6::1c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9496E195 for ; Fri, 2 Jun 2023 03:39:11 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id DE76721A30; Fri, 2 Jun 2023 10:39:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1685702345; h=from:from:reply-to: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=OXVCVLEq/yIdpec66Wgx6FzW4hiPq4nQMk/OB4ZUx7E=; b=R0tdKg7n1zQ8NlEZMf9EMFNJDbFb3iOTRt3Vc+9oxlrhAgw1H5U2Ym3xB1BpnRGeShlNpO NLUFcvOST78osOhKrcubiS3AWLEs06cGx0c2L/sXFRG+7bg0OMynn9U40pnwv8ER0Q8fL7 aSA3hDPzfIhtA+YDTSajXfDouUPcq+A= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id BF22E13A2E; Fri, 2 Jun 2023 10:39:05 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 4fxOHsnGeWR5WwAAMHmgww (envelope-from ); Fri, 02 Jun 2023 10:39:05 +0000 Date: Fri, 2 Jun 2023 12:39:04 +0200 From: Michal Hocko To: Marcelo Tosatti Cc: Christoph Lameter , Aaron Tomlin , Frederic Weisbecker , Andrew Morton , linux-kernel@vger.kernel.org, linux-mm@kvack.org, Vlastimil Babka Subject: Re: [PATCH 2/4] vmstat: skip periodic vmstat update for nohz full CPUs Message-ID: References: <20230530145234.968927611@redhat.com> <20230530145335.828634764@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230530145335.828634764@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue 30-05-23 11:52:36, Marcelo Tosatti wrote: > @@ -2022,6 +2023,16 @@ static void vmstat_shepherd(struct work_ > for_each_online_cpu(cpu) { > struct delayed_work *dw = &per_cpu(vmstat_work, cpu); > > + /* > + * Skip periodic updates for nohz full CPUs. > + * Any callers who need precise values should use > + * a snapshot of the per-CPU counters, or use the global > + * counters with measures to handle errors up to > + * thresholds (see calculate_normal_threshold). > + */ > + if (tick_nohz_full_cpu(cpu)) > + continue; In other code path we have used cpu_is_isolated, is there any reason to diverge from that here? Isn't this effectivelly the same kind of problem? > + > if (!delayed_work_pending(dw) && need_update(cpu)) > queue_delayed_work_on(cpu, mm_percpu_wq, dw, 0); > > -- Michal Hocko SUSE Labs