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=-11.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_GIT 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 81CAEC4338F for ; Fri, 23 Jul 2021 10:01:49 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 4807360EE2 for ; Fri, 23 Jul 2021 10:01:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4807360EE2 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 E488A6B006C; Fri, 23 Jul 2021 06:01:48 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id DF8D56B0070; Fri, 23 Jul 2021 06:01:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id CE7756B0071; Fri, 23 Jul 2021 06:01:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0041.hostedemail.com [216.40.44.41]) by kanga.kvack.org (Postfix) with ESMTP id B01FF6B006C for ; Fri, 23 Jul 2021 06:01:48 -0400 (EDT) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 5F756180AD82F for ; Fri, 23 Jul 2021 10:01:48 +0000 (UTC) X-FDA: 78393411096.19.FAD1145 Received: from outbound-smtp29.blacknight.com (outbound-smtp29.blacknight.com [81.17.249.32]) by imf02.hostedemail.com (Postfix) with ESMTP id 85BE2700527F for ; Fri, 23 Jul 2021 10:00:46 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail06.blacknight.ie [81.17.255.152]) by outbound-smtp29.blacknight.com (Postfix) with ESMTPS id E5F8DBEEF7 for ; Fri, 23 Jul 2021 11:00:44 +0100 (IST) Received: (qmail 8804 invoked from network); 23 Jul 2021 10:00:44 -0000 Received: from unknown (HELO stampy.112glenside.lan) (mgorman@techsingularity.net@[84.203.17.255]) by 81.17.254.9 with ESMTPA; 23 Jul 2021 10:00:44 -0000 From: Mel Gorman To: Andrew Morton Cc: Thomas Gleixner , Ingo Molnar , Vlastimil Babka , Hugh Dickins , Linux-MM , Linux-RT-Users , LKML , Mel Gorman Subject: [PATCH 0/2] Protect vmstats on PREEMPT_RT Date: Fri, 23 Jul 2021 11:00:32 +0100 Message-Id: <20210723100034.13353-1-mgorman@techsingularity.net> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 X-Rspamd-Server: rspam01 X-Rspamd-Queue-Id: 85BE2700527F Authentication-Results: imf02.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf02.hostedemail.com: domain of mgorman@techsingularity.net designates 81.17.249.32 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-Stat-Signature: yy1xy57jf79n9fbat9gp43fc84stazct X-HE-Tag: 1627034446-95103 Content-Transfer-Encoding: quoted-printable 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: When adding local_lock support to mm/page_alloc.c and reducing the overhe= ad of vmstats in general, I wondered how vmstats could be safe on PREEMPT_RT as it partially relies on interrupts being disabled for the stats that must be accurate for correctness. As it turns out, the preempt-rt tree already encountered the same problem. This series protects just the primary counters. While there is another vmstat-related patch, it is related to memcg getting using local_lock and I have not fully considered those patches and whether they are ok as-is or need modification but this series makes a start. Patch 1 is authored by Thomas (cc'd) and has not being altered. Patch 2 is authored by Ingo (cc'd) but I modified what he implemented for reasons explained in the changelog. This is specific to PREEMPT_RT which cannot be enabled on mainline yet and should have no impact on !PREEMPT_RT kernels. include/linux/preempt.h | 18 +++++++++++++++++- mm/vmstat.c | 12 ++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) --=20 2.26.2