Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp13269512rwl; Wed, 4 Jan 2023 06:02:20 -0800 (PST) X-Google-Smtp-Source: AMrXdXsbWKcPwV5pFw2BC2ZxH/rs1WMuAC9XVO+aGDx+ObEJgDnYUOQPghdk4ui/o+SODWoHxV7w X-Received: by 2002:a05:6a20:a5aa:b0:a4:c01c:5e1e with SMTP id bc42-20020a056a20a5aa00b000a4c01c5e1emr76042402pzb.47.1672840939719; Wed, 04 Jan 2023 06:02:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672840939; cv=none; d=google.com; s=arc-20160816; b=ynpoD1eG7/qa1DZZt3AKamZ/fw8eGjCSmwK8i17kVRRgdl6Fcf5+e1cV7fzqH0A3T8 rxHIw6Q1EL5P5w9KECSAUVN7LdzNFYrIGI3q5h79Vb1d8dOXmzXmnZv9OwzJ4zVrwnSl skpfIlNGgdi8bIoTSUyNopgV3dcZXMFOjOQKUg0jie6+9tkK1Ft1ByJWXxfM5Hbo1OHk /LS7JYAnXOP7+P7F8/XGqdIi0/Ys59RnL6QVfm7MN68c7OgU+nCCoGSMzKDnWqHX0lpA mSmR8zYRlF5y9l1kY8tJMCPShR9b6bERJy0q7POAVF0lmM5mE85Zf5BA6V7iZ+xXM688 2mhA== 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; bh=l0RGflrWi7RBkhjN/GOBI/cexfG1L5LT1CKzy5weMHg=; b=t73RUphAdA7uJL7y8nGrag4jWocD0kiOtj+hFk4AiziODzQwNFvLyhI+LWr3WkZCPg 5P2HbHOXH7BZ1qR+WFHd2Z4OfQpdESORnnTdpUCfF4dZB95BUkqG+otBqb4o708thqhn tCjSCfiTojdStdAm2NO2XG6KclqIaSaoc3ljLcuWmi5+txRAQasHh8X439A86nVVr6fp okLx1f8z+cvYxkDSuKAb09MqbdwCXr24Nva5bdUo0+q0VuRIU3uYgdZi4Yj1UMOTKsdF tp+BYlAnNne7AvhhF4am9rZLaiVByB+VMwvTGSvfuY2tyPyOJ1UTDbh8RgkqrlKSmit8 O/uQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n7-20020a632707000000b0043c8ce98a7bsi34999258pgn.802.2023.01.04.06.01.51; Wed, 04 Jan 2023 06:02:19 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239516AbjADNh5 (ORCPT + 57 others); Wed, 4 Jan 2023 08:37:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239801AbjADNhZ (ORCPT ); Wed, 4 Jan 2023 08:37:25 -0500 X-Greylist: delayed 135 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Wed, 04 Jan 2023 05:37:17 PST Received: from p3plsmtpa12-02.prod.phx3.secureserver.net (p3plsmtpa12-02.prod.phx3.secureserver.net [68.178.252.231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4B6FBB11 for ; Wed, 4 Jan 2023 05:37:17 -0800 (PST) Received: from localhost ([82.17.115.212]) by :SMTPAUTH: with ESMTPA id D3v2pfNMzdnFID3v3pOI73; Wed, 04 Jan 2023 06:35:01 -0700 X-CMAE-Analysis: v=2.4 cv=OtSJiQzt c=1 sm=1 tr=0 ts=63b58085 a=9gipVNR6X1CoIeAWHwLoWw==:117 a=9gipVNR6X1CoIeAWHwLoWw==:17 a=IkcTkHD0fZMA:10 a=10cxsorouKqAV6tjQI0A:9 a=QEXdDO2ut3YA:10 X-SECURESERVER-ACCT: atomlin@atomlin.com Date: Wed, 4 Jan 2023 13:34:59 +0000 From: Aaron Tomlin To: Frederic Weisbecker Cc: Marcelo Tosatti , cl@linux.com, tglx@linutronix.de, mingo@kernel.org, peterz@infradead.org, pauld@redhat.com, neelx@redhat.com, oleksandr@natalenko.name, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH v12 2/6] mm/vmstat: Use vmstat_dirty to track CPU-specific vmstat discrepancies Message-ID: <20230104133459.5yaflf3yicpmhbbh@ava.usersys.com> References: <20221227121137.102497574@redhat.com> <20221227121341.981235373@redhat.com> <20221230132132.GA186035@lothringen> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20221230132132.GA186035@lothringen> X-CMAE-Envelope: MS4xfFA/uiN5hbKR/L31JmptVVhPRsARrLU7WBDehIBzhMxSZcxbBRUHhVl5Q3RD9uMKRFoYIB6a9w+0oldFH4hNfryhz98qvH5hD2s7YKCfhbG/wW1toJr8 ibdeHnwgiZ5xuZQgFsoruKjde1wlQe7xGBXq6DG0OZd66zFZ0bR55hlRdhPobkaMNpc1zGsv2vJiI0hlQ6eL23baSaapoe+p/KwdsViua2WPV5o1CHBYSWpW EgXeY0oNbfEbjHzGmoTMH8dR0XegGWkrvGOLSR6gnB9DZLgudtEngQcLdeEaca8SXBPGKLNH1pBYj3BBAWREpABvBQHIv8VbCqnpOfKyfNRETKexXOXQfQ4J 5r/y+9bMe4iywjpm7R3vQ2Mg91dtGTlhnQUx6nIECbDikyein5POLuPVRmU47edKImUfpBlJOs9BjxUoJdplajJRHHZjuJ8T0W5yRsf4gXSnYwMFbYqLGgqQ XsuPxuDLkxEUoVvN X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,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 Fri 2022-12-30 14:21 +0100, Frederic Weisbecker wrote: > On Tue, Dec 27, 2022 at 09:11:39AM -0300, Marcelo Tosatti wrote: > > @@ -606,6 +608,7 @@ static inline void mod_zone_state(struct > > > > if (z) > > zone_page_state_add(z, zone, item); > > + vmstat_mark_dirty(); > > } > > > > void mod_zone_page_state(struct zone *zone, enum zone_stat_item item, > > @@ -674,6 +677,7 @@ static inline void mod_node_state(struct > > > > if (z) > > node_page_state_add(z, pgdat, item); > > + vmstat_mark_dirty(); > > Looking at this further, about the two above chunks, there is a risk to > mark the wrong CPU dirty because those functions are preemptible and rely > on this_cpu_cmpxchg() to deal with preemption. Hi Frederic, Agreed. Kind regards, -- Aaron Tomlin