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 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00F8AC433EF for ; Mon, 14 Feb 2022 16:24:02 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 710DD6B007B; Mon, 14 Feb 2022 11:24:02 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 699C96B007D; Mon, 14 Feb 2022 11:24:02 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 53BA86B007E; Mon, 14 Feb 2022 11:24:02 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0194.hostedemail.com [216.40.44.194]) by kanga.kvack.org (Postfix) with ESMTP id 4286B6B007B for ; Mon, 14 Feb 2022 11:24:02 -0500 (EST) Received: from smtpin20.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay04.hostedemail.com (Postfix) with ESMTP id EE193A0F88 for ; Mon, 14 Feb 2022 16:24:01 +0000 (UTC) X-FDA: 79141907082.20.B9530CF Received: from mail-qk1-f178.google.com (mail-qk1-f178.google.com [209.85.222.178]) by imf19.hostedemail.com (Postfix) with ESMTP id 652041A000A for ; Mon, 14 Feb 2022 16:24:01 +0000 (UTC) Received: by mail-qk1-f178.google.com with SMTP id b35so14799629qkp.6 for ; Mon, 14 Feb 2022 08:24:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cmpxchg-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to; bh=7iaUyRhGkUA7PAMU1c+vAYFq1GgavVmjQYa91iIOiFk=; b=q98xAfK0lidrBW3RZafWMOaYOlDwjN3XqwR4nUA67A2As9jAY5LV1kUhegVVmDYwtb GId+u1ckugUhdD9kAIdvECoq8vwbT/sHhuME55ExdOiMAMM+OpkQcEJQQtGZ3s7ykrfr pWuk815AxI31/odpXIjDXdn0Odh7mfoPzjVlpHfzki+pC0g/UCgw3nwiL7XHxUx+VBbZ 27IXTcBAugv13y4UIonMdIDwbH9XteHNVuBBoO1xLrYjcKtxz7t68G5FH3zShns/WMRB cgzXsnsjuDQOcm7VBzmMYhqkpcqoDuhyjShjXrMDg5bm0wdOsjQMvnUOnmjVqcCEUnqr n49g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to; bh=7iaUyRhGkUA7PAMU1c+vAYFq1GgavVmjQYa91iIOiFk=; b=n1kWHNvVhtPhlfBqeLEIUCmy+6GlrN9NpRLP7rW03UYs9Mwjz4nPkvhytt1bdm8xz/ 0u0GxefBzqWa6/oA2HuLOC9TMux/QqPjeHF+hnbcKEtmZH+ilKg5PKEbdaqMbWNVs8WJ 2wLovnPn2RbiEay8xIUsdrufYaV7mgwBHCoWKq6dtvUt0dVPfUmJoPK5RfmcOjByvCoq zsvX9a/s6c0RcVUKc6x8tcep9Na8PlMQ+SNQp7s9qm66alGUC0vn8v8u0cdKwo1bfXME QuQgjQ7mF+HbqLyTRVz5V0EoMAqG4JIQKYHObsHqgVm5UNA0HR1hFPGQg/4MtayMNFWm 4Q/Q== X-Gm-Message-State: AOAM531SYyUbExZwawn9wjvuaMPvjOnLc/XPfw46+qdpQIYORTA4GuHh m4EMRK1du7uEBGratSmJ39Bvxw== X-Google-Smtp-Source: ABdhPJxCQ4pOe2LcxncfXXWHc4uofZU2gHJXA1m/sV0t9bbpJUUfRPvT88isowkQTLvT38CqAyTVYQ== X-Received: by 2002:a37:9e10:: with SMTP id h16mr228154qke.155.1644855840764; Mon, 14 Feb 2022 08:24:00 -0800 (PST) Received: from localhost (cpe-98-15-154-102.hvc.res.rr.com. [98.15.154.102]) by smtp.gmail.com with ESMTPSA id f20sm18767451qte.14.2022.02.14.08.24.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 08:24:00 -0800 (PST) Date: Mon, 14 Feb 2022 11:23:59 -0500 From: Johannes Weiner To: Sebastian Andrzej Siewior Cc: cgroups@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Michal Hocko , Michal =?iso-8859-1?Q?Koutn=FD?= , Peter Zijlstra , Thomas Gleixner , Vladimir Davydov , Waiman Long Subject: Re: [PATCH v2 2/4] mm/memcg: Disable threshold event handlers on PREEMPT_RT Message-ID: References: <20220211223537.2175879-1-bigeasy@linutronix.de> <20220211223537.2175879-3-bigeasy@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <20220211223537.2175879-3-bigeasy@linutronix.de> X-Stat-Signature: e1mdmq3dqzuuj955xqo7hrkdzjnzgo5a X-Rspamd-Server: rspam02 X-Rspamd-Queue-Id: 652041A000A Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=cmpxchg-org.20210112.gappssmtp.com header.s=20210112 header.b=q98xAfK0; dmarc=pass (policy=none) header.from=cmpxchg.org; spf=pass (imf19.hostedemail.com: domain of hannes@cmpxchg.org designates 209.85.222.178 as permitted sender) smtp.mailfrom=hannes@cmpxchg.org X-Rspam-User: X-HE-Tag: 1644855841-212110 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: On Fri, Feb 11, 2022 at 11:35:35PM +0100, Sebastian Andrzej Siewior wrote= : > During the integration of PREEMPT_RT support, the code flow around > memcg_check_events() resulted in `twisted code'. Moving the code around > and avoiding then would then lead to an additional local-irq-save > section within memcg_check_events(). While looking better, it adds a > local-irq-save section to code flow which is usually within an > local-irq-off block on non-PREEMPT_RT configurations. >=20 > The threshold event handler is a deprecated memcg v1 feature. Instead o= f > trying to get it to work under PREEMPT_RT just disable it. There should > be no users on PREEMPT_RT. From that perspective it makes even less > sense to get it to work under PREEMPT_RT while having zero users. >=20 > Make memory.soft_limit_in_bytes and cgroup.event_control return > -EOPNOTSUPP on PREEMPT_RT. Make an empty memcg_check_events() and > memcg_write_event_control() which return only -EOPNOTSUPP on PREEMPT_RT= . > Document that the two knobs are disabled on PREEMPT_RT. >=20 > Suggested-by: Michal Hocko > Suggested-by: Michal Koutn=FD > Signed-off-by: Sebastian Andrzej Siewior Acked-by: Johannes Weiner