Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp682455pxt; Thu, 5 Aug 2021 09:06:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJztMmvrwrECHhz7ojioaDXIUeidRk4F/w05x2LDwvvcQ2/lqdwDGznBPJ9vaTO1nyycoTY8 X-Received: by 2002:a05:6402:430b:: with SMTP id m11mr7578445edc.55.1628179596355; Thu, 05 Aug 2021 09:06:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628179596; cv=none; d=google.com; s=arc-20160816; b=gjr1erUSSJpQHy2c0UjANKwwmNpM53rZgwO+ATOyqfU/2bX8kescmk52JygJAgTdbA /NWsdIxUFucJUGNU+0q7OgUVQ8W2xl4dqaYYuXaHzlTGLBAE64oVrRDjk0sGtos/Y2zN n2Ro6KgaBjsxbiuSig2sTpKWYb2E86tqCpfg5e/NGMymJNIUgky6xJE370qVqwtuTDhX XtfFFEdJ4OROX2NcTD3Gswjm2q8yUTiqOwUR6Ynhf9kio7qzMGsOZNWzHo4hLdMpzuiC V7vq5l2KbiYsbQIwXjOI/9PUPnkMy96iWQeVRhK6NePt2eCfjOVPe/4HKZ5p4ZLeSsYS aBEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=eMCrjrZ32Q0boaLFSm4wpxgAk/mw/Xk8AJuaLa4Xuyc=; b=qg1txm+BqP/E4r8VB6hWHFO/6JKGPmKH5mUh8Zi9b5sRWYPzYql0+5AW9VFL9pRmje 50Cnfu7n4lWC/A2aEQbULoMApdY/kGZkzMl4eEnI+V7MLFgt2mwPGaWZKijnLwCKf+6e +w+eXYkvOLAnPRnGZgdBf+83JLmlZU5QVsx7THqQ+Zdegps20mlAiN8InLtU0/E08InM znLjoDuYXqjgupj0Z2g7oa7UqyZ9mLorE/09Or+rk8K3nilu4IVODco7QVZsRGGKf4fB tjV1BxpRGio6IJEbgPsJcqsx/GyiVVWog1R+c7yjR+T8OrTbA0SvtEAyOgaol+DpyOrK 2RpQ== 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 r9si5895773eje.250.2021.08.05.09.06.12; Thu, 05 Aug 2021 09:06:36 -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 S242761AbhHEQAr (ORCPT + 99 others); Thu, 5 Aug 2021 12:00:47 -0400 Received: from outbound-smtp53.blacknight.com ([46.22.136.237]:60709 "EHLO outbound-smtp53.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242509AbhHEQAp (ORCPT ); Thu, 5 Aug 2021 12:00:45 -0400 Received: from mail.blacknight.com (pemlinmail03.blacknight.ie [81.17.254.16]) by outbound-smtp53.blacknight.com (Postfix) with ESMTPS id 5473DFB00E 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- 2.31.1