Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2624277pxb; Sun, 17 Oct 2021 20:49:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZRBN272sYsYfEn/+lSbiECC0eR+Z+9JvmQN3kZOPsKuIwIgz5tWOph8CZXQ5uHVVdC+l1 X-Received: by 2002:a62:aa15:0:b0:44d:6eda:17b2 with SMTP id e21-20020a62aa15000000b0044d6eda17b2mr26709742pff.74.1634528997573; Sun, 17 Oct 2021 20:49:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634528997; cv=none; d=google.com; s=arc-20160816; b=rBvZCjv3v+pSbyuJ6qH9D2lpKq96AE6KaXnaVy0kmq+bAI2zie4QRyON9y81PV2jAh Pgs7cwCp/U0UkHWZEK9TRh1ovf2gt75GyJB7pPsVX06UX3pdsE0kbI3iedVuDhTxyqGy slzb1tMyo51oJnKrGThSqzrEwqCbHxowBqRftzI3VUCCiARw3PNwd3+o9fNgjPTjhyxw gwXmgLVJWz4gk1F9x99BviSB66fggNty2MLfOXbfYwflLD5zQuBvjwVtkMPyvYy7L+nc ruKO2948AZRmbKX25B5mo9HqRwY3cR2DLMu/QnsXWW1A3vFIDH0wHjydOeD3kV+hpPMo 6u5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=Viwd7ANX416+8/ScF5bPasbghx1RgTJkrR17d6lCqck=; b=kGtYsJ9uM+z1mSg9Plwbmo1tzxaqpbMd28euxLpGaNgacz1j2/XIEVj9ur/NXRiJp4 Xs7Ch8rA1Jfjy1pPh3G5f2+ojyWPiL+dGtGph/4tE4ANJvHR1l4peJNxS6bYojdARsdp Bp8dbh3/XRbH6bUNTmBgyWaa1Syp/tdGtdLZei2arIi3wl/XzH4sxuo6z6u+MlNzXHeF GYkAyIYKxeYd+RR0huhn4XMa5RCGIACPyfWhmSg3XjQYNJH9V+JkuMlCSjGStuHqJVfK 0sIPUqi0fbZ1oEEw0Ig+rcZpDrWmN1/ailgl1TsCQiKDtuDjVWb/6O8G1c+kV9gW4Xm2 2gbg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=cOss8UMj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y4si39113pfq.244.2021.10.17.20.49.45; Sun, 17 Oct 2021 20:49:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=cOss8UMj; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232071AbhJRDk4 (ORCPT + 99 others); Sun, 17 Oct 2021 23:40:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41188 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231916AbhJRDku (ORCPT ); Sun, 17 Oct 2021 23:40:50 -0400 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 52E68C061765 for ; Sun, 17 Oct 2021 20:38:39 -0700 (PDT) Received: by mail-lf1-x130.google.com with SMTP id u21so61256127lff.8 for ; Sun, 17 Oct 2021 20:38:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Viwd7ANX416+8/ScF5bPasbghx1RgTJkrR17d6lCqck=; b=cOss8UMjm8u5At7QCwBuCldQAuU81snSCUVfCFeWgKRMqSf0DCsQz7siTH0U1Ro1IT FIhT7D8sWKBuY3xAqgVXx8PvYWHmK1LT9Ad4iHeYSINobQbkGHRCTSat3nTnACQJHkHI z1biYPooBEMwIRTUxuhj/MLofDV280icyOCC0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Viwd7ANX416+8/ScF5bPasbghx1RgTJkrR17d6lCqck=; b=xI6uZSbiz6pOZSHFGYTerJLKl3ACwgXtYCcoMIteWkiPlS4uDvReHHf0Uz6lhzFuRO h6G2zyJwsTHzC/xODxgVnt0DdZzCQhCyAl/Gvy0UUot+dTosa1Ldu59IrnMI6xTA/jNK 3xnUhwYGD/lJ7XezlSn1e38Sz2IvYKTRMVAoq/oiz0mdDTSRvpk/Nh9Vvgrf09dlkM/o sJOcwUWzmPj88qj3FH3meL4JjWCEmGIAgGPjAwhKhJFRyq0XiTKf3aViAtBdXB/NEFyL fcbkC6XQycpKdU8SreKUw46l8QHXBGkt6LzOt1tRwfjfOChTKuD8+xPQVgmLvq7AXgZT 9+xw== X-Gm-Message-State: AOAM533FtDNh2k98HIrGbvcRvh0Ic0SQeDgRle4hKLzsp7pypxkb419r GSsp0D+4+6bCsxtIcwUy9ZXrRleS0pWllPNTUHlTbA== X-Received: by 2002:ac2:4c49:: with SMTP id o9mr28370086lfk.482.1634528317739; Sun, 17 Oct 2021 20:38:37 -0700 (PDT) MIME-Version: 1.0 References: <20211005065948.10092-1-mark-pk.tsai@mediatek.com> <163425869104.1688384.2477307279117424281@swboyd.mtv.corp.google.com> In-Reply-To: <163425869104.1688384.2477307279117424281@swboyd.mtv.corp.google.com> From: Chen-Yu Tsai Date: Mon, 18 Oct 2021 11:38:26 +0800 Message-ID: Subject: Re: [PATCH] clk: make clk_core_lookup faster by using clk name hash To: Stephen Boyd Cc: Mark-PK Tsai , Michael Turquette , yj.chiang@mediatek.com, Matthias Brugger , linux-clk , LKML , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" , "moderated list:ARM/Mediatek SoC support" Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 15, 2021 at 8:44 AM Stephen Boyd wrote: > > Quoting Mark-PK Tsai (2021-10-04 23:59:49) > > Compare hash value before strcmp the full name to make > > clk_core_lookup faster. > > > > It make clk driver probe 30 percent faster on the platform > > have 1483 registered clks and average clock name length 20. > > Why is clk_core_lookup() a fast path for you? Maybe because the Mediatek clock driver still does global clk name matching to resolve parents?