lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Fri, 14 Jul 2023 08:07:42 +0530
From:   Anshuman Khandual <anshuman.khandual@....com>
To:     Matthew Wilcox <willy@...radead.org>,
        Miaohe Lin <linmiaohe@...wei.com>
Cc:     akpm@...ux-foundation.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: remove some useless comments of node_stat_item



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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ