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 1924EC4338F for ; Fri, 23 Jul 2021 10:00:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 0156360EC0 for ; Fri, 23 Jul 2021 10:00:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231743AbhGWJUO (ORCPT ); Fri, 23 Jul 2021 05:20:14 -0400 Received: from outbound-smtp22.blacknight.com ([81.17.249.190]:36102 "EHLO outbound-smtp22.blacknight.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231542AbhGWJUM (ORCPT ); Fri, 23 Jul 2021 05:20:12 -0400 Received: from mail.blacknight.com (pemlinmail06.blacknight.ie [81.17.255.152]) by outbound-smtp22.blacknight.com (Postfix) with ESMTPS id E6B9614802F 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 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 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(-) -- 2.26.2