From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F3C85C678D4 for ; Tue, 7 Mar 2023 17:53:19 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 23DA385C30; Tue, 7 Mar 2023 18:52:42 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="oEpMV/au"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id ACE7585C40; Tue, 7 Mar 2023 18:52:40 +0100 (CET) Received: from mail-qv1-xf2e.google.com (mail-qv1-xf2e.google.com [IPv6:2607:f8b0:4864:20::f2e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4D11E85BFB for ; Tue, 7 Mar 2023 18:52:34 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qv1-xf2e.google.com with SMTP id ks17so9446385qvb.6 for ; Tue, 07 Mar 2023 09:52:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1678211553; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=fwtricc9tkHQDJOv1tuE20GY5FYGlRK3Ke2+4t6KWXo=; b=oEpMV/auWI83YKLfVjpBZTmslH3ocZYjZKDa+KpmrjsdYpjV3aUyoaR3dQyYn7y9a5 iHiDkhXXDFzl8B1cGLDNwB5U/uE72ORvfUuHhwGoZsv1A0MbZjfQ21siMlmjnq+8DRfG 3b7C9yPTtahLEmFtKXyacNHxxdRRoI3dVKHEA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678211553; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=fwtricc9tkHQDJOv1tuE20GY5FYGlRK3Ke2+4t6KWXo=; b=X5y/slBGmPwVh9bkcIIv4RNyXz9ezH44DoSZIbrO4mfgOYjY7qJZ810Y4VMwVC4pWU RMg/y/r58JGawQYjw707ik7+ezBV3uRkR6pSm4aaN3CJbW+lio3QNigXI8v3poT6h8aj BUi0xGwYhUeo7vqkWpdPyC/hkRjG80V6O3GRraV36AI1SsWlYllsSwbrcoZFCje8eedO Dh/Z8RdS12W9+6DCX/ed4gFq+7IO7B4jNv08v4bu9kiLhanQcoSVvmb1qa3PRrvJICWU EK1pPtm1zdX+ETtFOox9GtUjp4hRP2p4irggvoNR67xh/DNSOBQwLjB2PsVHzvMmbP7N KjXQ== X-Gm-Message-State: AO0yUKW+cB0LYl68lHzjgHw5pz13OESRKWu28DFgKuUhSiDBa8HarkPL 6ZDTARq7C6y6a1wFBPTfKTB6vczts97Atf6vTLIwjQ== X-Google-Smtp-Source: AK7set/IeX89vNEG8Btk55icHc7EXxzIBNWWb8KUgzoawlfoDAoFxrM84H4xF+50UOYyTjhdVO1qlA== X-Received: by 2002:ad4:5ccb:0:b0:56e:a06f:d1d2 with SMTP id iu11-20020ad45ccb000000b0056ea06fd1d2mr3161008qvb.30.1678211553118; Tue, 07 Mar 2023 09:52:33 -0800 (PST) Received: from bill-the-cat (2603-6081-7b00-6400-0000-0000-0000-036b.res6.spectrum.com. [2603:6081:7b00:6400::36b]) by smtp.gmail.com with ESMTPSA id l11-20020a37f90b000000b0073ba92629e1sm9748189qkj.23.2023.03.07.09.52.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Mar 2023 09:52:32 -0800 (PST) Date: Tue, 7 Mar 2023 12:52:31 -0500 From: Tom Rini To: "Ying-Chun Liu (PaulLiu)" Cc: u-boot@lists.denx.de, Marc Zyngier , =?iso-8859-1?Q?Pierre-Cl=E9ment?= Tosi Subject: Re: [PATCH 1/2] arm64: Reduce add_map() complexity Message-ID: <20230307175231.GO968799@bill-the-cat> References: <20230214133814.4173549-1-paul.liu@linaro.org> <20230214133814.4173549-2-paul.liu@linaro.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="XegkTnNKFipVJF7/" Content-Disposition: inline In-Reply-To: <20230214133814.4173549-2-paul.liu@linaro.org> X-Clacks-Overhead: GNU Terry Pratchett X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean --XegkTnNKFipVJF7/ Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Feb 14, 2023 at 09:38:13PM +0800, Ying-Chun Liu (PaulLiu) wrote: > From: Marc Zyngier >=20 > In the add_map() function, for each level it populates, it iterates from > the root of the PT tree, making it ineficient if a mapping needs to occur > past level 1. >=20 > Instead, replace it with a recursive (and much simpler) algorithm > that keeps the complexity as low as possible. With this, mapping > 512GB at level 2 goes from several seconds down to not measurable > on an A55 machine. >=20 > We keep the block mappings at level 1 for now though. >=20 > Signed-off-by: Marc Zyngier > Signed-off-by: Pierre-Cl=E9ment Tosi > [ Paul: pick from the Android tree. Fixup Pierre's commit. Rebase to the > upstream ] > Signed-off-by: Ying-Chun Liu (PaulLiu) > Cc: Tom Rini > Link: https://android.googlesource.com/platform/external/u-boot/+/96ad729= cf4cab53bdff8222bb3eb256f38b5c3a6 > Link: https://android.googlesource.com/platform/external/u-boot/+/6be9330= 601d81545c7c941e3609f35bf68a09059 Applied to u-boot/next, thanks! --=20 Tom --XegkTnNKFipVJF7/ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmQHed8ACgkQFHw5/5Y0 tyzY9AwAq2JdLnj3kJoqI02ZwucnKG6q4AEtR/yZng/MPRtlxBzJ5gUno+hOngIs nHmHnSVUOvndwk+THHIB8/qM/AZuenbRXd1gViWf22LIOVcHMMfaChepguBa7Iiz nEwjhnA4z8RtgVCZ7Q6TKApYJTQWJgdnY2D82YMFgVCWE5A/4vWDdcEi9OyKCVDr RcgCv/NK7AZd34584+BHapNZp+N7TAJwIP/e55YA8g3fraNMapw99AMVc8yDYoor 0er+MHPBUzyLLwMFJjHXKYy7EYRWxVMSdYvuCULEYX9MgYqOJUIPboP4wcnpi/9A 9xg3LJjyCEhlLIfUzfKE2eVWe1gUieBI0EoGpamN+6/Wgollbq+Ox3uNUe2OReYT YWg6CjOpW3Hybx4HGahd2waWcYBFsslVfoF3vHQ0RNBYEQWF0ZdAYN7rLtZQ8k/X 0mswFrCXC50PVXRVrx2yJAPg8Y+x8byUARSKFlp9Y2NXuGFhnoBX+TEoULu2ijvp qoT9CSh6 =SXba -----END PGP SIGNATURE----- --XegkTnNKFipVJF7/--