Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2793362pxk; Sun, 6 Sep 2020 13:56:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwcJjOLtSzga8YGGZqchY884uSmDqEWkwgTEVpmx8wAvPpLsFSnF0voB8qh5xCyWG8s+dZV X-Received: by 2002:a17:906:4754:: with SMTP id j20mr18712595ejs.293.1599425773816; Sun, 06 Sep 2020 13:56:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599425773; cv=none; d=google.com; s=arc-20160816; b=G1QJhlglRVTApV2j3GyTebaTO8PE6HaeF6y4ZjxBFJ3Or0RfAjS/xUUsWXWJIGscLj u13h24b91FBBrRPQAKgHzXnV+cNsA1O8X/ve5FLX6JyfSXYPuLp1I2GtqaT95mds88Hm Y32AOLKsUv9rnq8zOXyOpYVP8lvaJCCo1dCjpatNIEqv/zEj1I1Y48J927+aK2FrBU8N 5CyyemLTnK1tPyLM4unSI8e6m1ONRiuAaTWPgt+HPLg4J5NuwhXBLVj7ZL1v/zRxFSJS nN3itDj8RmCpIU6T6QqtD00nb4AiuGnXw1KzYI9+7ypXtYC12kdf+It0tGbKvSW+S6eC cexw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language :content-transfer-encoding:mime-version:accept-language:in-reply-to :references:message-id:date:thread-index:thread-topic:subject:cc:to :from; bh=hCmVkct5svLgE5GB/XZQJA4FwNFbjxRUhr16wwM8Bgw=; b=thQyaDOZJQ9KkzRZGVDT+4GtW/3XYKk3D4TGPkvZ0KWxGLJ559jv9wG58c/SlZUOfP 8miuFmz+khgFpHtDyfrG62zF28mzHPRBrlj/8Aj03TqGrtO7/kg2lAJatndYAr/CI66E zYcOq2bEoaxDOcwKYr9Jl0cH0hJADFMpyD3XOc2bBApPoAiTtnnaTA27Y5VSPL8S5fEs tjVEVnW/+J19e2JPpc/23jvCIrwH+Tji5OMfIc/JGXv3XHLDfYX4BMeGtedHmrpWiAd5 HFgnciBJF+F949SatIQv7TvyEV0ofe6rBJObhVKOo9/b4Ub4bWLlpA4iB0CeSTFCRaxb zkNA== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bu14si7725706edb.128.2020.09.06.13.55.49; Sun, 06 Sep 2020 13:56: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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=aculab.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726288AbgIFUwh convert rfc822-to-8bit (ORCPT + 99 others); Sun, 6 Sep 2020 16:52:37 -0400 Received: from eu-smtp-delivery-151.mimecast.com ([207.82.80.151]:34949 "EHLO eu-smtp-delivery-151.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726154AbgIFUwg (ORCPT ); Sun, 6 Sep 2020 16:52:36 -0400 Received: from AcuMS.aculab.com (156.67.243.126 [156.67.243.126]) (Using TLS) by relay.mimecast.com with ESMTP id uk-mta-224-fEXZTQIXM4uphP0pOlU36w-1; Sun, 06 Sep 2020 21:52:31 +0100 X-MC-Unique: fEXZTQIXM4uphP0pOlU36w-1 Received: from AcuMS.Aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) by AcuMS.aculab.com (fd9f:af1c:a25b:0:43c:695e:880f:8750) with Microsoft SMTP Server (TLS) id 15.0.1347.2; Sun, 6 Sep 2020 21:52:31 +0100 Received: from AcuMS.Aculab.com ([fe80::43c:695e:880f:8750]) by AcuMS.aculab.com ([fe80::43c:695e:880f:8750%12]) with mapi id 15.00.1347.000; Sun, 6 Sep 2020 21:52:31 +0100 From: David Laight To: 'Christophe Leroy' , Pavel Machek CC: Christoph Hellwig , "arnd@arndb.de" , "gregkh@linuxfoundation.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] /dev/zero: also implement ->read Thread-Topic: [PATCH] /dev/zero: also implement ->read Thread-Index: AQHWggy41s1fAL/OckmYjTgFjgCjKqlXb8rwgASFNZ2AACUDkA== Date: Sun, 6 Sep 2020 20:52:31 +0000 Message-ID: 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> In-Reply-To: <8c353864-76a9-90bf-fa2f-f7a8231b5487@csgroup.eu> Accept-Language: en-GB, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.202.205.107] MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=C51A453 smtp.mailfrom=david.laight@aculab.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: aculab.com Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Christophe Leroy > Sent: 06 September 2020 19:36 > Hi, > > Le 06/09/2020 à 20:21, Pavel Machek a écrit : > > 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. > > > > Was measured on an 8xx powerpc running at 132MHz with: > > dd if=/dev/zero of=/dev/null count=1M > > With the patch, dd displays a throughput of 113.5MB/s > Without the patch it is 99.9MB/s That in itself isn't a problem. What was the throughput before any of these patches? I just remember another thread about the same test running a lot slower after one of the related changes. While this speeds up read /dev/zero (which is uncommon) if this is needed to get near the old performance then the changes to the 'iter' code will affect real workloads. David - Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK Registration No: 1397386 (Wales)