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:   Sat, 19 Dec 2020 11:18:43 +0800
From:   Jacob Wen <jian.w.wen@...cle.com>
To:     Chris Down <chris@...isdown.name>
Cc:     Michal Hocko <mhocko@...e.com>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org, akpm@...ux-foundation.org
Subject: Re: [PATCH] mm/vmscan: DRY cleanup for do_try_to_free_pages()


On 12/19/20 9:21 AM, Chris Down wrote:
> Jacob Wen writes:
>> set_task_reclaim_state() is a function with 3 lines of code of which 
>> 2 lines contain WARN_ON_ONCE.
>>
>> I am not comfortable with the current repetition.
>
> Ok, but could you please go into _why_ others should feel that way 
> too? There are equally also reasons to err on the side of leaving code 
> as-is -- since we know it already works, and this code generally has 
> pretty high inertia -- and avoid mutation of code without concrete 
> description of the benefits.

I don't get your point. The patch doesn't change code of 
set_task_reclaim_state(), so I am fine with the repeated WARN_ON_ONCE.

I mean I prefer removing duplicate code to avoid going down the rabbit 
hole of set_task_reclaim_state().

It's a fundamental principle to me to move the code into its own 
function. I'd like to hear the others' opinions.



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ