Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp1328828imu; Mon, 5 Nov 2018 18:48:01 -0800 (PST) X-Google-Smtp-Source: AJdET5cVDiMh7RXKcxWqYN/OQyyIk6kxOeZAnph88DMnm49mocIRmy2PA5OAT7iSVV5j18SwqmGE X-Received: by 2002:a17:902:1008:: with SMTP id b8-v6mr25144776pla.337.1541472481469; Mon, 05 Nov 2018 18:48:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541472481; cv=none; d=google.com; s=arc-20160816; b=cJSX7Rd3nKc/aCcwWFcifgW7S2C8n52egqSIXuYYkQsFiu8MlPtH1WUDPAss4PNF4H IlW56z0qIJHjhzQ3S/pXcHpBpB6BX7OeRWNa18Z1J0zoOrlKEhG8sn+gHzuptiOhwu+y C47dzgYNzjaN4DN1sNZAfKy+5YQlLDbsB4g4uI64TmoLMtQZQQbmgyggYtMm1kz4OO+s EUGIrsFLGVbXrAImpOLcj1A7tmvWP3y1KCshFUzmzQ66N0slKzxDfqCe3dIPeAtyDnDn 6BusLbb153BLLyvT05dok6sAI70IIIkxO1Y9TKNSBZy3FyyRF7qVUbHyzQfgsKcmrgwt W1sw== 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=WDvCxknxheqxVvFtEfRUu6mXs5RV6ezLh9LHCotUg1M=; b=mIwSXilzkHFlg8tgJqF5A5VQKgQmOw5irm8ybC3f5oN5f6WaNAyBu3kvPHV95XO2g+ phGDDi2CElCbKCphjzVtvOLCGl4bQE7dcHLoiOtQkp34vspVmlZaAdTrdPifbTBo5VFe NkPpmzeFqRDFst50/zrF2Ngwz2pEgCId6UIIVhCE0VYa6AMKM7zjzWLLe0Mlvdqt6QSW NphASCk0dR1WgPObFv6MXQkMJOB+LFqzayeI2XpaE6EnvcOGnWEKA4M7HQ+SOti6oCK/ 5IrhxdrlJbvsmah2iGVs3iirA5f24JciQYS8RW785rToqYfDTv1ujOFcxQKtKzfpiDB2 yJFw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y6-v6si44213115plt.112.2018.11.05.18.47.46; Mon, 05 Nov 2018 18:48:01 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729309AbeKFMKN (ORCPT + 99 others); Tue, 6 Nov 2018 07:10:13 -0500 Received: from ipmail02.adl2.internode.on.net ([150.101.137.139]:43902 "EHLO ipmail02.adl2.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726389AbeKFMKN (ORCPT ); Tue, 6 Nov 2018 07:10:13 -0500 Received: from ppp59-167-129-252.static.internode.on.net (HELO dastard) ([59.167.129.252]) by ipmail02.adl2.internode.on.net with ESMTP; 06 Nov 2018 13:17:16 +1030 Received: from dave by dastard with local (Exim 4.80) (envelope-from ) id 1gJrOd-0006SW-Hz; Tue, 06 Nov 2018 13:47:15 +1100 Date: Tue, 6 Nov 2018 13:47:15 +1100 From: Dave Chinner To: John Hubbard Cc: Jan Kara , Christoph Hellwig , Matthew Wilcox , Michal Hocko , Christopher Lameter , Jason Gunthorpe , Dan Williams , linux-mm@kvack.org, Andrew Morton , LKML , linux-rdma , linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 4/6] mm: introduce page->dma_pinned_flags, _count Message-ID: <20181106024715.GU6311@dastard> References: <20181012060014.10242-1-jhubbard@nvidia.com> <20181012060014.10242-5-jhubbard@nvidia.com> <20181013035516.GA18822@dastard> <7c2e3b54-0b1d-6726-a508-804ef8620cfd@nvidia.com> <20181013164740.GA6593@infradead.org> <84811b54-60bf-2bc3-a58d-6a7925c24aad@nvidia.com> <20181105095447.GE6953@quack2.suse.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 05, 2018 at 04:26:04PM -0800, John Hubbard wrote: > On 11/5/18 1:54 AM, Jan Kara wrote: > > Hmm, have you tried larger buffer sizes? Because synchronous 8k IO isn't > > going to max-out NVME iops by far. Can I suggest you install fio [1] (it > > has the advantage that it is pretty much standard for a test like this so > > everyone knows what the test does from a glimpse) and run with it something > > like the following workfile: > > > > [reader] > > direct=1 > > ioengine=libaio > > blocksize=4096 > > size=1g > > numjobs=1 > > rw=read > > iodepth=64 > > > > And see how the numbers with and without your patches compare? > > > > Honza > > > > [1] https://github.com/axboe/fio > > That program is *very* good to have. Whew. Anyway, it looks like read bandwidth > is approximately 74 MiB/s with my patch (it varies a bit, run to run), > as compared to around 85 without the patch, so still showing about a 20% > performance degradation, assuming I'm reading this correctly. > > Raw data follows, using the fio options you listed above: > > Baseline (without my patch): > ---------------------------- .... > lat (usec): min=179, max=14003, avg=2913.65, stdev=1241.75 > clat percentiles (usec): > | 1.00th=[ 2311], 5.00th=[ 2343], 10.00th=[ 2343], 20.00th=[ 2343], > | 30.00th=[ 2343], 40.00th=[ 2376], 50.00th=[ 2376], 60.00th=[ 2376], > | 70.00th=[ 2409], 80.00th=[ 2933], 90.00th=[ 4359], 95.00th=[ 5276], > | 99.00th=[ 8291], 99.50th=[ 9110], 99.90th=[10945], 99.95th=[11469], > | 99.99th=[12256] ..... > Modified (with my patch): > ---------------------------- ..... > lat (usec): min=81, max=15766, avg=3496.57, stdev=1450.21 > clat percentiles (usec): > | 1.00th=[ 2835], 5.00th=[ 2835], 10.00th=[ 2835], 20.00th=[ 2868], > | 30.00th=[ 2868], 40.00th=[ 2868], 50.00th=[ 2868], 60.00th=[ 2900], > | 70.00th=[ 2933], 80.00th=[ 3425], 90.00th=[ 5080], 95.00th=[ 6259], > | 99.00th=[10159], 99.50th=[11076], 99.90th=[12649], 99.95th=[13435], > | 99.99th=[14484] So it's adding at least 500us of completion latency to every IO? I'd argue that the IO latency impact is far worse than the a 20% throughput drop. i.e. You can make up for throughput drops by running a deeper queue/more dispatch threads, but you can't reduce IO latency at all... Cheers, Dave. -- Dave Chinner david@fromorbit.com