From patchwork Fri Feb 11 22:35:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sebastian Andrzej Siewior X-Patchwork-Id: 12744025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D003DC433EF for ; Fri, 11 Feb 2022 22:35:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 618DB6B007B; Fri, 11 Feb 2022 17:35:49 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 41B668D0005; Fri, 11 Feb 2022 17:35:49 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 209628D0003; Fri, 11 Feb 2022 17:35:49 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.a.hostedemail.com [64.99.140.24]) by kanga.kvack.org (Postfix) with ESMTP id E2D2A8D0001 for ; Fri, 11 Feb 2022 17:35:48 -0500 (EST) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id 8DB142406E for ; Fri, 11 Feb 2022 22:35:48 +0000 (UTC) X-FDA: 79131957576.05.6112566 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by imf22.hostedemail.com (Postfix) with ESMTP id E2AA1C0004 for ; Fri, 11 Feb 2022 22:35:47 +0000 (UTC) From: Sebastian Andrzej Siewior DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1644618945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=2jFa60m1adjhL+4fflkSQgNee+J2OI1P+D0ydxQNeSM=; b=PY+tx1P/mAMJnjwiGOq8e0x1SapvGN6YbEqZaTEbMW2zWB0RjTDrvIb6ROp0H8V02fkC18 VMSHJ69jRzMfXnFB6K80K5V1OabCPyXzqitZdwCtgC06n/VTeVk/i+I1j1JXdsULrnXeQe JzeDCNY2nbc8So97FKQmAn6Q+JtOnEZeTuZU1XkPvPUPbBBN+dYopC+zcptCSOc56qYfhT U8+mQd2WJEgQnzJRNdIsPONysf5VTR9KPCIF/s4H8X8GdAUlCY+cFL7emEO3NNEElbhYE7 0ZATNH/bUreS/33JZmnH83dZrO8RuDMKDmNQF4lNUgWQereiUO1p21BRe1aYrQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1644618945; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=2jFa60m1adjhL+4fflkSQgNee+J2OI1P+D0ydxQNeSM=; b=MOCraIlS0/LMJ+LLb0Si15mJMZtVSnjhrMJYsm25gGy9c0+ObvcxsdrF7SxqppFmMTgVLu PjGlxx5xmHuA49Aw== To: cgroups@vger.kernel.org, linux-mm@kvack.org Cc: Andrew Morton , Johannes Weiner , Michal Hocko , =?utf-8?q?Michal_Koutn=C3=BD?= , Peter Zijlstra , Thomas Gleixner , Vladimir Davydov , Waiman Long Subject: [PATCH v2 0/4] mm/memcg: Address PREEMPT_RT problems instead of disabling it. Date: Fri, 11 Feb 2022 23:35:33 +0100 Message-Id: <20220211223537.2175879-1-bigeasy@linutronix.de> MIME-Version: 1.0 X-Rspamd-Queue-Id: E2AA1C0004 X-Rspam-User: Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=linutronix.de header.s=2020 header.b="PY+tx1P/"; dkim=pass header.d=linutronix.de header.s=2020e header.b=MOCraIlS; spf=pass (imf22.hostedemail.com: domain of bigeasy@linutronix.de designates 193.142.43.55 as permitted sender) smtp.mailfrom=bigeasy@linutronix.de; dmarc=pass (policy=none) header.from=linutronix.de X-Stat-Signature: uhqftp1819tabmm8jhzo6qzfonns1975 X-Rspamd-Server: rspam11 X-HE-Tag: 1644618947-372667 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: Hi, this series aims to address the memcg related problem on PREEMPT_RT. I tested them on CONFIG_PREEMPT and CONFIG_PREEMPT_RT with the tools/testing/selftests/cgroup/* tests and I haven't observed any regressions (other than the lockdep report that is already there). Changes since v1: - Made a full patch from Michal Hocko's diff to disable the from-IRQ vs from-task optimisation - Disabling threshold event handlers is using now IS_ENABLED(PREEMPT_RT) instead of #ifdef. The outcome is the same but there is no need to shuffle the code around. v1: https://lore.kernel.org/all/20220125164337.2071854-1-bigeasy@linutronix.de/ Changes since the RFC: - cgroup.event_control / memory.soft_limit_in_bytes is disabled on PREEMPT_RT. It is a deprecated v1 feature. Fixing the signal path is not worth it. - The updates to per-CPU counters are usually synchronised by disabling interrupts. There are a few spots where assumption about disabled interrupts are not true on PREEMPT_RT and therefore preemption is disabled. This is okay since the counter are never written from in_irq() context. RFC: https://lore.kernel.org/all/20211222114111.2206248-1-bigeasy@linutronix.de/ Sebastian