Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2488633rdb; Fri, 8 Dec 2023 09:29:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IHzWAp8mQt3wiam1wt9v8ggjefdcQmUi9UQ7WY5ntokueVAJaigJI9nXtFmLGMNFE6UfQNz X-Received: by 2002:a05:6e02:1d18:b0:35d:8735:2aa6 with SMTP id i24-20020a056e021d1800b0035d87352aa6mr660523ila.54.1702056585052; Fri, 08 Dec 2023 09:29:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702056585; cv=none; d=google.com; s=arc-20160816; b=nFHj3AAwpPnoV3xoSp2IA8A0BIwWtfkmh2buPUWjQ2JGDZ3nryh3sMV6XnhIm3OMFo co73j9id75OaLrItOQf2/xpu6Kr1S2NQ8cDGQZ4bM0twkVZpMrqTPeGkHCeVlaHl94zQ mneJbooJr41ypXMUV4FKDorluciL+Kffu0M4BtbFw/NKg5n3Q6VK3IwAFbTk+0OlWzpq ePBkuB0LdCTXgcdd13LQSYPdugJyOTty7hf6CvfyBeX4NTSNUeT/h42A8ITFzGVVHtRH icf69XWRByGYx55LAUYjxNlJ6mLDDb0XH3ZKFBYVufaL2ZF/uQM7ikB+XMTGJgUQ0tdM LD+g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=3PxOBEXFDvmx4FoVcbn8IisqPaIUct50HbstATld534=; fh=C3dKYa8ljVzzYm6t7FkSI3TGonepoxCZKHp3IDr4gg0=; b=QkCunYI5RtO8m5C6tvoztQd8VwK0ENFMaeQQtDarO2PlqpY/T02jZa8ARh/0DaO25o 7u2gDkop/sBR76kv4S4uDAxDCtdxmPjggYeMJnhtD3dNjCtN82AC52aN5kkoquPteyjS fBWOnBkI3q8yL6p+a/PocnbMYCz7JRi6kWVfCLeBU3Vgfz1OtetWUyFbBDalj1gE3m9q to8X9Oa8OqxD3nj4n2dIZRgGxz6jOuBl0Ws+tjJkOLy2GKU0SBTsbes3SCkGfNgq2hCK eseiyAiWq+6Y9bsAA5RhMudLGwt0jcOcsi2VWLz2UnCZP8RVLpUc1l7Ys0L0VGhnr2yA 5kdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AR2wPhGk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 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 groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id o13-20020a65614d000000b005aaab9e7bcfsi1822889pgv.388.2023.12.08.09.29.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 08 Dec 2023 09:29:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=AR2wPhGk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id C156D8075B1D; Fri, 8 Dec 2023 09:29:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233781AbjLHR3a (ORCPT + 99 others); Fri, 8 Dec 2023 12:29:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51852 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232481AbjLHR33 (ORCPT ); Fri, 8 Dec 2023 12:29:29 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9371F85 for ; Fri, 8 Dec 2023 09:29:35 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79D0DC433C7; Fri, 8 Dec 2023 17:29:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702056575; bh=3PxOBEXFDvmx4FoVcbn8IisqPaIUct50HbstATld534=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=AR2wPhGk2fAvPLFyB3Mvv7cnFnjN2eshwUXqpo7nbjINXPmGWTywFfU5qIWajadZ3 3I49M/i8UhpWPOOLeLgfsm9R4lSCXxlzm2YsXNNkEKTmaNQ9nRHEyrSKp060VNRxxJ NeqCYz8gto+GOKdtfXsrohiRfGBd0P4cjwkRP5Q4TaAskOMqplz5B/3+votUzVyAPt ye65cjWTu3hlKebC7Y6C9Ychpg9SYLKnIN68rPBbglwxnPavfzIhnlSaHint/DeJO4 SVqsDOnnEIXimi/nSjE52ejy6yQcu1B6vp8g8z4l2oe/3McQY2unfMvKWrlKBZhPhX txyi9K2P9tHDA== Date: Fri, 8 Dec 2023 17:29:31 +0000 From: Mark Brown To: =?iso-8859-1?Q?N=EDcolas_F=2E_R=2E_A=2E?= Prado Cc: Rob Herring , Shuah Khan , kernel@collabora.com, Frank Rowand , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCH] kselftest: dt: Stop relying on dirname to improve performance Message-ID: References: <20231208133955.483851-1-nfraprado@collabora.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="3vS4BeAJHYDVIouR" Content-Disposition: inline In-Reply-To: <20231208133955.483851-1-nfraprado@collabora.com> X-Cookie: Slow day. Practice crawling. X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 08 Dec 2023 09:29:42 -0800 (PST) --3vS4BeAJHYDVIouR Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Dec 08, 2023 at 10:39:27AM -0300, N=EDcolas F. R. A. Prado wrote: > When walking directory trees, instead of looking for specific files and > running dirname to get the parent folder, traverse all folders and > ignore the ones not containing the desired files. This avoids the need > to call dirname inside the loop, which gives a big performance boost, > approximately halving run time: Running locally on a > mt8192-asurada-spherion, which reports 160 test cases, has gone from > 5.5s to 2.9s, while running remotely with an nfsroot has gone from > 13.5s to 5.5s. It's hard to be sure exactly since the runtime is a bit variable but it does look like this is running substantially faster on the test systems I have that were most affected by the slowdown, looks like approximately a quarter of the time, and all the tests that were present before seem to still be present. Tested-by: Mark Brown --3vS4BeAJHYDVIouR Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEreZoqmdXGLWf4p/qJNaLcl1Uh9AFAmVzUnQACgkQJNaLcl1U h9DmsQf+JFYIALfEl10juMrMljapsA3mjPr5arODy4QUeKno9st6AKVgLAlqb9eY APsPKDNooyd4qjQkkoprR7G1uWJhr3pRxa2QFy6lgc05JZFUpEQ3f1nW2ybn2IAT fRxXERccAExNnKbzaGyxGr/aHSwJpOh5odiFmhnrVLLtsFHTKkjYX80Ck+qKPbh0 z7c1obwHDZsKi0CDlkb2zRENRZ23JNYvHFGBWNVS1KU8UqeO2tNCEQmpwIlalVpv y1i5X8VuhFYXeBRerPoY9p9/o0kZcHzLEoYvj3al5UebydN8YsJ/MvrliBgmOp1N jkDSq7DOAA+BOajRlL44GAUOsVr0zQ== =oWgR -----END PGP SIGNATURE----- --3vS4BeAJHYDVIouR--