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 46D16EB64D9 for ; Sat, 17 Jun 2023 14:55:47 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 6CDB986309; Sat, 17 Jun 2023 16:55:44 +0200 (CEST) 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="k9O69N61"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id BF75D8630B; Sat, 17 Jun 2023 16:55:42 +0200 (CEST) Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) (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 D504F86308 for ; Sat, 17 Jun 2023 16:55:38 +0200 (CEST) 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-qt1-x82f.google.com with SMTP id d75a77b69052e-3f9eea9d0a1so17321671cf.1 for ; Sat, 17 Jun 2023 07:55:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; t=1687013737; x=1689605737; 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=AvENZFViCAvJqseGdzye6ecNdiP18cHlNOLhHqNSxTU=; b=k9O69N61eGcMwOXKgySuo8Ao87ZgUhj2ti7I7AFEtbjJNlU+h9B3PgDfV9SIORQNUe T+Tnx0fnVXyWrrI7QG9jZdZ4E6owzrF3mk0cQ5l2fqAekiLtE86otzchJtGoDbdRwaTL S1FY5U/LpszJSsbGAZR5puxGskd0K9Nt6j6jk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1687013737; x=1689605737; 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=AvENZFViCAvJqseGdzye6ecNdiP18cHlNOLhHqNSxTU=; b=JsY8lnY8UhBGY5IUXP1PJ1U1O3dULG9E0FuOq6jK80aNSBgULnvCGN/+aJZlatSAVL 0kVVIjwwfRqMRHHbwuN/TwCsBalJcW7WLZZG0G7rWjCdJ6pMqQ/ejM8nojiCITFICgrt ooxsmlN6LXYw/JpErmWcm0ZoO/mu7SwJlxcodEXeqz0oLOWuM9MBoi906ee6b6GWtXYn N4xePw5/0jR5EWFXYcQx3K9suyk63adPoxbH8X8FEbGCxhCEewSbZg+UFZvJT6EBRiAl OB9fzS2k4ZRMlz0JcYWDCFEzCD3cLM3eRdBtpek7VhpUTh9bSieE9WkKnkX5pKRZmYtk BGqw== X-Gm-Message-State: AC+VfDw/MBqtq+w0xXUa6htxFR8o8t1SduBbplvc5SkzZcJ6UYkXfHZX dyZ6MxQgQU9ePVjYT8pfudzMPw== X-Google-Smtp-Source: ACHHUZ5Q75nR+i/1MSEHIChRsBICmfa2Zfuwaie8/cDr1Yb0Pe+GzFvt0IpmafIkO2PLrn6FkWoY5Q== X-Received: by 2002:a05:622a:2c2:b0:3f9:d6aa:aa56 with SMTP id a2-20020a05622a02c200b003f9d6aaaa56mr7222745qtx.29.1687013737404; Sat, 17 Jun 2023 07:55:37 -0700 (PDT) Received: from bill-the-cat (2603-6081-7b00-6400-5758-71cf-336c-9559.res6.spectrum.com. [2603:6081:7b00:6400:5758:71cf:336c:9559]) by smtp.gmail.com with ESMTPSA id k7-20020a258c07000000b00bb0ae4221b8sm4884646ybl.43.2023.06.17.07.55.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 17 Jun 2023 07:55:36 -0700 (PDT) Date: Sat, 17 Jun 2023 10:55:32 -0400 From: Tom Rini To: Mattijs Korpershoek Cc: Sean Anderson , Gary Bisson , u-boot@lists.denx.de, qianfanguijin@163.com, Troy Kisky , Peng Fan , sjg@chromium.org Subject: Re: [PATCH] Revert "lib: sparse: Make CHUNK_TYPE_RAW buffer aligned" Message-ID: <20230617145532.GF3931582@bill-the-cat> References: <20221118121323.4009193-1-gary.bisson@boundarydevices.com> <79465afa-3528-7e1b-9d15-1258ef327f74@seco.com> <87ilbn8vsr.fsf@baylibre.com> <87cz1v8qk1.fsf@baylibre.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="KrRXTnXTtpGm5zvp" Content-Disposition: inline In-Reply-To: <87cz1v8qk1.fsf@baylibre.com> 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 --KrRXTnXTtpGm5zvp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 16, 2023 at 03:50:06PM +0200, Mattijs Korpershoek wrote: > On ven., juin 16, 2023 at 13:56, Mattijs Korpershoek wrote: >=20 > > Hi Gary, Sean, > > > > On lun., nov. 21, 2022 at 10:09, Sean Anderson = wrote: > > > >> On 11/21/22 09:50, Gary Bisson wrote: > >>> Hi, > >>>=20 > >>> On Fri, Nov 18, 2022 at 10:36:58AM -0500, Sean Anderson wrote: > >>>> On 11/18/22 07:13, Gary Bisson wrote: > >>>> > This reverts commit 62649165cb02ab95b57360bb362886935f524f26. > >>>> >=20 > >>>> > The patch decreased the write performance quite a bit. > >>>> > Here is an example on an i.MX 8M Quad platform. > >>>> > - Before the revert: > >>>> > Sending sparse 'vendor' 1/2 (516436 KB) OKAY [ 5.113s] > >>>> > Writing 'vendor' OKAY [128.335s] > >>>> > Sending sparse 'vendor' 2/2 (76100 KB) OKAY [ 0.802s] > >>>> > Writing 'vendor' OKAY [ 27.902s] > >>>> > - After the revert: > >>>> > Sending sparse 'vendor' 1/2 (516436 KB) OKAY [ 5.310s] > >>>> > Writing 'vendor' OKAY [ 18.041s] > >>>> > Sending sparse 'vendor' 2/2 (76100 KB) OKAY [ 1.244s] > >>>> > Writing 'vendor' OKAY [ 2.663s] > >>>> >=20 > >>>> > Considering that the patch only moves buffer around to avoid a war= ning > >>>> > message about misaligned buffers, let's keep the best performances. > >>>>=20 > >>>> So what is the point of this warning? > >>>=20 > >>> Well the warning does say something true that the cache operation is = not > >>> aligned. Better ask Simon as he's the one who changed the print from a > >>> debug to warn_non_spl one: > >>> bcc53bf0958 arm: Show cache warnings in U-Boot proper only > >>>=20 > >>> BTW, in my case I couldn't see the misaligned messages, yet I saw the > >>> performance hit described above. > > > > I also reproduce this problem on AM62x SK EVM. > > > > Before the revert: > > Sending sparse 'super' 1/2 (768793 KB) OKAY [ 23.954s] > > Writing 'super' OKAY [ 75.926s] > > Sending sparse 'super' 2/2 (629819 KB) OKAY [ 19.641s] > > Writing 'super' OKAY [ 62.849s] > > Finished. Total time: 182.474s > > > > After the revert: > > Sending sparse 'super' 1/2 (768793 KB) OKAY [ 23.895s] > > Writing 'super' OKAY [ 12.961s] > > Sending sparse 'super' 2/2 (629819 KB) OKAY [ 19.562s] > > Writing 'super' OKAY [ 12.805s] > > Finished. Total time: 69.327s > > > > And like Gary, I did not observe the misaligned messages. > > > > Did we come up with a solution for this performance regression? > > > > I will continue looking on my end but please let me know if you already > > solved this. >=20 > Answering to myself here. My attempt of solving this problem has been > submitted here: >=20 > https://lore.kernel.org/r/20230616-sparse-flash-fix-v1-1-6bafeacc567b@bay= libre.com Thanks for digging in to this! --=20 Tom --KrRXTnXTtpGm5zvp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAABCgAdFiEEGjx/cOCPqxcHgJu/FHw5/5Y0tywFAmSNyWQACgkQFHw5/5Y0 tyzE8Av/cJa7MtOHp9eF6ufUMiuILOjW+GTYapdQ6Xvi71qpE1nVaqpEP3NzUrQr +zPeXeweYbXFN5WXMC7flo+dgNBc/pujqjmqUjWGbgiBRkwMBjacZ+kD6Q4s014t G1/btoYfl5PS1WjOigAx1DLdDBUg8xIHtCF8CSOzy/jkiuKSyEdJEX8imdVRVDzK yIMjJzdx9Q+Iw7gK0xmw0IkOV88RwKgaFUUszAKKNefCqgnubCf5AQxn+iBZg4n4 V7H1f8bQaQ/I3yPKxjWSxT7xuhhfK7nyppAWsnvF6Uy/axqcXijaJAIAqu2RZgOh n2D6Ve99hvCYc4ASfaqb9aJ+rNdPE9tM63U9SLCMV8guu1NstOKVKlNfkzw8MuaR vOBt9H2qrTkk/KnjIt5c1sa7badT7ZZY9B4pL2o2NcQMw1VNIHxM59M32ERAthy1 ga9Y/pWve11EHFol6UgFDngOdcyJSBsvauwZ6lEhKQ64TmqS/ImWeEgYyKDnhPi1 UorkVcjP =1rfh -----END PGP SIGNATURE----- --KrRXTnXTtpGm5zvp--