[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1bb4ef5c-5813-fbea-9536-48b339c1e010@gmail.com>
Date: Wed, 20 Jun 2018 22:52:34 -0700
From: Frank Rowand <frowand.list@...il.com>
To: Rob Herring <robh+dt@...nel.org>
Cc: Alan Tull <atull@...nel.org>,
Pantelis Antoniou <pantelis.antoniou@...sulko.com>,
Pantelis Antoniou <panto@...oniou-consulting.com>,
devicetree@...r.kernel.org,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: Re: [RFC PATCH] of: overlay: update phandle cache on overlay apply
and remove
On 06/20/18 11:23, Rob Herring wrote:
> On Sun, Jun 17, 2018 at 10:03 AM, <frowand.list@...il.com> wrote:
>> From: Frank Rowand <frank.rowand@...y.com>
>>
>> A comment in the review of the patch adding the phandle cache said that
>> the cache would have to be updated when modules are applied and removed.
>> This patch implements the cache updates.
>>
>> Fixes: 0b3ce78e90fc ("of: cache phandle nodes to reduce cost of of_find_node_by_phandle()")
>> Reported-by: Alan Tull <atull@...nel.org>
>> Suggested-by: Alan Tull <atull@...nel.org>
>> Signed-off-by: Frank Rowand <frank.rowand@...y.com>
>> ---
>>
>> Compiles for one configuration.
>> NOT boot tested.
>> Not run through my normal process to check for new warnings, etc.
>
> I'm assuming you will resend a non-RFC version for me to apply.
Yes, I will.
>
> I think it would be a bit better if callers didn't have to do free and
> populate themselves, but just made an invalidate call (like a normal
> cache) and re-populating the cache could happen on demand. Or if it
> was done as a single call, you could just copy the old entries to the
> new larger array. But maybe there would be a race condition in doing
> that? In any case, all that could be a subsequent patch.
Yes, the unspoken, underlying issue is a race condition. I'll update
the commit comment to explain the race issues a little bit. And maybe
add a code comment if I can be concise enough.
-Frank
>
> Rob
>
Powered by blists - more mailing lists