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 083B8C001B0 for ; Mon, 24 Jul 2023 01:52:53 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 663536B0071; Sun, 23 Jul 2023 21:52:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 613806B0074; Sun, 23 Jul 2023 21:52:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5021C6B0075; Sun, 23 Jul 2023 21:52:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 4287E6B0071 for ; Sun, 23 Jul 2023 21:52:53 -0400 (EDT) Received: from smtpin15.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 00A911C9111 for ; Mon, 24 Jul 2023 01:52:52 +0000 (UTC) X-FDA: 81044831784.15.1EF58E6 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf12.hostedemail.com (Postfix) with ESMTP id 6D7DA4000F for ; Mon, 24 Jul 2023 01:52:48 +0000 (UTC) Authentication-Results: imf12.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf12.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1690163571; a=rsa-sha256; cv=none; b=a6bbk4B/PlY8N0q7G5Lnl8wN+180gPh+8+Wp1gOo1a4uhtTxRjZ85bkvzxM8N9tMmUByFR o5yqoV7kyT5dk/hFOpIrfTEmhmJOsXNxjXWYNJo1Qr+p+GYNUpe/nAfyJXacP8MjhG0i7X C7ZZZdjmVkJVGAp+terk+/v5lfww83Q= ARC-Authentication-Results: i=1; imf12.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf12.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1690163571; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OfunpU4gdxGlhY4eZeLjZhkzDGDulvQGUCbfZugjBKs=; b=OJE8lMiLP2dvNq0DSRWnD5bvMi0CJsVo9UJbC/9f1QEYDMGBFJVOBORVQT21JA6aogi6cn bAVzd3KkBQB0ZzFu89hmCVVXfNfobsU8O3lN/KjmWRHnL0lVKOGtYKERD7XuIbIRsvccz3 /T2HpGfC9PhE28SnfLtyd2sd0Aq7B9w= Received: from canpemm500002.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4R8NST2PnKzrRr6; Mon, 24 Jul 2023 09:51:53 +0800 (CST) Received: from [10.174.151.185] (10.174.151.185) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Mon, 24 Jul 2023 09:52:43 +0800 Subject: Re: [PATCH] mm/memcg: fix obsolete function name in mem_cgroup_protection() To: Matthew Wilcox CC: , , , References: <20230723032538.3190239-1-linmiaohe@huawei.com> From: Miaohe Lin Message-ID: Date: Mon, 24 Jul 2023 09:52:43 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.151.185] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Rspamd-Server: rspam08 X-Rspamd-Queue-Id: 6D7DA4000F X-Stat-Signature: cg3twuukeky83ssomdccccwehxbzm3wu X-Rspam-User: X-HE-Tag: 1690163568-880142 X-HE-Meta: U2FsdGVkX19Mdj6qvsIBt6oYSyCT147zF7BcsqTNObsHp80s+HlYCs8V4GGSEEFdMXx+7ieNKYECU8ZAZuwY8tWZOcjnjFoOWwm5k9W/3YCWEZ4ZsKqK2jRVt7QBQaCWEUgoooyS4DxafbGmgMKMFopxMP5ioMIpJFdgNUvgSV8IwqWouEL9MYHJCpU4PKcYodlvbhzYlvqOlnff5LFVypncGLfj3VLRN8Pb3eweo17EOgYd4N7h3LrZu5gpAH2oU5NPFynKZC1MSKrpugC5oHHguoO3SilHYbI0gu/u3GtBXt9/BIbzxLAO2o2U+gxMvgSLwFEGAQ8eb/77raIblKwi59cpi59Sx1uTg5aEonWLKhaMTzJyXcAIiveknIqYxuIsZccnABpwUv+3uSiIOR8iOj9iCE5g2Vq7LPUCn/svTcwMeU3LX3Papx1zLiUxR1q74YbpZoe9IzIo9ShOTD8YzCgNKCdbgSHjwrVb0JpkkQigMo6Cb15a7OHD4Bgu3kqsJdeAOzadvNTGg/DvLgUR0ej951cwOLfpyyqbnRtYA5ZVnu8e2Yrk7HRTSAuddYGJHWc09u3wcWBGUAVnltFlH49pqEjGPAKkXsNlqrEFHIli9SdJcX/k/yt6KlLaUPoT8jCpv5U4KWABTdSwuWLRrrENeqczVY/JHrsEe2tGYbeDuawsHgOaqkuEMJc4R890CQt6cMrn/0swhna3IW/s1Cy6aY5osr6MAm6PfKPV09XK8uehRnm9PoQSykMFgcowDHx2BzhaRSlznV0MpzUG6GMt8q7gMuf8EPVUkz9FKtfzUcVLRAMDUOSN4llrFYYAr8lA6xtyNTDJD1mbntsqbHXY2qRxfHoKXALc3A9dvzchyiw//pEX9Qi7e6mGd2YTe7Ftm1kd3ZIy49Zc6Lz71GJ8pHguyT5j2wXjiGAJX39MTGOPUXV+8XA+eaFvcExJXd3HIpjX8lvQI6b gP05fWE3 yPtDZJTU7RNj5XQYjjKrOuNiewwPGEmpvstdXLhygt4hz/3atrPQP6Fc7YXQHyjqjcY10zGQe1v8HFlAfcNMUd6nfFwP/rNGF6k2jyyDlOug2MhtX4A50ycFqaTl8WGVU39hiqkmNafugeqcmcjdFA+Y2xOjvtLEIE/uFNhoMVj/NZi1zDQt+91EbCg== 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 2023/7/24 4:37, Matthew Wilcox wrote: > 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 Sounds better. Will do it in v2. Thanks.