Received: by 10.223.185.116 with SMTP id b49csp6642614wrg; Wed, 28 Feb 2018 12:56:06 -0800 (PST) X-Google-Smtp-Source: AG47ELtCtE1gOdOzohO89SZ0H6W3PSAVwRhpYm6+43a+f5YOqDd0jOP9YvLMKnXXo77W4s8AFmYg X-Received: by 2002:a17:902:167:: with SMTP id 94-v6mr1460221plb.294.1519851366121; Wed, 28 Feb 2018 12:56:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519851366; cv=none; d=google.com; s=arc-20160816; b=yrtK0eHXRLScY+KojcSYSRysRin+S5CUkqt16bLY+++ZQbxN5iDaK8wJEVp6jWWvuo 2Ii0RbpmIHfD0lKLdeit3gRlB/cHosaUfw8IQTaL4AQxc8JIXao4j8/7+fwSpBp/5ef5 mn2D2UuJV8Sbnx4KCsorIn9nELU3kIVxtdd9bLoTqRc9eSJ5I/JXrqVYJD7mxaePFnQQ gprqrNBQjitqnplTOWQnsHC7/irkxH5hJxfHoxShniaQ3DmG8HYBXJ0XWoSI7aS6B43w x3lB7AwuNOi50ksuvsFEDAD/wZF/u0BmzHHbP7dfF9JaE98XZBAyJYgu1d5akJehR0Y5 OaUQ== 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=8yhrZs/QHof5VWNakhaaDIaMy4THZmFbVAaMOViFfJg=; b=MgEvNhzrGgulA3I2H+ificExdFwH323YuLOOW3hP5r909HDEBXOSk6g3EhzsV444rn skS8dgBIs5s74qdRgquBJqxDHxpjROl0ZWnNLAQv3x7gwtEr3stDGc3UsLIQfTkTOFxn Rg9kLol19gQAGRa2UflBhCP7u2TlPDzkySuGrCqVLxBtYJkCzuDeF9CnDM+ZlcjEnoRI 6aYQC6zd3ChG+XgbZvks/2VweaFxQrRQXt7+A11XP1RL/KGNref0plxOYsDPTEMNb7oW Pj2rUxZvV0Btf0PErx5yLjyW+K8czqUKkCMP2y/Vbv+we14MJ9FrMCdKVIsGgfP2sqlf XMUA== 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 o32-v6si1799307pld.768.2018.02.28.12.55.51; Wed, 28 Feb 2018 12:56:06 -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 S934834AbeB1Uyq (ORCPT + 99 others); Wed, 28 Feb 2018 15:54:46 -0500 Received: from mail.kernel.org ([198.145.29.99]:39566 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934739AbeB1Uyo (ORCPT ); Wed, 28 Feb 2018 15:54:44 -0500 Received: from mail-qt0-f178.google.com (mail-qt0-f178.google.com [209.85.216.178]) (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 191B021771; Wed, 28 Feb 2018 20:54:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 191B021771 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-qt0-f178.google.com with SMTP id n12so4801974qtl.5; Wed, 28 Feb 2018 12:54:44 -0800 (PST) X-Gm-Message-State: APf1xPDhBYLxxLG4jihTIWIB/b7kC7eNgrXejDL4wldYslT1fiuR/sXu CYr/zx1o2KJoMWOcNsQc9gwz4mxvubhcxOb+vQ== X-Received: by 10.200.42.114 with SMTP id l47mr31792628qtl.164.1519851283197; Wed, 28 Feb 2018 12:54:43 -0800 (PST) MIME-Version: 1.0 Received: by 10.12.178.131 with HTTP; Wed, 28 Feb 2018 12:54:22 -0800 (PST) In-Reply-To: References: <1519844656-16443-1-git-send-email-frowand.list@gmail.com> <1519844656-16443-2-git-send-email-frowand.list@gmail.com> From: Rob Herring Date: Wed, 28 Feb 2018 14:54:22 -0600 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v4 1/2] of: cache phandle nodes to reduce cost of of_find_node_by_phandle() To: Andy Shevchenko Cc: Frank Rowand , Chintan Pandya , devicetree , Linux Kernel Mailing List 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 Wed, Feb 28, 2018 at 2:19 PM, Andy Shevchenko wrote: > On Wed, Feb 28, 2018 at 9:44 PM, Frank Rowand wrote: >> On 02/28/18 11:31, Andy Shevchenko wrote: >>> On Wed, Feb 28, 2018 at 9:04 PM, 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? Yes, but still one that ignores memory usage. I'll take whatever solution doesn't undo this[1]. Rob [1] https://lwn.net/Articles/735839/