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: <c741e6c0-6a36-4402-b818-ff55399397fc@redhat.com>
Date: Wed, 11 Dec 2024 14:04:23 +0100
From: David Hildenbrand <david@...hat.com>
To: Johannes Weiner <hannes@...xchg.org>
Cc: linux-kernel@...r.kernel.org, linux-mm@...ck.org,
 Andrew Morton <akpm@...ux-foundation.org>, Zi Yan <ziy@...dia.com>,
 Vlastimil Babka <vbabka@...e.cz>, Yu Zhao <yuzhao@...gle.com>
Subject: Re: [PATCH v2 1/2] mm/page_alloc: conditionally split >
 pageblock_order pages in free_one_page() and move_freepages_block_isolate()

>> Having a function guess the caller is a bit of an anti-pattern. The
>> resulting code is hard to follow, and it's very easy to
>> unintentionally burden some cases with unnecessary stuff. It's better
>> to unshare paths until you don't need conditionals like this.
>   > > In addition to the fastpath, I think you're also punishing the
>> move_freepages_block_isolate() case. We *know* we just changed the
>> type of one of the buddy's blocks, and yet you're still checking the
>> the range again to decide whether to split.
> 
> Yes, that's not ideal, and it would be easy to unshare that case (call
> the "split" function instead of a "maybe_split" function).
> 
> I am not 100% sure though, if move_freepages_block_isolate() can always
> decide "I really have a mixture", but that code is simply quite advanced :)

I played with it, and I think we can indeed assume that 
move_freepages_block_isolate() will always have to split.

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ