Received: by 10.223.185.116 with SMTP id b49csp3013631wrg; Mon, 5 Mar 2018 12:28:28 -0800 (PST) X-Google-Smtp-Source: AG47ELt/t1ROPAjwwNS+kH4vbAm99mDjGcqpvYHRLrrdHUc7tSDNpYYzZdBgTiMC+aRryIO9loWg X-Received: by 2002:a17:902:243:: with SMTP id 61-v6mr14216137plc.202.1520281708475; Mon, 05 Mar 2018 12:28:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1520281708; cv=none; d=google.com; s=arc-20160816; b=oQPgNTxHFV7Y49qkvRUobFNMsVBOK0SDs/A5U9KejgYAo0XldEFfkCtAol+gksigQG pjiGLjlQ/8TfcdyrMQktZTcqOq/nvfP3xROUDP6V1v6aEK4puA1alpQUHvunyiYYEX+b GaD/8SUA2ydS/GqjEdIKfr2z8MM/39ZL2e8SW0F3aM6YLpM+Rri72jkA+mW64hYfsu1w vLx8n75uCVfjVrvOFY4m0zMluBj36FjqC5Fi1jgBOcY8j0DBZvrGiTMS3/4Emb9s44Fr rk7q/ZBxkERa6pIr59NrWb7KU7ImEJR5a+w/td+JaZ35+G7NGPKoagahg9Mfhe+DtuNc NyQg== 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:dmarc-filter :arc-authentication-results; bh=9s+F0KK89B05zhDO84bKwuMODx7qalwUqeEHB3vT9fE=; b=NG6KZC7Pijz0Ma4LgVTnrNNbt0xNNTWYVCA4uDUIriQfqHhl3mvBfO7gDto5cs7vr/ PzcU2PqzieH/M7pmgRK4OQYfvXCksYj7mekgP9ecA4ln9FHB8wL8XnyEGbeF+ApH3BwF qQnwWT5WyxOpXsz6Izjcbgh4Kg8U0PMbUe9CFP6v0DEmz2m4/teeZlc2q+ZbWlRv0BtH Fe4WSu64BUE0oAb37qv2jbpVpbwKecZ189ThPiqtxdzLCBTGkijfcAxu+hgxoPOd7DGE JdZ8zjt6jggNyAt4J7duorJF/sD5GKsC+E8d4xELhZ3uEeC9wzbghZRkeHtyNIqhqWmy EJ7Q== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c8-v6si10102406plm.9.2018.03.05.12.28.14; Mon, 05 Mar 2018 12:28:28 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753237AbeCEU0m (ORCPT + 99 others); Mon, 5 Mar 2018 15:26:42 -0500 Received: from mail.kernel.org ([198.145.29.99]:44586 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752975AbeCEU0j (ORCPT ); Mon, 5 Mar 2018 15:26:39 -0500 Received: from mail-qk0-f175.google.com (mail-qk0-f175.google.com [209.85.220.175]) (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 A9C6821770; Mon, 5 Mar 2018 20:26:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org A9C6821770 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=robh+dt@kernel.org Received: by mail-qk0-f175.google.com with SMTP id s188so22225059qkb.2; Mon, 05 Mar 2018 12:26:38 -0800 (PST) X-Gm-Message-State: AElRT7GfzeLsUr5+QMgiJcyo6vzjNTaed29GPlQmTJCaJBwguHuIX+ZS ly0g4p8ZthESt1tU4VhwiDQdpkDqhMGRAAemnQ== X-Received: by 10.55.131.7 with SMTP id f7mr24715234qkd.348.1520281597870; Mon, 05 Mar 2018 12:26:37 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.178.131 with HTTP; Mon, 5 Mar 2018 12:26:17 -0800 (PST) In-Reply-To: <1520208889-3908-4-git-send-email-frowand.list@gmail.com> References: <1520208889-3908-1-git-send-email-frowand.list@gmail.com> <1520208889-3908-4-git-send-email-frowand.list@gmail.com> From: Rob Herring Date: Mon, 5 Mar 2018 14:26:17 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v5 3/3] of: add early boot allocation of of_find_node_by_phandle() cache To: Frank Rowand Cc: Chintan Pandya , devicetree@vger.kernel.org, "linux-kernel@vger.kernel.org" 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, 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. Rob