Received: by 2002:a05:6358:701b:b0:131:369:b2a3 with SMTP id 27csp2413212rwo; Sun, 23 Jul 2023 14:59:11 -0700 (PDT) X-Google-Smtp-Source: APBJJlHXCr/QoCoJbT4K1KXWY+dpng4TEo9xaq4xVlBNhu3uPw9Em8/z5RJAa2Y1vKeiowMoB1yK X-Received: by 2002:a05:6e02:1be3:b0:348:bf82:a917 with SMTP id y3-20020a056e021be300b00348bf82a917mr5574928ilv.26.1690149551329; Sun, 23 Jul 2023 14:59:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690149551; cv=none; d=google.com; s=arc-20160816; b=DHblL8m6qqVq6nylh3/iP740VwY4LmXe1GfkaUaRBw882MpEgTIZlEc8jNxCGbsPeZ q2LpRR5TIpt785vOfca/NZQTow4/1fKowbdUE0Zm6Jg1dvEunNrqzY1SBQUJZSBQhXlt gBiiFrhZnOJeB3ms81Wjvyl15ZIlHrE18ZEvcR3P1TVob7FSwW8GzxjDm3G8UwF31sol UeuyIeQnE2skeIDSfSj6fodyt6XPQU9BWbOmjgHbqk/4u6Uvcela4jaBRSJW4FqZpklG dsK0RAg0Hh/NRj/xWWpeO+kwG4sk22J3RsnTY3Op1ptN7zcVIQiwj/Rljl5AQxPx5sTl Yy+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=qy3ZfgxHtTZ+H6cA0c7w6ZZsFamgKKUHdZT7/5uteAk=; fh=S9pH+NmB60v4GND9gtDyTRcJQHoTAQOVAtKngyg58bg=; b=F8DtHm+Hw+zmJAJ3w2Gt6NAbnora/wB51xxzLzmb5TA3YIHb+tJVS7j3TJfbW9hsT0 aGdWxryJUHRwIQxOvqpmMJSEHsK7vkWbrWKxM6qWJs5/YEeShBfamflF3+hTBMhxd0k4 S4MxOodB5jnZR8jUGjQbeNy2dlGd+R9eLI7l0mWS5uUnFfS/Jl/ey+Zupt8C5rG7f8Nq 41Ha8zacXr9DQA7sa++DpU81XZXeTjEAc3bGkMkuz/SbQtd05YWgMHzQ05+3/el3Y5tf 1epDYMAi87hSbEzDDES2QZJPvxP89eK/e+7p30QDD9KQrf/P7vM482K43PxdExHon9Ne AnkA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=kTr4Znvd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z2-20020a170903018200b001b9d2010c39si8545514plg.192.2023.07.23.14.58.59; Sun, 23 Jul 2023 14:59:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=casper.20170209 header.b=kTr4Znvd; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229756AbjGWUho (ORCPT + 99 others); Sun, 23 Jul 2023 16:37:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229468AbjGWUhm (ORCPT ); Sun, 23 Jul 2023 16:37:42 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 232E0E49; Sun, 23 Jul 2023 13:37:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=qy3ZfgxHtTZ+H6cA0c7w6ZZsFamgKKUHdZT7/5uteAk=; b=kTr4Znvd56MMHUXN0EHN8A34Ch yiVFzsJ9la7YOzyYLmo8iAxAVQiM+usii43xNwFPgEB3Dm89Ext45zyoZLgfbRA4T8YE2AeEfACaF hdlN4RXUJW4jvNU4NOJzGo99BTK+HQo9ASaYlCCYkYPE+iNCCcK8LV1kVkn/JsqOaCl/XMoyn0hJx RQw2aR4JbD5kt7Z+XuffKRiNWeewjEJlhH9GuiZ0SgDFWquMWUKmsqdV/kHmkhcqVJkPVS4IHakPG tjL6ymvrdGUk+ht5MZQDwVUrFlesfweWrITUN076QSLeriL/Y/lb2HtYOOEDJfCYwzH0LEY4YDomT 0eS8ohCg==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1qNfpX-003aTh-8Y; Sun, 23 Jul 2023 20:37:27 +0000 Date: Sun, 23 Jul 2023 21:37:27 +0100 From: Matthew Wilcox To: Miaohe Lin Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, cgroups@vger.kernel.org Subject: Re: [PATCH] mm/memcg: fix obsolete function name in mem_cgroup_protection() Message-ID: References: <20230723032538.3190239-1-linmiaohe@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230723032538.3190239-1-linmiaohe@huawei.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jul 23, 2023 at 11:25:38AM +0800, Miaohe Lin wrote: > @@ -582,9 +582,9 @@ static inline void mem_cgroup_protection(struct mem_cgroup *root, > /* > * There is no reclaim protection applied to a targeted reclaim. > * We are special casing this specific case here because > - * mem_cgroup_protected calculation is not robust enough to keep > - * the protection invariant for calculated effective values for > - * parallel reclaimers with different reclaim target. This is > + * mem_cgroup_calculate_protection calculation is not robust enough > + * to keep the protection invariant for calculated effective values > + * for parallel reclaimers with different reclaim target. This is > * especially a problem for tail memcgs (as they have pages on LRU) > * which would want to have effective values 0 for targeted reclaim > * but a different value for external reclaim. This reads a little awkwardly now. How about: * We are special casing this specific case here because - * mem_cgroup_protected calculation is not robust enough to keep + * mem_cgroup_calculate_protection is not robust enough to keep * the protection invariant for calculated effective values for * parallel reclaimers with different reclaim target. This is