From: Frank Rowand <frowand.list@gmail.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>,
cpandya@codeaurora.org, devicetree <devicetree@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v4 1/2] of: cache phandle nodes to reduce cost of of_find_node_by_phandle()
Date: Wed, 28 Feb 2018 12:58:22 -0800 [thread overview]
Message-ID: <9a078531-74ba-55f8-0dd1-961504b306b4@gmail.com> (raw)
In-Reply-To: <CAHp75Vc4jbJqM0=Yy-1SY6E2WhzHOAAcrn1+KE-jT7MWPtWPpA@mail.gmail.com>
On 02/28/18 12:19, Andy Shevchenko wrote:
> On Wed, Feb 28, 2018 at 9:44 PM, Frank Rowand <frowand.list@gmail.com> wrote:
>> On 02/28/18 11:31, Andy Shevchenko wrote:
>>> On Wed, Feb 28, 2018 at 9:04 PM, <frowand.list@gmail.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?
No. Deleting and re-creating the cache to resize it (when applying an
overlay) would be a rare event that would happen as desired by the
overlay application code. There is no real gain by having extension
or shrinkage occur automatically and if the overlay application code
desires the resizing it is trivial to implement (a single function
call).
next prev parent reply other threads:[~2018-02-28 20:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-28 19:04 [PATCH v4 0/2] " frowand.list
2018-02-28 19:04 ` [PATCH v4 1/2] " frowand.list
2018-02-28 19:31 ` Andy Shevchenko
2018-02-28 19:44 ` Frank Rowand
2018-02-28 20:19 ` Andy Shevchenko
2018-02-28 20:54 ` Rob Herring
2018-02-28 20:58 ` Frank Rowand [this message]
2018-02-28 19:04 ` [PATCH v4 2/2] of: add early boot allocation of of_find_node_by_phandle() cache frowand.list
2018-03-03 5:25 ` [of] b013aa45d2: kernel_BUG_at_arch/x86/mm/physaddr.c kernel test robot
2018-03-03 7:38 ` [PATCH v4 2/2] of: add early boot allocation of of_find_node_by_phandle() cache kbuild test robot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9a078531-74ba-55f8-0dd1-961504b306b4@gmail.com \
--to=frowand.list@gmail.com \
--cc=andy.shevchenko@gmail.com \
--cc=cpandya@codeaurora.org \
--cc=devicetree@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®