Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp2853689pxb; Mon, 6 Sep 2021 06:51:59 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy2XSG0UIp/YX0bCDTFL6aHBlu6R5mfDJJ51qF6+Uiiu8oatmP0MXP5Wbj6vqYhlmRtFN+F X-Received: by 2002:a05:6e02:e8b:: with SMTP id t11mr8297538ilj.175.1630936319151; Mon, 06 Sep 2021 06:51:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1630936319; cv=none; d=google.com; s=arc-20160816; b=I5plxtWpGPiSyUuJBbCv0Lv8Pi3LtvgnhT9JpojWNa+OaJLvXhYecEYxaeKV9JxYMu vNdXja3SSw8djuyg3cNCdMIOBf2VvmXCRnSO0QkU6wUGxyawYfTPVauuhjbsEQK7a8hn 5Y/++85oZ1PmRnyBiu1cd09311jULCR04FRUjSUreXCC8q1BG1loWaR1+KvV8L+A2aK3 1ivJuRmMIqbxLsiTJFHT6RymvGTm/MaDUjFq14IgBgatiisk6mOPnhh0l/SpFJtimvdw gXgZ7RIIdYza1J3NLp7sp19s5yl+dJh8MKk821ZJzEDDn/p5VLaykNMAaovbIpB0rsKl 8lzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=4xMNo9Z9hIMlxo1ado3+kAgfoUIqBzN5HeoFcDAnKlM=; b=WKpTY3OE60E+0q9sfIhs7sYhlXmaEeKxjHQmVBmXb1K4Q4Bdl3moPIrOrfn5A7i0lH tJQ8CY6Onxk00mVIzfMhs/d+o3MCskXlrLKzAdFV4nGKQtY+LnxoaUjBqXZi9ZCyHsS0 /XxXtQz7xgInYgCNkLKeAxRPAI3HoyNJt8x8aWXAEYzjMq2YUOeIKezUFYmQbc1M4wfT zX1jc3FNPuOC600I8CpltmjXz71DHZBAmn5jhTJZv3dTD8c63K+dSEv3fTHC+s0lbGGZ +BEieS6PKdqMEOcBKRLfu57oq2js+4tTWJtBJNWumQBbLrYtpwdOnAYgOl5MSXZez4V+ 1Rgg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n21si7280559ioh.16.2021.09.06.06.51.47; Mon, 06 Sep 2021 06:51:59 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242898AbhIFNtn (ORCPT + 99 others); Mon, 6 Sep 2021 09:49:43 -0400 Received: from outbound-smtp33.blacknight.com ([81.17.249.66]:46676 "EHLO outbound-smtp33.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242330AbhIFNtn (ORCPT ); Mon, 6 Sep 2021 09:49:43 -0400 Received: from mail.blacknight.com (pemlinmail04.blacknight.ie [81.17.254.17]) by outbound-smtp33.blacknight.com (Postfix) with ESMTPS id 8243FBACB5 for ; Mon, 6 Sep 2021 14:48:35 +0100 (IST) Received: (qmail 13005 invoked from network); 6 Sep 2021 13:48:35 -0000 Received: from unknown (HELO techsingularity.net) (mgorman@techsingularity.net@[84.203.17.29]) by 81.17.254.9 with ESMTPSA (AES256-SHA encrypted, authenticated); 6 Sep 2021 13:48:35 -0000 Date: Mon, 6 Sep 2021 14:48:20 +0100 From: Mel Gorman To: Sebastian Andrzej Siewior Cc: Andrew Morton , Thomas Gleixner , Ingo Molnar , Vlastimil Babka , Hugh Dickins , Linux-MM , Linux-RT-Users , LKML Subject: Re: [PATCH 1/1] mm/vmstat: Protect per cpu variables with preempt disable on RT Message-ID: <20210906134820.GA3959@techsingularity.net> References: <20210805160019.1137-1-mgorman@techsingularity.net> <20210805160019.1137-2-mgorman@techsingularity.net> <20210831164546.t7b6ksblzhsmm6jr@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20210831164546.t7b6ksblzhsmm6jr@linutronix.de> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 31, 2021 at 06:45:46PM +0200, Sebastian Andrzej Siewior wrote: > On 2021-08-05 17:00:19 [+0100], Mel Gorman wrote: > > mm/vmstat.c | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ > > 1 file changed, 48 insertions(+) > > The version in RT also covered the functions > __count_vm_event() > __count_vm_events() > > in include/linux/vmstat.h. Were they dropped by mistake or on purpose? > Sorry for the long delay, this got lost in a mess of mail. It was dropped on purpose and I tried to explain why in the changelog This patch differs from the preempt-rt version where __count_vm_event and __count_vm_events are also protected. The counters are explicitly "allowed to be to be racy" so there is no need to protect them from preemption. Only the accurate page stats that are updated by a read-modify-write need protection. This patch also differs in that a preempt_[en|dis]able_rt helper is not used. As vmstat is the only user of the helper, it was suggested that it be open-coded in vmstat.c instead of risking the helper being used in unnecessary contexts. Does that answer your question? -- Mel Gorman SUSE Labs