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 28681C433EF for ; Wed, 15 Dec 2021 16:56:26 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 70BE36B0071; Wed, 15 Dec 2021 11:56:16 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 6A2806B0073; Wed, 15 Dec 2021 11:56:16 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 583526B0074; Wed, 15 Dec 2021 11:56:16 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0086.hostedemail.com [216.40.44.86]) by kanga.kvack.org (Postfix) with ESMTP id 454656B0071 for ; Wed, 15 Dec 2021 11:56:16 -0500 (EST) Received: from smtpin19.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with ESMTP id 0BBC38249980 for ; Wed, 15 Dec 2021 16:56:06 +0000 (UTC) X-FDA: 78920631132.19.4248503 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by imf07.hostedemail.com (Postfix) with ESMTP id 637C64001B for ; Wed, 15 Dec 2021 16:56:05 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 45FC8212C1; Wed, 15 Dec 2021 16:56:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1639587364; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Q0eq0yhnqn4qP+5Put1jaNb43h1kXvYVfgQCKuv1gGo=; b=UoqQWEvUVAgsq4G3d+FzDQ5TN0pSY3bRspcf0bKjmFBlRM034GhgR/vmdOWfOhyXO0zMRj 6NiTJv4p4y17sKT3cSDQhtQ36uk5nVhCLUnZ92dNBeeH3iQM54FlPpZ8l/MnKMMQ0xS1sO Jjf9LBJ1qOetguaus5cwE4HcSLvcjvw= Received: from suse.cz (unknown [10.100.201.86]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 05AE8A3B8C; Wed, 15 Dec 2021 16:56:03 +0000 (UTC) Date: Wed, 15 Dec 2021 17:56:03 +0100 From: Michal Hocko To: Sebastian Andrzej Siewior Cc: Johannes Weiner , cgroups@vger.kernel.org, linux-mm@kvack.org, Andrew Morton , Thomas Gleixner , Vladimir Davydov , Waiman Long Subject: Re: [PATCH] mm/memcontrol: Disable on PREEMPT_RT Message-ID: References: <20211207155208.eyre5svucpg7krxe@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam07 X-Rspamd-Queue-Id: 637C64001B X-Stat-Signature: 7cxu1bk83f8qyeauhc5rstuk9fyccj5r Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=UoqQWEvU; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf07.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.28 as permitted sender) smtp.mailfrom=mhocko@suse.com X-HE-Tag: 1639587365-82941 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 Wed 15-12-21 17:47:54, Sebastian Andrzej Siewior wrote: > On 2021-12-13 11:08:26 [+0100], Michal Hocko wrote: > > On Fri 10-12-21 16:22:01, Sebastian Andrzej Siewior wrote: > > [...] > > I am sorry but I didn't get to read and digest the rest of the message > > yet. Let me just point out this > > > > > The problematic part here is mem_cgroup_tree_per_node::lock which can > > > not be acquired with disabled interrupts on PREEMPT_RT. The "locking > > > scope" is not always clear to me. Also, if it is _just_ the counter, > > > then we might solve this differently. > > > > I do not think you should be losing sleep over soft limit reclaim. This > > is certainly not something to be used for RT workloads and rather than > > touching that code I think it makes some sense to simply disallow soft > > limit with RT enabled (i.e. do not allow to set any soft limit). > > Okay. So instead of disabling it entirely you suggest I should take > another stab at it? Okay. Disabling softlimit, where should I start with > it? Should mem_cgroup_write() for RES_SOFT_LIMIT always return an error > or something else? Yeah, I would just return an error for RT configuration. If we ever need to implement that behavior for RT then we can look at specific fixes. Thanks! -- Michal Hocko SUSE Labs