Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp7009346ybc; Thu, 28 Nov 2019 09:12:54 -0800 (PST) X-Google-Smtp-Source: APXvYqwmG4kuCTP+/PD+02YnF7dsOnntDSzPnwoERXR5sh1u1c+ZS5r8B0OT1bUCAIzhyZOKBKNm X-Received: by 2002:a17:906:4098:: with SMTP id u24mr55191597ejj.220.1574961174843; Thu, 28 Nov 2019 09:12:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574961174; cv=none; d=google.com; s=arc-20160816; b=csXiIGkNS954ds92lDxQld6zCwV7CMXtVYcXhxOkpXlj+boXQ4bZgrn+UDr7AE+ohS 3PY+Nmsd8eOXkWabMrPhtKn8UgESxgZmeprRRAzrEj4/pjFIuRm3ATcL9JQf4p9x8kUe kvSs2Pl3yTDrkSNLe4SRH4xvywx8sQdbn61O2mJKMBv5WViTXZBrjcYX6B0URwAyF8N2 2ncRRrRwhkRbCf1+9liLvW7GQGNhv5nahNSjmruOCSQQMdCZXfo5M09TqQ2aGl4yzVQ4 poApsU0Rac2j14C0gvw29LE8jC125NcksL/0ndXhEUx5X3BdLzK72V+Fip1RG097Do0P ct/A== 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:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=kIU/4r5tg86qVELVsVrOVWZTmy5x4DTAtzCcw+A5vjQ=; b=nm5JMXycUfsQCcoAa53Z7kabagX24Rkyfb4SGP5s7/c2IPPGiqGcs7smviZjtjMMyS A0AW5OyAKqpkkzcqZ31gix4kImSmPkHt/bB8ELd0KO7XLHxFRlUpQN2pG9Zru5IDt5pc 81+YK461Fg5FWMQ3rke8lvSmtjZd5MfjC8q56U1XkmtO689R8TIXLaI5ATYnMn8fl8IS FKhuJprBkkJeznQBrWqVf9ZnXx1cB/V0ue2YEC0FbIC8HjG1EhOvM/j0fnEacALd67hn Cr+HdHqO+Bav/eGYwHvca/Dif8CvF1rIPTEfkdKFARsqmAdcRdXUvdbCBofpTXwVm/Rl FBMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@unipv-it.20150623.gappssmtp.com header.s=20150623 header.b=qTjL2qO1; 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 m19si3293270ejc.66.2019.11.28.09.12.29; Thu, 28 Nov 2019 09:12:54 -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; dkim=pass header.i=@unipv-it.20150623.gappssmtp.com header.s=20150623 header.b=qTjL2qO1; 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 S1726700AbfK1RK6 (ORCPT + 99 others); Thu, 28 Nov 2019 12:10:58 -0500 Received: from mail-wm1-f46.google.com ([209.85.128.46]:38151 "EHLO mail-wm1-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726582AbfK1RK5 (ORCPT ); Thu, 28 Nov 2019 12:10:57 -0500 Received: by mail-wm1-f46.google.com with SMTP id z19so12472651wmk.3 for ; Thu, 28 Nov 2019 09:10:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unipv-it.20150623.gappssmtp.com; s=20150623; h=message-id:subject:from:to:cc:date:in-reply-to:references :user-agent:mime-version:content-transfer-encoding; bh=kIU/4r5tg86qVELVsVrOVWZTmy5x4DTAtzCcw+A5vjQ=; b=qTjL2qO1zywbtMgr9UGj+wX8baVWMvVpO/1UovbX8ti+3yalBXG08d4wzgS7i5jcdw yV9lDxG48HYflHQ/f6NCpUMWV8BJniSDhiMRjqK9d4hmwN3uf44msWPJZbvjploujGh7 oixsWiaDTR2H4VPehEs3a70TdNYu9NhQKH4on643UKNFwOD7fxErivTUax1QEUlbPYR+ KjumCrMvG4H6r03U01JGkTCuXlQscbrGS1/25bGX3oJijKav6cDwazG3C4meui8jMXR9 qSom6G37FXqXxjpmAP+YTrOsgksXbOKAGv28oibk9lmktyvVovxgp1QhYvtWY3JFykY3 Rk/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to :references:user-agent:mime-version:content-transfer-encoding; bh=kIU/4r5tg86qVELVsVrOVWZTmy5x4DTAtzCcw+A5vjQ=; b=XoZHqEpZ76TvAManTAHxkX5Yzg8R36w8yXLyYxllCojIgtG/qbV8xr1caYrzTOdNdj VUHpzg08yWcsADXlPM40sj+COZRGITaLwH5ILCzzveJ5GzVClTOJAricNYksH6f1c0xy hx66hkZBYWSmLH8s1IB47r6EE4dNeUfiUfS7pYSq1hAsiurJtpGxx8I7bunKpmFqn0NT SBSW/HtNepIMThCKbC553HHNAP+3FAmOeCHg+SvZsyiQjVqWldzlQQulhnyY7UbMX4la vhTK7yDIwdulfgVqFB2MZQPihYNbf+SQG1Q2V03z9lVI+s7MrCMQwQHsYewujQ0gbDXH INoA== X-Gm-Message-State: APjAAAX/zQj7X/NKIWdmywSb2ifwpjfs4V/Pr+ywLspQUDkFzzdc7/zN ZAzWdaORA3dBNdYVkC93qc8Akg== X-Received: by 2002:a1c:f317:: with SMTP id q23mr10064265wmq.97.1574961055084; Thu, 28 Nov 2019 09:10:55 -0800 (PST) Received: from angus.unipv.it (angus.unipv.it. [193.206.67.163]) by smtp.gmail.com with ESMTPSA id r6sm10484372wrq.92.2019.11.28.09.10.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Nov 2019 09:10:54 -0800 (PST) Message-ID: <776d0c5f1d9f7787f353f97ed38597b05412529a.camel@unipv.it> Subject: Re: Slow I/O on USB media after commit f664a3cc17b7d0a2bc3b3ab96181e1029b0ec0e6 From: Andrea Vai To: Finn Thain Cc: Ming Lei , Damien Le Moal , Alan Stern , Jens Axboe , Johannes Thumshirn , USB list , SCSI development list , Himanshu Madhani , Hannes Reinecke , Omar Sandoval , "Martin K. Petersen" , Greg KH , Hans Holmberg , Kernel development list Date: Thu, 28 Nov 2019 18:10:53 +0100 In-Reply-To: References: <20191109222828.GA30568@ming.t460p> <20191123072726.GC25356@ming.t460p> <20191125035437.GA3806@ming.t460p> <20191125102928.GA20489@ming.t460p> <20191125151535.GA8044@ming.t460p> <0876e232feace900735ac90d27136288b54dafe1.camel@unipv.it> <20191126023253.GA24501@ming.t460p> <0598fe2754bf0717d81f7e72d3e9b3230c608cc6.camel@unipv.it> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.32.4 (3.32.4-1.fc30) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Il giorno mer, 27/11/2019 alle 11.21 +1100, Finn Thain ha scritto: > On Tue, 26 Nov 2019, Andrea Vai wrote: > > > Then I started another set of 100 trials and let them run tonight, > and > > the first 10 trials were around 1000s, then gradually decreased > to > > ~300s, and finally settled around 200s with some trials below 70- > 80s. > > This to say, times are extremely variable and for the first time > I > > noticed a sort of "performance increase" with time. > > > > The sheer volume of testing (probably some terabytes by now) would > exercise the wear leveling algorithm in the FTL. > > This in itself seems unlikely to improve performance significantly. > But if > the flash memory came from a bad batch, perhaps it would have that > effect. > > To find out, someone may need to source another (genuine) Kingston > DataTraveller device. I own another device (let's refer to it as "black odd"), identical to the "slow" one (call it "black even"), and used it as well to do the tests, especially in the beginning of this story, because I suspected the problem could be related to a faulty pen drive. At a certain time I realized that the tests I performed didn't show any difference between the two flash drives, so since that time I kept using just the "black even". They were bought together, so of course both of them probably belong to the same "maybe-bad batch". But I have another Kingston DataTraveler ("White"), externally slightly different from the other twos (it's white instead of black, and labeled G4 instead of G3), though lsusb shows the same IDs: 0951:1666. It had been purchased some months after the other twos (well, actually, it may be the result of an RMA exchange). I have just ran one test on this White one, with the new (patched) kernel, and it took an average of 200seconds (st.dev=46s), which is not "good", but less "bad" than the real "bad" case of the "black" ones (>1000 seconds). I have also tried the "WHITE" one with the old fast kernel, and the behavior is almost the same as with the new kernel, though a little bit better (mean=173; st.dev.=11). Feel free to let me know if I should do other tries, thanks, Andrea