From patchwork Thu Aug 5 16:00:18 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mel Gorman X-Patchwork-Id: 12421587 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=-6.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_GIT autolearn=no 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 E5C40C4338F for ; Thu, 5 Aug 2021 16:00:33 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 845C861157 for ; Thu, 5 Aug 2021 16:00:33 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 845C861157 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 EAB416B006C; Thu, 5 Aug 2021 12:00:32 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id E59296B0071; Thu, 5 Aug 2021 12:00:32 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D6EE18D0001; Thu, 5 Aug 2021 12:00:32 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0123.hostedemail.com [216.40.44.123]) by kanga.kvack.org (Postfix) with ESMTP id C14AF6B006C for ; Thu, 5 Aug 2021 12:00:32 -0400 (EDT) Received: from smtpin26.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id 745ED267D6 for ; Thu, 5 Aug 2021 16:00:32 +0000 (UTC) X-FDA: 78441489504.26.7E1523C Received: from outbound-smtp13.blacknight.com (outbound-smtp13.blacknight.com [46.22.139.230]) by imf09.hostedemail.com (Postfix) with ESMTP id D03453002902 for ; Thu, 5 Aug 2021 16:00:31 +0000 (UTC) Received: from mail.blacknight.com (pemlinmail03.blacknight.ie [81.17.254.16]) by outbound-smtp13.blacknight.com (Postfix) with ESMTPS id 5C29C1C3DD5 for ; Thu, 5 Aug 2021 17:00:30 +0100 (IST) Received: (qmail 17347 invoked from network); 5 Aug 2021 16:00:30 -0000 Received: from unknown (HELO stampy.112glenside.lan) (mgorman@techsingularity.net@[84.203.17.255]) by 81.17.254.9 with ESMTPA; 5 Aug 2021 16:00:30 -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/1 v2] Protect vmstats on PREEMPT_RT Date: Thu, 5 Aug 2021 17:00:18 +0100 Message-Id: <20210805160019.1137-1-mgorman@techsingularity.net> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 X-Rspamd-Server: rspam03 X-Rspamd-Queue-Id: D03453002902 Authentication-Results: imf09.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf09.hostedemail.com: domain of mgorman@techsingularity.net designates 46.22.139.230 as permitted sender) smtp.mailfrom=mgorman@techsingularity.net X-Stat-Signature: auujz87hk3d7ipk8up9j3iq3b8csfdf9 X-HE-Tag: 1628179231-146384 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: Changelog since v1 o Remove preempt_[en|dis]able_rt helper When adding local_lock support to mm/page_alloc.c and reducing the overhead 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 accurate counters. As Thomas expressed concern that the preempt_enable_rt() helper could be abused, this version open-codes the preemption with a comment explaining why it is necessary. This is specific to PREEMPT_RT which cannot be enabled on mainline yet and should have no impact on !PREEMPT_RT kernels. This patch replaces the following mmotm patches o preempt-provide-preempt__nort-variants.patch o mm-vmstat-protect-per-cpu-variables-with-preempt-disable-on-rt.patch