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]
Message-ID: <96439797-355e-493f-b652-1d933c4739b8@redhat.com>
Date: Wed, 7 Aug 2024 14:03:52 +0200
From: David Hildenbrand <david@...hat.com>
To: Leesoo Ahn <lsahn@...eel.net>, Mike Rapoport <rppt@...nel.org>
Cc: Leesoo Ahn <lsahn@...akecorp.com>,
 Andrew Morton <akpm@...ux-foundation.org>, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm/sparse: return right away if sparsemap_buf is null

On 07.08.24 05:21, Leesoo Ahn wrote:
> 2024년 7월 28일 (일) 오후 9:43, Mike Rapoport <rppt@...nel.org>님이 작성:
>>
>> On Fri, Jul 26, 2024 at 04:10:23PM +0900, Leesoo Ahn wrote:
>>> sparse_buffer_fini(..) takes the following actions even though the value of
>>> sparsemap_buf is NULL,
>>> 1. calculate size of sparsemap buffer (which is meaningless).
>>> 2. set sparsemap_buf variable to NULL (although it is already NULL).
>>>
>>> These steps are unnecessary if the variable, sparsemap_buf is NULL.
>>>
>>> Refactor the function to return right away if the variable is NULL.
>>> Hence, it doesn't need to take further actions.
>>
>> sparse_buffer_fini() is called a few times on init so saving a jump (if at
>> all) does not worth the churn.
> 
> Fair enough.
> 
> Any related to refactoring codebase will be unlikely to be taken into upstream??

Any reasonable cleanups or reasonable optimizations are welcome.

Micro-optimizations that effectively add code/LOC, not so much :)

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ