linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Anshuman Khandual <anshuman.khandual@arm.com>
To: Matthew Wilcox <willy@infradead.org>, Miaohe Lin <linmiaohe@huawei.com>
Cc: akpm@linux-foundation.org, linux-mm@kvack.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: remove some useless comments of node_stat_item
Date: Fri, 14 Jul 2023 08:07:42 +0530	[thread overview]
Message-ID: <713a99fe-8c43-b416-a574-db235705693d@arm.com> (raw)
In-Reply-To: <ZK/uukqNMQYyyNif@casper.infradead.org>



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" ?


      parent reply	other threads:[~2023-07-14  2:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-13 11:49 Miaohe Lin
2023-07-13 12:10 ` Matthew Wilcox
2023-07-13 12:18   ` Miaohe Lin
2023-07-13 12:31     ` Matthew Wilcox
2023-07-14  1:36       ` Miaohe Lin
2023-07-14  2:37       ` Anshuman Khandual [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=713a99fe-8c43-b416-a574-db235705693d@arm.com \
    --to=anshuman.khandual@arm.com \
    --cc=akpm@linux-foundation.org \
    --cc=linmiaohe@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox