Received: by 10.223.185.116 with SMTP id b49csp3321791wrg; Mon, 5 Mar 2018 19:13:24 -0800 (PST) X-Google-Smtp-Source: AG47ELu5yTWXg6Y5sAV2ck1zMk9q2Pe7RcAWsgK13db8TmcsWAgKW3NnSwMPMrgqwdB81KQa7GRb X-Received: by 10.99.96.146 with SMTP id u140mr14022878pgb.211.1520306004617; Mon, 05 Mar 2018 19:13:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520306004; cv=none; d=google.com; s=arc-20160816; b=X76jzZytIcEFbWHqCNTIkAakelS2bDh4u5CQJGexMV+sM94sVaock3z/1GEYpUFc15 AQO12o//ujdFKZMFl6nXGaY+BAg6VVuPHLn+P0BdzgZ2Lc7Wc5Ye5l3f9vmoSeKYYm3e rJ5dW0OQwr3gnSA8QK91ey3PEuHXLOAizUT00CelWDzClUN85q3doH1tsKU4W15XT4rJ I5Le9d3sTHdO/qPdDyLK5MKiZlrAlhGE/T39+UgExacUJ2ghn2CKdvZEBR1FXmPrtVik Syluwwo13mNsoyYSg0r92JSa6N0vLL34ydjT4WFgj6LK4zm/uKNkEhZ71OMC9Nq6ViII 3Zvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=1fTn7fFb9Rk+BkkBEgfoN6lBXgoVM6KWW+oLbQi5zLc=; b=YE2EDvEXB40pixVbuRCrzO/N5Lxos61JneMeUV38RKLnPpnSiyiLc5vuIKgGn3E3ln vLKHhUZ9Q7QhwNONBZ2bAp1nz0z0tFNKyM4tmGuX37ZtQmBMpwv+rNmkXZSy/a6Z7FG8 2wFpu384OMDGCMkjQM07Bs+Ea5E41ooG4YUNdpKCqTwA/csgJknyX+AGCwKKWBP1Y0pl QecRUQbTl1bzYl0v6kP5m8es1R37kvq0WqtSSA5x6KchOR8z6XEI3KxQdlNHO11jA3JI /oRhyASotf1SHPWr73Jw2TKhCxkuRsH/XABcppc9zKnyZzNPCGUlbFJJPP9BwU75FHV0 3v0g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ckad2t9B; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o2si11273360pfg.286.2018.03.05.19.13.10; Mon, 05 Mar 2018 19:13:24 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=ckad2t9B; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753222AbeCFDMI (ORCPT + 99 others); Mon, 5 Mar 2018 22:12:08 -0500 Received: from mail-pl0-f67.google.com ([209.85.160.67]:34963 "EHLO mail-pl0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753164AbeCFDMH (ORCPT ); Mon, 5 Mar 2018 22:12:07 -0500 Received: by mail-pl0-f67.google.com with SMTP id bb3-v6so11090369plb.2; Mon, 05 Mar 2018 19:12:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=1fTn7fFb9Rk+BkkBEgfoN6lBXgoVM6KWW+oLbQi5zLc=; b=ckad2t9BTikZzJ7/UwItkoYs6HU8uM4EgB2Vbbgp9aR+qLto3J1w96Ste37P1RNlxK q864iYcfhLAjMSlsBs5KtdMGo4Pk8qHKMs4zJanrAk2VQ+XK4OAC5h94O3dwqEf+cKTw 8XmwEqjdBlGYU6QSS0sPubGZI+YniLZ+m8Gk/P/dMtAvpDsxNRtMLZReDBunyBAJlpBF ySSAshPMYx7+X3orpoMqP1Lk6kKz0THMMTuDJHjuY6QXcQFx0iK+o2Q9pYpC3vk5EpM+ 8PMz5UHO6KZT+s2aJPFphkxogI/uBJfaJbZ83x5E5ilfM0bh13uXO+VDZSEAhAq+Btn2 weUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=1fTn7fFb9Rk+BkkBEgfoN6lBXgoVM6KWW+oLbQi5zLc=; b=J5EZqZ4UCtyFm7QBmMl+cobpvRdVtai6mY2MWbEzsFWWIp6nxHpG8tOtHZ5UXarBnE hY8FSXHNpif9bEP8L+61yJ8u9l70C3ip+/fF0dOl4tQga80woixOJwmUTgaUVEHDNBPB JWO5sR7C+s41cPfSC7WUQAzzY1xiI+eL63bcWQr7J4v1iEwfNVIazsiarrl6mVcI78YN yrT/DJ7MehPoQtqIatUtdMVnHJC4cVEGttOuwWow80cJAJkgZVzh6LPyxt/SZmhqnyEB WvkaBKm8VzXnval559qwgDOrJEnDVYm5u+vdWeaG2mb1zXrXNFaI3w50imvUb37nGMLK fCBA== X-Gm-Message-State: APf1xPB85vJjwrtLVRvN8K87nQmlTgmowBhEbxhztBSYU/kKw1fbIuMc 9MIzuUcP77aViAB6aGmnmyI= X-Received: by 2002:a17:902:3103:: with SMTP id w3-v6mr14561816plb.99.1520305926896; Mon, 05 Mar 2018 19:12:06 -0800 (PST) Received: from [192.168.1.70] (c-73-93-215-6.hsd1.ca.comcast.net. [73.93.215.6]) by smtp.gmail.com with ESMTPSA id x1sm28609266pfk.144.2018.03.05.19.12.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Mar 2018 19:12:06 -0800 (PST) Subject: Re: [PATCH v5 3/3] of: add early boot allocation of of_find_node_by_phandle() cache To: Rob Herring Cc: Chintan Pandya , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" References: <1520208889-3908-1-git-send-email-frowand.list@gmail.com> <1520208889-3908-4-git-send-email-frowand.list@gmail.com> From: Frank Rowand Message-ID: Date: Mon, 5 Mar 2018 19:12:05 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/05/18 12:26, Rob Herring wrote: > On Sun, Mar 4, 2018 at 6:14 PM, wrote: >> From: Frank Rowand >> >> The initial implementation of the of_find_node_by_phandle() cache >> allocates the cache using kcalloc(). Add an early boot allocation >> of the cache so it will be usable during early boot. Switch over >> to the kcalloc() based cache once normal memory allocation >> becomes available. > > Do we get a lot of lookups early? It makes sense to me to do early, > but freeing and repopulating seems to add needless complexity. Hey, that was my argument. :-) I would be quite happy leaving off patch 3/3. And without 3/3, 2/3 becomes not necessary here, but still could go in separately for completeness. Though it could go in via Andrew. -Frank