From owner-svn-src-head@freebsd.org Wed Aug 5 14:00:04 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1B6A99B4F9A for ; Wed, 5 Aug 2015 14:00:04 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AC22C1370 for ; Wed, 5 Aug 2015 14:00:02 +0000 (UTC) (envelope-from steven.hartland@multiplay.co.uk) Received: by wibxm9 with SMTP id xm9so68421134wib.1 for ; Wed, 05 Aug 2015 07:00:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=/hjMKj22J7COJy/FeSKqVW7h/3WI0z5RTD6cSmpg4QI=; b=Gua+0RMZaY2OLAM3Gb6Op+r1O+doHEvuE3jGu1SysHSPaKQf3HvNSMEHzG/MIJH+no rbbpOP1hbOHTMteQZ6jIzd92MjHaUBF4WHqV0j0wtSH2JpbMqpxfvMuEoBBUl5MXEo4O TErH4QLE9BYV85mXrdfIi+exKYGJ9bclNvkbN4pR34ZBRjBVNTz1A7wpPCXllCGZQCBG x+plvYMygbwBu7BIMgn5a4cPjtT9cwDkMaa2AdKBYih5ri4el8ZEBefClFuLEpotteIu NmxJHcrOVXitan4+FDVAGdHIzJ7aUSw4J9FbSho635zBrmahmCcCyFEjq9jsRSbXlFUn tygw== X-Gm-Message-State: ALoCoQmq1d78r10LHyAI6J/LeHe7V50f9+hA+ZmsxdpiOfAa/yamYEVhIU2WE1tu+YoAApK9+DDR X-Received: by 10.180.102.74 with SMTP id fm10mr10761416wib.25.1438783201311; Wed, 05 Aug 2015 07:00:01 -0700 (PDT) Received: from [10.10.1.68] (82-69-141-170.dsl.in-addr.zen.co.uk. [82.69.141.170]) by smtp.gmail.com with ESMTPSA id pn6sm4274263wjb.36.2015.08.05.07.00.00 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 05 Aug 2015 07:00:00 -0700 (PDT) Subject: Re: svn commit: r286320 - head/sys/cam/ctl To: Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201508051346.t75DkFrY042506@repo.freebsd.org> From: Steven Hartland Message-ID: <55C216DB.10703@multiplay.co.uk> Date: Wed, 5 Aug 2015 14:59:55 +0100 User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <201508051346.t75DkFrY042506@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Aug 2015 14:00:04 -0000 Nice!! On 05/08/2015 14:46, Alexander Motin wrote: > Author: mav > Date: Wed Aug 5 13:46:15 2015 > New Revision: 286320 > URL: https://svnweb.freebsd.org/changeset/base/286320 > > Log: > Issue all reads of single XCOPY segment simultaneously. > > During vMotion and Clone VMware by default runs multiple sequential 4MB > XCOPY requests same time. If CTL issues reads sequentially in 1MB chunks > for each XCOPY command, reads from different commands are not detected > as sequential by serseq option code and allowed to execute simultaneously. > Such read pattern confused ZFS prefetcher, causing suboptimal disk access. > Issuing all reads same time make serseq code work properly, serializing > reads both within each XCOPY command and between them. > > My tests with ZFS pool of 14 disks in RAID10 shows prefetcher efficiency > improved from 37% to 99.7%, copying speed improved by 10-60%, average > read latency reduced twice on HDD layer and by five times on zvol layer. > > MFC after: 2 weeks > Sponsored by: iXsystems, Inc. > > Modified: > head/sys/cam/ctl/ctl_tpc.c > > Modified: head/sys/cam/ctl/ctl_tpc.c > ============================================================================== > --- head/sys/cam/ctl/ctl_tpc.c Wed Aug 5 13:10:13 2015 (r286319) > +++ head/sys/cam/ctl/ctl_tpc.c Wed Aug 5 13:46:15 2015 (r286320) > @@ -817,7 +817,7 @@ tpc_process_b2b(struct tpc_list *list) > struct scsi_ec_segment_b2b *seg; > struct scsi_ec_cscd_dtsp *sdstp, *ddstp; > struct tpc_io *tior, *tiow; > - struct runl run, *prun; > + struct runl run; > uint64_t sl, dl; > off_t srclba, dstlba, numbytes, donebytes, roundbytes; > int numlba; > @@ -889,8 +889,7 @@ tpc_process_b2b(struct tpc_list *list) > list->segsectors = numbytes / dstblock; > donebytes = 0; > TAILQ_INIT(&run); > - prun = &run; > - list->tbdio = 1; > + list->tbdio = 0; > while (donebytes < numbytes) { > roundbytes = numbytes - donebytes; > if (roundbytes > TPC_MAX_IO_SIZE) { > @@ -942,8 +941,8 @@ tpc_process_b2b(struct tpc_list *list) > tiow->io->io_hdr.ctl_private[CTL_PRIV_FRONTEND].ptr = tiow; > > TAILQ_INSERT_TAIL(&tior->run, tiow, rlinks); > - TAILQ_INSERT_TAIL(prun, tior, rlinks); > - prun = &tior->run; > + TAILQ_INSERT_TAIL(&run, tior, rlinks); > + list->tbdio++; > donebytes += roundbytes; > srclba += roundbytes / srcblock; > dstlba += roundbytes / dstblock; >