Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2741315pxk; Sun, 6 Sep 2020 11:40:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwB4+LActk6bM4Zy7UG+0MFtII/3bmVDUJ158nHTICy1gIWIHOAzVssIJwCfWUyAiEpoENR X-Received: by 2002:a50:bb65:: with SMTP id y92mr18321247ede.53.1599417613015; Sun, 06 Sep 2020 11:40:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599417613; cv=none; d=google.com; s=arc-20160816; b=yubC7ws1QDQekuGmclgIMagKLo9JlGkJPVDNhYvtnxZ9kiHz4rKRk4Ed1vYTz6IdLi KvVnxwy0lBhfJdFbQDiVqopyrla/x/tuyR+FmHFGtSYtNgy6fjkwIv8eZkDnCegeQp3A PK/iXz4X2NRBv5UcykO8Tp+TnjzcEafEMnOt6dgeEwrfo3FQzw80G+MfYPS7Dn54V2ZO fRnwq4LV8uc8XnvipNljg0iAWV7f3VFK8jMZsi1eIB4zLYVCueqhXReQUd7bO89rG5zu ImIjTsA853/S9E7VrNMeVDG5lJwm4UECnVk+V1t+lBQ+RaYJQRzcZusmuzmHmaWbCs+W roKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=MBujjTk3peYSkn8xuoYKdN+OWDz+uiAuFNBByeeGxlo=; b=Vyq8el06DLVzvVi2wBff6Uly8KjY/J082ESAmnj3ohr1DUe8yZwEVimjVrEIbNJSlP RgAO6ZXdSPUZaYxdNnnSu2JzLEn6jVOD5h0zSyEytaDm+AGl1yfAiZryyXHYe/vbwBzd kr5I4UtetvzvZQI6peC21GVydMvBESOYJ4KRtr8efONVbSLiaxQb2ao5nhw63CTxUikf l44OGf+OwpmGAPYF74NykQ07iJAYwyT7HZgUAuRKwo2FdrUv23cpiuQrjIzQXh2xIHoM grxDVHA5aUkOg/3DNmYvg6ZXSgJB1Oj6uPqK2dhx+nuaexOABCLvGdT0f149DOfnefp5 j4qQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i16si997430edj.116.2020.09.06.11.39.49; Sun, 06 Sep 2020 11:40:13 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729152AbgIFSiY (ORCPT + 99 others); Sun, 6 Sep 2020 14:38:24 -0400 Received: from jabberwock.ucw.cz ([46.255.230.98]:44526 "EHLO jabberwock.ucw.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728969AbgIFSiX (ORCPT ); Sun, 6 Sep 2020 14:38:23 -0400 Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 04CAC1C0B7C; Sun, 6 Sep 2020 20:38:21 +0200 (CEST) Date: Sun, 6 Sep 2020 20:38:20 +0200 From: Pavel Machek To: Christophe Leroy Cc: Pavel Machek , David Laight , Christoph Hellwig , "arnd@arndb.de" , "gregkh@linuxfoundation.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] /dev/zero: also implement ->read Message-ID: <20200906183820.GA13290@amd> References: <20200903155922.1111551-1-hch@lst.de> <55d1ecb8-4a0c-fa58-d3cf-bf6796eea7bd@csgroup.eu> <3b0b58be4b844162b73db1b108a9b995@AcuMS.aculab.com> <20200906182122.GA12295@amd> <8c353864-76a9-90bf-fa2f-f7a8231b5487@csgroup.eu> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="jI8keyz6grp/JLjh" Content-Disposition: inline In-Reply-To: <8c353864-76a9-90bf-fa2f-f7a8231b5487@csgroup.eu> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --jI8keyz6grp/JLjh Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun 2020-09-06 20:35:38, Christophe Leroy wrote: > Hi, >=20 > Le 06/09/2020 =E0 20:21, Pavel Machek a =E9crit=A0: > >Hi! > > > >>>>Christophe reported a major speedup due to avoiding the iov_iter > >>>>overhead, so just add this trivial function. Note that /dev/zero > >>>>already implements both an iter and non-iter writes so this just > >>>>makes it more symmetric. > >>>> > >>>>Christophe Leroy > >>>>Signed-off-by: Christoph Hellwig > >>> > >>>Tested-by: Christophe Leroy > >> > >>Any idea what has happened to make the 'iter' version so bad? > > > >Exactly. Also it would be nice to note how the speedup was measured > >and what the speedup is. > > >=20 > Was measured on an 8xx powerpc running at 132MHz with: >=20 > dd if=3D/dev/zero of=3D/dev/null count=3D1M >=20 > With the patch, dd displays a throughput of 113.5MB/s > Without the patch it is 99.9MB/s Actually... that does not seem like a huge deal. read(/dev/zero) is not that common operation. Are you getting similar speedups on normal hardware? Pavel --=20 DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany --jI8keyz6grp/JLjh Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAl9VLJwACgkQMOfwapXb+vKmrgCdEYmZPgQq+HxpSanlG4HVseFn dbsAnRdejmbhYyMrT06l1+feAucNtasq =XH8y -----END PGP SIGNATURE----- --jI8keyz6grp/JLjh--