Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp1091024imm; Wed, 20 Jun 2018 11:24:27 -0700 (PDT) X-Google-Smtp-Source: ADUXVKK7CvKAY1Inco8V5TeM3c81TC2yojEQGGU6dxEEuu7hywsvCSO9kU+2SnWpQOPEqlJYyPDh X-Received: by 2002:a17:902:b48f:: with SMTP id y15-v6mr25072675plr.261.1529519067012; Wed, 20 Jun 2018 11:24:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529519066; cv=none; d=google.com; s=arc-20160816; b=JuphfmCCT54OEhToVy5RsC1nf3qMi+DXYZHqBy3EL+dTWl4fxSXix8Z9bBqD9MIi0o 49H5cKhH3GH0dFA4QcBOjIYpTdVDsV4gXyKMLYsGs8MWvShpGqzLvkg1XiaSE36BHi8y 2nYQ17e7F5OUrJfrRasdKsndHLlH4pJsW1tvPkgruzVyLAhQbgX3U8RRJWaWyCv6tXf0 qGktTv572tVOclMgA/Cfnk6gcQmU4ObMADA014Iadv/U8FHu5kWiovxXDJ8gRZy+tiHj HuYr2ehJxG5rjXVXuocxDd6iE2ftP85GasjSOCqqoCBcBek2LbjUmyKjeOzYGKArhXBY 6LiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=0hNSuCiymjwEnOpjg5PGfaPANqHCYmApIGXIoZOs/3s=; b=df7aN82V11qjiTfs9NQFdeEMp1KLzPuQFAD0oz/CIugz5aqqdzmHrhy3SD7dyw2JmF oPL5yL7pea0uOjl4Km0IeZhUbTo/c80fxgxxhxbNozm46RwBBA4MRO4ZfPv3LT1M7Gvg qxDCYGBMZvm0iFbemAWrlk21L1uc1cj+f/aotYTi8wRzc043PqZyIW/CScokw0m3r0qj D2lOtXyZlZLI99lOHWk0EGx9ILuWi/b7xHdyNSr6dyTnbq0zstkvDFREdcXgEFIjbWb7 AhMtgOT3B6ZbghmIYX/E0Ab6RIR7kE83nhkJWbVY8CzLibKTpMwx++AlWVJmCi2Cpkue jt3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=v9xMI7s0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x125-v6si2972811pfb.237.2018.06.20.11.24.12; Wed, 20 Jun 2018 11:24:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=v9xMI7s0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754604AbeFTSXZ (ORCPT + 99 others); Wed, 20 Jun 2018 14:23:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:36480 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754444AbeFTSXX (ORCPT ); Wed, 20 Jun 2018 14:23:23 -0400 Received: from mail-it0-f44.google.com (mail-it0-f44.google.com [209.85.214.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 21E06208A1; Wed, 20 Jun 2018 18:23:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1529519003; bh=Dtsb2syDoYaww3/Ab8aq7CbXEVOm4s5H7Mtgp6kVUgI=; h=In-Reply-To:References:From:Date:Subject:To:Cc:From; b=v9xMI7s0Iyl6zNulY7WaFlWNn6o7MeexHVsRAyd1PL2BhoPYFWLYMfT8UfptB+D2+ ZEaiKaB2SN6cmIXlpSFf/zEN7tSdxjGEjjTQhLDSfspQIkl3c/Q/huXesbdFx/qeFP SKTCAz79fm49k23zD9+5t6T9s9/bVCj+lqFIxq0U= Received: by mail-it0-f44.google.com with SMTP id k17-v6so233272ita.0; Wed, 20 Jun 2018 11:23:23 -0700 (PDT) X-Gm-Message-State: APt69E0yxHl770PojC+63U0fZMZSoKaEW5gS2hJmUBOFK/7UmfwVQzbo f88qn/xxVimpIOYVBtVgg2/A1Ov/EAXWHq2B/g== X-Received: by 2002:a24:798f:: with SMTP id z137-v6mr2362804itc.19.1529519002541; Wed, 20 Jun 2018 11:23:22 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a4f:6403:0:0:0:0:0 with HTTP; Wed, 20 Jun 2018 11:23:01 -0700 (PDT) In-Reply-To: <1529251416-14814-1-git-send-email-frowand.list@gmail.com> References: <1529251416-14814-1-git-send-email-frowand.list@gmail.com> From: Rob Herring Date: Wed, 20 Jun 2018 12:23:01 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [RFC PATCH] of: overlay: update phandle cache on overlay apply and remove To: Frank Rowand Cc: Alan Tull , Pantelis Antoniou , Pantelis Antoniou , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" , Geert Uytterhoeven Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jun 17, 2018 at 10:03 AM, wrote: > From: Frank Rowand > > 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 > Suggested-by: Alan Tull > Signed-off-by: Frank Rowand > --- > > 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. 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. Rob