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 CFF4FEB64DD for ; Fri, 14 Jul 2023 02:37:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id DE928900003; Thu, 13 Jul 2023 22:37:54 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D9930900002; Thu, 13 Jul 2023 22:37:54 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id C6164900003; Thu, 13 Jul 2023 22:37:54 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id B398A900002 for ; Thu, 13 Jul 2023 22:37:54 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 71BC6C0412 for ; Fri, 14 Jul 2023 02:37:54 +0000 (UTC) X-FDA: 81008657268.29.973A94B Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by imf09.hostedemail.com (Postfix) with ESMTP id 75C37140009 for ; Fri, 14 Jul 2023 02:37:52 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf09.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1689302272; 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=HhENUvt9cr1NDSpJnAJ+IidjfX2H2yfvvT5j6e0VnGw=; b=wRtNPRFWjyIcUZM50NAaSnPwLV7uHc6jdpQzfFMUuvwy6IXRRKu4QnO13EOiDkBhlwd8xu rWUOLhVqkZBoR1FaN+CithWWt2VWYXaFTLr+WLjwoWlq5XCJCwvhSaF55xeiN5N8kQBF/2 X0fhA3WttINDaDN8eNVOYsQxCjoib2c= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=none; dmarc=pass (policy=none) header.from=arm.com; spf=pass (imf09.hostedemail.com: domain of anshuman.khandual@arm.com designates 217.140.110.172 as permitted sender) smtp.mailfrom=anshuman.khandual@arm.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689302272; a=rsa-sha256; cv=none; b=o9tTVRT8iORd19I5F1YJ3U5Vwf2mLKn8kIbgHZ67NHvYocj7bDPoXbIU389Sj0RiAqA/VR ZmkTaK1BefOtmNOrSpZkk4g/qRcHOSBF92Yoi7wvQSp9vCjKnOySdJ3ruz9rxO9adKbmeH Gx5Cq5O9pbugIuLjp9j8u0VUp636COw= Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 85EEF1570; Thu, 13 Jul 2023 19:38:33 -0700 (PDT) Received: from [10.163.47.78] (unknown [10.163.47.78]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 858723F67D; Thu, 13 Jul 2023 19:37:44 -0700 (PDT) Message-ID: <713a99fe-8c43-b416-a574-db235705693d@arm.com> Date: Fri, 14 Jul 2023 08:07:42 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH] mm: remove some useless comments of node_stat_item To: Matthew Wilcox , Miaohe Lin Cc: akpm@linux-foundation.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org References: <20230713114915.74671-1-linmiaohe@huawei.com> <55c255df-9c7c-744f-e1a1-27602fcb5509@huawei.com> Content-Language: en-US From: Anshuman Khandual In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 75C37140009 X-Stat-Signature: 76wifmktsd1u3ifpp1m964ymrz116xkg X-HE-Tag: 1689302272-137219 X-HE-Meta: U2FsdGVkX19fnYxBAs+b+MCZSfI4wM8P/XOAN41D4OfpQwTGr6yHZlQQ5AT3j4iHfWGUIPaysSKvqS731Y/vorGothCDF03Y3fp3Q9u72Kp0PYKrkj5vFqQJaSBTg4M3ggJRyDb2lctfGMYCWuww330ukFYF+2t2bZ8qiylCbpHeUEz9DEt3MvSI0eKAsXgpUIwG9zyuWvtFufvc2K7IuVo8OIxc5uWeCVkuKVmuca6Oxycj7zVTiMBEoa+856jZ5nbXZ2PQ6HXIt4BPPURmxvVEOkjJ3TOiX/U1a2uEodu/59QWmZ3nCvS885ATnUa4YU++5SCCQsQ+ENZqS+oCveMhanOJX6ircbexNns7dHCU9a7fxwDCOhekAWSQ8rfEyobVfwBp856Tch9Ev+PyJ/0dmSKMwHIpOlMcnrreZ7mUQC5s+iLzmK3m9R/APyOYr385nngyO1jZBaODXL7kElVQgzwiPDY/HYvlwr3h4ZfYHS7vEa5hLHoJasF9Esfd+Wje4F/a6SkBRfgzJn/eAU2mZvVO0IGHV6y2PVyNByYuIE4NQOBjQ4YjYKtig37WNmQkasw0Sogls4Qk4EfYPQEjLMYbfe9M1hN8D35UU6HRcuB0smw58x4F/nTQ8c1wZcxCYZtyrJBRatah+s+cXo4wTsejx7cFPdzFyLTrPFaUOOCBT1XyOO0DletMJBqX7c6cyR4q3xg/eeuRmN10G3YtimgD15mcFM+LVTxmR/goR5iu9ZkDwPPqdoFtjGuEgkK1M4FKZrkAyks2aM15judxNWUVP9FPhVUYXGIb3oRVgHEVKs7Ks4nURnQMELuPc5Lx78Qb+8L7brzAmdKo8qAmJI7kBMT8n25eXDR7lQs7Y51bePBpXxbbnBJIK7ZqQOGPw2vQj6oalianFIjtqUcYWXgehHFAho2dO7jktPKp5fuJ6sJbMNv+tsOQTYpOrwaXEQJRWPOABD3MkW+ gUlJ6zm6 jJP9lf7b9Zvq1mIi94pyPzg6H9yjakfIsvoGCXDanWfOJOex61OYOWDeI6vBj+GBmvkAzSx/tCcYbr3ul3NVvcwJ9OscjlxuaftmXKbU4ilcmgiDSZ8v80wvVgj6saG3Q8jMLUHUUYqv++Uo6H72Is2kctg== 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 7/13/23 18:01, Matthew Wilcox wrote: > On Thu, Jul 13, 2023 at 08:18:29PM +0800, Miaohe Lin wrote: >> On 2023/7/13 20:10, Matthew Wilcox wrote: >>> On Thu, Jul 13, 2023 at 07:49:15PM +0800, Miaohe Lin wrote: >>>> Some comments of node_stat_item are not that helpful and even confusing, >>>> so remove them. No functional change intended. >>> >>> No, that's very useful and important. Why does it confuse you? >> >> Thanks for your quick respond. >> >> I just can't figure out what these comments want to tell. Could you help explain these? > > Don't snip the thing you want explained to you! > > NR_INACTIVE_ANON = NR_LRU_BASE, /* must match order of LRU_[IN]ACTIVE */ > - NR_ACTIVE_ANON, /* " " " " " */ > - NR_INACTIVE_FILE, /* " " " " " */ > - NR_ACTIVE_FILE, /* " " " " " */ > - NR_UNEVICTABLE, /* " " " " " */ > + NR_ACTIVE_ANON, > + NR_INACTIVE_FILE, > + NR_ACTIVE_FILE, > + NR_UNEVICTABLE, > > What this is communicating to me is that these five items > (NR_INACTIVE_ANON to NR_UNEVICTABLE) must stay in the same order with > LRU_INACTIVE and LRU_ACTIVE. By removing the ditto-marks from the > subsequent four lines, you've made the comment say that this one line > must stay in the same order as LRU_INACTIVE and LRU_ACTIVE ... which > makes no sense at all. Just wondering - would it be better to repeat these comments in words for each line than use "ditto-marks" ?