From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 94A12C5B57D for ; Wed, 3 Jul 2019 02:01:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 73F9521721 for ; Wed, 3 Jul 2019 02:01:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726635AbfGCCBy (ORCPT ); Tue, 2 Jul 2019 22:01:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:50448 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726329AbfGCCBy (ORCPT ); Tue, 2 Jul 2019 22:01:54 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 90F7D368E3; Wed, 3 Jul 2019 02:01:53 +0000 (UTC) Received: from ming.t460p (ovpn-8-16.pek2.redhat.com [10.72.8.16]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 737371001B01; Wed, 3 Jul 2019 02:01:33 +0000 (UTC) Date: Wed, 3 Jul 2019 10:01:23 +0800 From: Ming Lei To: Andrea Vai Cc: Jens Axboe , linux-usb@vger.kernel.org, linux-scsi@vger.kernel.org, Himanshu Madhani , Hannes Reinecke , Omar Sandoval , "Martin K. Petersen" , Greg KH , Alan Stern Subject: Re: Slow I/O on USB media after commit f664a3cc17b7d0a2bc3b3ab96181e1029b0ec0e6 Message-ID: <20190703020119.GA23872@ming.t460p> References: <20190702120112.GA19890@ming.t460p> <20190702223931.GB3735@brian.unipv.it> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190702223931.GB3735@brian.unipv.it> User-Agent: Mutt/1.11.3 (2019-02-01) X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 03 Jul 2019 02:01:54 +0000 (UTC) Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org On Wed, Jul 03, 2019 at 12:39:31AM +0200, Andrea Vai wrote: > On 02/07/19 20:01:13, Ming Lei wrote: > > On Tue, Jul 02, 2019 at 12:46:45PM +0200, Andrea Vai wrote: > > > Hi, > > > I have a problem writing data to a USB pendrive, and it seems > > > kernel-related. With the help of Greg an Alan (thanks) and some > > > bisect, I found out the offending commit being > > > > > > commit f664a3cc17b7d0a2bc3b3ab96181e1029b0ec0e6 > > > > > > [...] > > > > > > > One possible reason may be related with too small 'nr_requests', could > > you apply the following command and see if any difference can be made? > > > > echo 32 > /sys/block/sdN/queue/nr_requests > > I applied it (echo 32 > /sys/block/sdf/queue/nr_requests), ran the test again, and still failed. I assumed I didn't have to build the kernel again, did I? (sorry but I am not skilled) > You don't need to build kernel. I just run same write test on one slow usb drive in my laptop, which runs '5.1.11-200.fc29.x86_64', and can't reproduce your issue, maybe it depends on your drive. Could you collect the queue limits sysfs log via the following command? find /sys/block/sdN/queue -type f -exec grep -aH . {} \; Thanks, Ming