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: <CAL_Jsq+i-3eHF3jkCzr=w7phOhCXN5K3MjrM3SuGS7aYTTEiAQ@mail.gmail.com>
Date:   Wed, 28 Feb 2018 14:54:22 -0600
From:   Rob Herring <robh+dt@...nel.org>
To:     Andy Shevchenko <andy.shevchenko@...il.com>
Cc:     Frank Rowand <frowand.list@...il.com>,
        Chintan Pandya <cpandya@...eaurora.org>,
        devicetree <devicetree@...r.kernel.org>,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v4 1/2] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()

On Wed, Feb 28, 2018 at 2:19 PM, Andy Shevchenko
<andy.shevchenko@...il.com> wrote:
> On Wed, Feb 28, 2018 at 9:44 PM, Frank Rowand <frowand.list@...il.com> wrote:
>> On 02/28/18 11:31, Andy Shevchenko wrote:
>>> On Wed, Feb 28, 2018 at 9:04 PM,  <frowand.list@...il.com> wrote:
>
>>> The question is why O(1) is so important? O(log(n)) wouldn't work?
>>
>> O(1) is not critical.  It was just a nice side result.
>>
>>
>>> Using radix_tree() I suppose allows to dynamically extend or shrink
>>> the cache which would work with DT overlays.
>>
>> The memory usage of the phandle cache in this patch is fairly small.
>> The memory overhead of a radix_tree() would not be justified.
>
> OTOH the advantage I mentioned isn't a good argument?

Yes, but still one that ignores memory usage. I'll take whatever
solution doesn't undo this[1].

Rob

[1] https://lwn.net/Articles/735839/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ