Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp2744467pxk; Sun, 6 Sep 2020 11:48:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmXHi6JM4+Rl1vMwjDK1ux01cDPI6blhZ5Mzo5weqPJqTnSAC3x5MKL92jbklj16goSpty X-Received: by 2002:aa7:db47:: with SMTP id n7mr14359921edt.315.1599418093087; Sun, 06 Sep 2020 11:48:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599418093; cv=none; d=google.com; s=arc-20160816; b=dBt8rVfWoj4BKqXuVQ9v4qwSK3pqtup2ffv9tF1sYzVn79ccXhNhlOAwAmQzeUTIZK 4QEDUHlJ8Baq1xgAdisHno4Um4FFH8yGRd2VAiEbd873SyS67t5pMBuzyo7nYuCboFjC k6T3vN+FPyU6rpsIvi4xg5hEnVPOfEBr2chEeyhWMvV44wGrFEmDsYHKRz2OlHN6f6Cp KHc/FCLjtdM9mQLaGZX/6J/hicf4pK90MZ0gjghA7zNMpwmlUW6FKE8QqEGGLXWRsWXP k8JP4RW9sKl0Oetdrm94muvzZBGsmCNjP7tds9IsThtGwQbrgsLTAdynmq06Iet3Fvvs N+Tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=2quOwTwfxFsNvd3iO7x8X9F/V+oO5DUKHiPtRAKS4oo=; b=zFxf+l1aIte3FJ3Xy9qjlTfFLga7iaheQfuVCmtEXQHrFb3ub60O7iCWElv3wA0Lez brsH1Ui3MGgrFGg2jX1jEBImAObTUfQUdckU84DwtGi0h1PPaHbwEW8dmFeXWW7UYEaP hBflV6gz9CZnn5MmKB569ECtIiYKOd/7t5QacaH/yMUn67fd+Tkh8AHcsqD6reOfW5c9 COqw92Gmvh9naNvFFLVKKNz3TKqwwZ7uWTrxWeGYWtN5xRFEfODJMIM3qeQ6tYkMBV+B k7r4aD9J0/5sesXTOfMGX/a936KrsdQADKD+WHzvqRdh6diPbRf/YVPRU6KLqvgVFKfP eozg== 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 lv10si1664320ejb.539.2020.09.06.11.47.49; Sun, 06 Sep 2020 11:48: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 S1729118AbgIFSrU (ORCPT + 99 others); Sun, 6 Sep 2020 14:47:20 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:42508 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729094AbgIFSrR (ORCPT ); Sun, 6 Sep 2020 14:47:17 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 4Bl0l2679Hz9v1YS; Sun, 6 Sep 2020 20:47:10 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id ylojAXSPUtYv; Sun, 6 Sep 2020 20:47:10 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 4Bl0l25B0mz9v1YR; Sun, 6 Sep 2020 20:47:10 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id B16218B778; Sun, 6 Sep 2020 20:47:14 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id NvuMSJnOgbvh; Sun, 6 Sep 2020 20:47:14 +0200 (CEST) Received: from [192.168.4.90] (unknown [192.168.4.90]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 660888B75B; Sun, 6 Sep 2020 20:47:13 +0200 (CEST) Subject: Re: [PATCH] /dev/zero: also implement ->read To: Pavel Machek Cc: David Laight , Christoph Hellwig , "arnd@arndb.de" , "gregkh@linuxfoundation.org" , "linux-kernel@vger.kernel.org" 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> <20200906183820.GA13290@amd> From: Christophe Leroy Message-ID: <3cae5587-0843-83a9-bf4a-9c1426d499e4@csgroup.eu> Date: Sun, 6 Sep 2020 20:47:10 +0200 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 MIME-Version: 1.0 In-Reply-To: <20200906183820.GA13290@amd> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Language: fr Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Le 06/09/2020 ? 20:38, Pavel Machek a ?crit?: > On Sun 2020-09-06 20:35:38, Christophe Leroy wrote: >> 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: Oops. That was not on an 8xx but on an 8321 running at 333MHz, sorry. >> >> 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 > > Actually... that does not seem like a huge deal. read(/dev/zero) is > not that common operation. That's 14% more. It is not negligeable. I think I need to measure the /dev/zero read standalone. I guess the write to /dev/null flatters the result. > > Are you getting similar speedups on normal hardware? > Do you regard powerpc embedded devices as abnormal ? AFAIK the 832x is embedded in millions of ADSL boxes. What processor do you have in mind as normal hardware ? Christophe