Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp6558546ybc; Thu, 28 Nov 2019 01:19:08 -0800 (PST) X-Google-Smtp-Source: APXvYqyh2+jFRR6/2IerGOmxf5dmsjAmN7QA7ugyUeGcrjHnA5RMv24ZMXyV4WZFHRSddqHfD14B X-Received: by 2002:a17:906:3ec2:: with SMTP id d2mr55086659ejj.251.1574932748343; Thu, 28 Nov 2019 01:19:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574932748; cv=none; d=google.com; s=arc-20160816; b=rwouKm3SNLu1eqB7i40YVehnqawfVUK7r5oAYLVG8Q8Iu6XrP1pjM311UFg/E2rqwT JUpsh3sUeQn3CyOvhr1TRQV5CXnlWJNUGQdtbX3b6tWeRFamvZG17UCNMNUuyu/phPZ7 ZUDNaDzo3d00WAlszpz6GAbrd/zdwvtK9WP9zd+xNAKJ8lObb+pcsytDgNO9S0iizRY9 lWw3B/mr6IIf6kGLfzTIXmL3gWMxCYw9TSsP9S173JNQwfKrX1soqshlrmtmqojhbLUS kZNiuI3149QqLXgYxKtuh781ebszGuiQtGu5sOFflgB1EfPNbrwfB7iW/tG+r3riST06 JdFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:user-agent:in-reply-to:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=i0SBG/w7iwc1VC5pdiCftNu6+szwsgUJz8hkCGOzsEs=; b=lN+e15IUd2jR0k44cxc9Qc/4Xu6460kkXHHNRQ+IdOA5EsWAG5Nx9I+OIQM/pOpIvb yXY2kUnUSS3t9L5gHIdiScIMA97f4wyDngRGixVQJSLT+5uR8WYElVhTtRj8D0it6i+G rq6WoPY/zQZvli7y1S8jK7oSL4w7efiZHxH2AfamBqal0qeIvVR5moW3pc3rZ1zOvhDG 27wfG7tafR8mNFDqcWMAd59Z3dXst9bR1qGgmEtvcHVYL3ZzWMXORDx14jxnt70qJTiI 1IVWNHShxvCnSeH+N4KjGx0vjIDcnyd35NDWIdwNCAkHqtwP3KgPMg9OT+Ewj7A+ziuu erjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BI8clD1t; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k2si2975381ejq.151.2019.11.28.01.18.43; Thu, 28 Nov 2019 01:19:08 -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=@redhat.com header.s=mimecast20190719 header.b=BI8clD1t; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726764AbfK1JRi (ORCPT + 99 others); Thu, 28 Nov 2019 04:17:38 -0500 Received: from us-smtp-2.mimecast.com ([207.211.31.81]:50639 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726252AbfK1JRi (ORCPT ); Thu, 28 Nov 2019 04:17:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1574932657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=i0SBG/w7iwc1VC5pdiCftNu6+szwsgUJz8hkCGOzsEs=; b=BI8clD1tWsyNwOgGl6gFUy1Xn6kW/iyWhWDmPFKcx4JMIgZUTw7QDiVztFANjr+TuMulUG SBeo4UmjBQk3hrVs33nbYALV4xU41PTtU/K51/WVRlNmOHN8LLlFGETZ7SqOMMdDQ6wrmB SONswyVcPg19wDl9Bg+fbEquqsUGD2Y= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-23-ylZ3XNEdMrS6uXP-I6wdZg-1; Thu, 28 Nov 2019 04:17:32 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9102810054E3; Thu, 28 Nov 2019 09:17:29 +0000 (UTC) Received: from ming.t460p (ovpn-8-17.pek2.redhat.com [10.72.8.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1E92B600C8; Thu, 28 Nov 2019 09:17:18 +0000 (UTC) Date: Thu, 28 Nov 2019 17:17:12 +0800 From: Ming Lei To: Andrea Vai Cc: "Schmid, Carsten" , Finn Thain , 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 Subject: Re: AW: Slow I/O on USB media after commit f664a3cc17b7d0a2bc3b3ab96181e1029b0ec0e6 Message-ID: <20191128091712.GD15549@ming.t460p> References: <20191125102928.GA20489@ming.t460p> <20191125151535.GA8044@ming.t460p> <0876e232feace900735ac90d27136288b54dafe1.camel@unipv.it> <20191126023253.GA24501@ming.t460p> <0598fe2754bf0717d81f7e72d3e9b3230c608cc6.camel@unipv.it> MIME-Version: 1.0 In-Reply-To: User-Agent: Mutt/1.12.1 (2019-06-15) X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-MC-Unique: ylZ3XNEdMrS6uXP-I6wdZg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 28, 2019 at 08:46:57AM +0100, Andrea Vai wrote: > Il giorno mer, 27/11/2019 alle 08.14 +0000, Schmid, Carsten ha > scritto: > > >=20 > > > > 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. > > > > > > >=20 > > > The sheer volume of testing (probably some terabytes by now) would > > > exercise the wear leveling algorithm in the FTL. > > >=20 > > But with "old kernel" the copy operation still is "fast", as far as > > i understood. > > If FTL (e.g. wear leveling) would slow down, we would see that also > > in > > the old kernel, right? > >=20 > > Andrea, can you confirm that the same device used with the old fast > > kernel is still fast today? >=20 > Yes, it is still fast. Just ran a 100 trials test and got an average > of 70 seconds with standard deviation =3D 6 seconds, aligned with the > past values of the same kernel. Then can you collect trace on the old kernel via the previous script? #!/bin/sh MAJ=3D$1 MIN=3D$2 MAJ=3D$(( $MAJ << 20 )) DEV=3D$(( $MAJ | $MIN )) /usr/share/bcc/tools/trace -t -C \ 't:block:block_rq_issue (args->dev =3D=3D '$DEV') "%s %d %d", args->rwb= s, args->sector, args->nr_sector' \ 't:block:block_rq_insert (args->dev =3D=3D '$DEV') "%s %d %d", args->rw= bs, args->sector, args->nr_sector' Both the two trace points and bcc should be available on the old kernel. Thanks, Ming