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 X-Spam-Level: X-Spam-Status: No, score=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6E5BEC433EF for ; Mon, 6 Sep 2021 13:48:39 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id DC98660F6B for ; Mon, 6 Sep 2021 13:48:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org DC98660F6B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=techsingularity.net Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 489686B0071; Mon, 6 Sep 2021 09:48:38 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 438D96B0072; Mon, 6 Sep 2021 09:48:38 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 327A5900002; Mon, 6 Sep 2021 09:48:38 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0001.hostedemail.com [216.40.44.1]) by kanga.kvack.org (Postfix) with ESMTP id 235216B0071 for ; Mon, 6 Sep 2021 09:48:38 -0400 (EDT) Received: from smtpin35.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay02.hostedemail.com (Postfix) with ESMTP id D7A692BC39 for ; Mon, 6 Sep 2021 13:48:37 +0000 (UTC) X-FDA: 78557278674.35.024C1DB Received: from outbound-smtp25.blacknight.com (outbound-smtp25.blacknight.com [81.17.249.193]) by imf05.hostedemail.com (Postfix) with ESMTP id 4A143504C654 for ; Mon, 6 Sep 2021 13:48:37 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail04.blacknight.ie [81.17.254.17]) by outbound-smtp25.blacknight.com (Postfix) with ESMTPS id 733C6CAD2A 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) Authentication-Results: imf05.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf05.hostedemail.com: domain of mgorman@techsingularity.net designates 81.17.249.193 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-Stat-Signature: 5d3sg8hiuf1fd8bc1iwjggar5i3gzxof X-Rspamd-Queue-Id: 4A143504C654 X-Rspamd-Server: rspam04 X-HE-Tag: 1630936117-211094 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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