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 4B0D6C433F5 for ; Tue, 15 Mar 2022 08:53:01 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CE7938D0003; Tue, 15 Mar 2022 04:53:00 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CA2788D0001; Tue, 15 Mar 2022 04:53:00 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B862A8D0003; Tue, 15 Mar 2022 04:53:00 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0139.hostedemail.com [216.40.44.139]) by kanga.kvack.org (Postfix) with ESMTP id A9D1E8D0001 for ; Tue, 15 Mar 2022 04:53:00 -0400 (EDT) Received: from smtpin28.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay01.hostedemail.com (Postfix) with ESMTP id 585D61821CC1D for ; Tue, 15 Mar 2022 08:53:00 +0000 (UTC) X-FDA: 79246005678.28.DCBC958 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by imf17.hostedemail.com (Postfix) with ESMTP id C16FE40004 for ; Tue, 15 Mar 2022 08:52:59 +0000 (UTC) Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id 96EDF1F37E; Tue, 15 Mar 2022 08:52:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1647334378; 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=0Wb88545i+4GjfuUzkTW0/rBBA3pVcbxmgsSI00NEnI=; b=DTOMEkvVV36MyxPlreZceP6EZiM5h4C63EtctwZ4uxDogkFL8tBVACTedPBu/dClCDmcIZ hCSKjspYoyWJDZSlu2YAP6haQbp8EaN73pjliwk5JJXNJ9Oa8EUfwuY2OT8CVvjmjPhczi pl9mPWWpMH0w+tdop26PYTgxzZIg4m4= 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 63097A3B87; Tue, 15 Mar 2022 08:52:58 +0000 (UTC) Date: Tue, 15 Mar 2022 09:52:57 +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 Subject: Re: [Patch v2 2/3] mm/memcg: __mem_cgroup_remove_exceeded could handle a !on-tree mz properly Message-ID: References: <20220312071623.19050-1-richard.weiyang@gmail.com> <20220312071623.19050-2-richard.weiyang@gmail.com> <20220314225150.fhwny4yhxgjevwxx@master> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220314225150.fhwny4yhxgjevwxx@master> X-Rspam-User: X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: C16FE40004 X-Stat-Signature: egakgbhmnbracaff6kz31my8ytosh9mm Authentication-Results: imf17.hostedemail.com; dkim=pass header.d=suse.com header.s=susede1 header.b=DTOMEkvV; dmarc=pass (policy=quarantine) header.from=suse.com; spf=pass (imf17.hostedemail.com: domain of mhocko@suse.com designates 195.135.220.29 as permitted sender) smtp.mailfrom=mhocko@suse.com X-HE-Tag: 1647334379-302962 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 Mon 14-03-22 22:51:50, Wei Yang wrote: > On Mon, Mar 14, 2022 at 10:54:03AM +0100, Michal Hocko wrote: > >On Sat 12-03-22 07:16:22, Wei Yang wrote: > >> There is no tree operation if mz is not on-tree. > > > >This doesn't explain problem you are trying to solve nor does it make > >much sense to me TBH. > > > > This just tries to make the code looks consistent. I guess this is rather subjective. One could argue that the check is more descriptive because it obviously removes the node from the tree when it is on the tree. -- Michal Hocko SUSE Labs