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] [thread-next>] [day] [month] [year] [list]
Message-ID: <1fc997cf-b1f3-3fe6-b699-efb9ef7f17cf@redhat.com>
Date:   Tue, 17 Dec 2019 18:24:38 +0100
From:   David Hildenbrand <david@...hat.com>
To:     Alexander Duyck <alexander.h.duyck@...ux.intel.com>,
        Alexander Duyck <alexander.duyck@...il.com>,
        kvm@...r.kernel.org, mst@...hat.com, linux-kernel@...r.kernel.org,
        willy@...radead.org, mhocko@...nel.org, linux-mm@...ck.org,
        akpm@...ux-foundation.org, mgorman@...hsingularity.net,
        vbabka@...e.cz
Cc:     yang.zhang.wz@...il.com, nitesh@...hat.com, konrad.wilk@...cle.com,
        pagupta@...hat.com, riel@...riel.com, lcapitulino@...hat.com,
        dave.hansen@...el.com, wei.w.wang@...el.com, aarcange@...hat.com,
        pbonzini@...hat.com, dan.j.williams@...el.com, osalvador@...e.de
Subject: Re: [PATCH v15 3/7] mm: Add function __putback_isolated_page

 >>> Also there are some scenarios where __page_to_pfn is not that simple a
>>> call with us having to get the node ID so we can find the pgdat structure
>>> to perform the calculation. I'm not sure the compiler would be ble to
>>> figure out that the result is the same for both calls, so it is better to
>>> make it explicit.
>>
>> Only in case of CONFIG_SPARSEMEM we have to go via the section - but I
>> doubt this is really worth optimizing here.
>>
>> But yeah, I'm fine with this change, only "IMHO
>> get_pageblock_migratetype() would be nicer" :)
> 
> Aren't most distros running with CONFIG_SPARSEMEM enabled? If that is the
> case why not optimize for it?

Because I tend to dislike micro-optimizations without performance
numbers for code that is not on a hot path. But I mean in this case, as
you said, you need the pfn either way, so it's completely fine with.

I do wonder, however, if you should just pass in the migratetype from
the caller. That would be even faster ;)

-- 
Thanks,

David / dhildenb

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ