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: <f876efc4-56b8-0d10-2dae-4eacfaed7e43@redhat.com>
Date:   Wed, 22 Jun 2022 12:49:31 +0200
From:   David Hildenbrand <david@...hat.com>
To:     Muchun Song <songmuchun@...edance.com>
Cc:     Oscar Salvador <osalvador@...e.de>,
        Andrew Morton <akpm@...ux-foundation.org>,
        Michal Hocko <mhocko@...nel.org>, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2 1/2] mm/page_alloc: Do not calculate node's total pages
 and memmap pages when empty

On 22.06.22 10:54, Muchun Song wrote:
> On Wed, Jun 22, 2022 at 10:31:12AM +0200, David Hildenbrand wrote:
>> On 22.06.22 05:56, Muchun Song wrote:
>>> On Wed, Jun 22, 2022 at 05:47:22AM +0200, Oscar Salvador wrote:
>>>> On Tue, Jun 21, 2022 at 09:44:47AM +0200, David Hildenbrand wrote:
>>>>>
>>>>>
>>>>> It's worth noting that the check in pgdat_is_empty() is slightly
>>>>> different. I *think* it doesn't matter in practice, yet I wonder if we
>>>>> should simply fixup (currently unused) pgdat_is_empty().
>>>>
>>>> I guess we could change it to
>>>>
>>>>  static inline bool pgdat_is_empty(pg_data_t *pgdat)
>>>>  {
>>>> 	 return node_start_pfn(pgdat->node_id) == node_end_pfn(pgdat->node_id)
>>>>  }
>>>>
>>>> ? And maybe even rename it to to node_is_empty (not sure why but I tend to like
>>>
>>> At least I like this name (node_is_empty) as well.
>>>
>>
>> Let's try keeping it consistent. I think node_is_empty() might indicate
>> that we're punching in a node id instead of a pgdat.
>>
> 
> I suspect Oscar will change the argument to "nid" as well, like:
> 
> static inline bool node_is_empty(int nid)
> {
> 	return node_start_pfn(nid) == node_end_pfn(nid);
> }
> 
> Does this look good?

Then we have to lookup the pgdat multiple times for (IMHO) no real
compelling reason.


-- 
Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ