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 EE338C433EF for ; Thu, 10 Mar 2022 08:59:33 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 6D6E28D0002; Thu, 10 Mar 2022 03:59:33 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 686A48D0001; Thu, 10 Mar 2022 03:59:33 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 54EA48D0002; Thu, 10 Mar 2022 03:59:33 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0090.hostedemail.com [216.40.44.90]) by kanga.kvack.org (Postfix) with ESMTP id 40E4A8D0001 for ; Thu, 10 Mar 2022 03:59:33 -0500 (EST) Received: from smtpin18.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id E27D6181C49AB for ; Thu, 10 Mar 2022 08:59:32 +0000 (UTC) X-FDA: 79227878184.18.14E66B8 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf30.hostedemail.com (Postfix) with ESMTP id 4D10F80019 for ; Thu, 10 Mar 2022 08:59:32 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 21E841F381; Thu, 10 Mar 2022 08:59:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1646902771; 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=A2tx04p/KSEJFzMMLCMxNtcpoNboTHg9YDAAKmm2DYA=; b=VXIAcD8dd86ZuUY5S18Rif2jBHHChRst37CsbQWmebMzB8YUvjurTIktrQhDc3P0Sxt+t1 IjWfmL1RSs37CJgYqBM+kctOhUC17Ds3eoPlCFKxMUtucTi04tYGW0hD/KJooRW7k/MZfn lxqWyCqFgd+Cop+/Ma29drhBxZ0FJCs= 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 E4570A3B87; Thu, 10 Mar 2022 08:59:30 +0000 (UTC) Date: Thu, 10 Mar 2022 09:59:30 +0100 From: Michal Hocko To: Wei Yang Cc: hannes@cmpxchg.org, vdavydov.dev@gmail.com, akpm@linux-foundation.org, cgroups@vger.kernel.org, linux-mm@kvack.org, Tim Chen Subject: Re: [PATCH 3/3] mm/memcg: add next_mz back if not reclaimed yet Message-ID: References: <20220308012047.26638-1-richard.weiyang@gmail.com> <20220308012047.26638-3-richard.weiyang@gmail.com> <20220309004620.fgotfh4wsquscbfn@master> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Rspamd-Server: rspam05 X-Rspamd-Queue-Id: 4D10F80019 X-Rspam-User: Authentication-Results: imf30.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=VXIAcD8d; spf=pass (imf30.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com; dmarc=pass (policy=quarantine) header.from=suse.com X-Stat-Signature: 33qf7twgjp5sgxkmdxrpjrn6i1mwbdws X-HE-Tag: 1646902772-67415 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 09-03-22 14:48:46, Michal Hocko wrote: > [Cc Tim - the patch is http://lkml.kernel.org/r/20220308012047.26638-3-richard.weiyang@gmail.com] > > On Wed 09-03-22 00:46:20, Wei Yang wrote: > > On Tue, Mar 08, 2022 at 09:17:58AM +0100, Michal Hocko wrote: > > >On Tue 08-03-22 01:20:47, Wei Yang wrote: > > >> next_mz is removed from rb_tree, let's add it back if no reclaim has > > >> been tried. > > > > > >Could you elaborate more why we need/want this? > > > > > > > Per my understanding, we add back the right most node even reclaim makes no > > progress, so it is reasonable to add back a node if we didn't get a chance to > > do reclaim on it. > > Your patch sounded familiar and I can remember now. The same fix has > been posted by Tim last year > https://lore.kernel.org/linux-mm/8d35206601ccf0e1fe021d24405b2a0c2f4e052f.1613584277.git.tim.c.chen@linux.intel.com/ Btw. I forgot to mention yesterday. Whatever was the reason this has slipped through cracks it would great if you could reuse the changelog of the original patch which was more verbose and explicit about the underlying problem. The only remaining part I would add is a description of how serious the problem is. The removed memcg would be out of the excess tree until further memory charges would get it back. But that can take arbitrary amount of time. Whether that is a real problem would depend on the workload of course but considering how coarse of a tool the soft limit is it is possible that this is not something most users would even notice. -- Michal Hocko SUSE Labs