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=-0.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS 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 9F1E9C43215 for ; Fri, 22 Nov 2019 19:16:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 74A5320707 for ; Fri, 22 Nov 2019 19:16:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=unipv-it.20150623.gappssmtp.com header.i=@unipv-it.20150623.gappssmtp.com header.b="lAULhbd8" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727109AbfKVTQf (ORCPT ); Fri, 22 Nov 2019 14:16:35 -0500 Received: from mail-wm1-f48.google.com ([209.85.128.48]:52207 "EHLO mail-wm1-f48.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726775AbfKVTQe (ORCPT ); Fri, 22 Nov 2019 14:16:34 -0500 Received: by mail-wm1-f48.google.com with SMTP id g206so8346253wme.1 for ; Fri, 22 Nov 2019 11:16:32 -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=kLw3pFSIZDVbnCzJ9DTnz/kpdFIQj08MUYSImiLSK9M=; b=lAULhbd8gCUzzbSRRCbFnF6HAk0C7AHCoTACxfKB1tGKbxZSaDKIWDVgNHcAchLKv8 LDscNLVVrwROJqNW/pTga43LR4PFONqZ7jHpBUOBg71E3CkWo1YRYhaaqichBafqJfKF y1rvUMfk4dHQAWQJDnFFWv26VPlA3Vqtqq2QWXvLiG0x0tMjKXr1IB3gh9MgBAFdtLVJ as+HJxKP7zNBtroVe5un15GzXgCXdDsVj8YIZrYL8pjzhQHQvbOcOVFECaRLTc1enM3e F2Q8pRjvMyCrDZYlMM9fVE1FRmDSieqznFogt6IAF67w6W8vbx5SUMzCF7Ycu1oo/c4b hVHQ== 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=kLw3pFSIZDVbnCzJ9DTnz/kpdFIQj08MUYSImiLSK9M=; b=Snd0QUKc4wZ5gNJocKTc8fzmRAi777WiMcb9fNo7uq1OiIk3Uy0MwbJRoLKag8QSgF x87kP/f08mFliqZxGRVViVZ8HUVe2zsfBPwJayfOA/A4v7UnqDU2khvCevIxOQH7S9Zl 1y6k4zLYUH9TIV4L4qDWa7o4wuO6HRnXvmDwuz6y1TsQuSqLUqFv9twg0//9DFGhFWWP B4+cb4Kk4q6sKEycRmmya9XIcL9UolgZ8UpPTsKHnf5eJPEhxKJmfsFaqyUCR1hMgdM+ EVvb9+mwnuxar+6qO9JCZ3ZYHAIFW68EJgna96nQnX3/+GLygjknRnmbySiKbTIDy1l+ KONA== X-Gm-Message-State: APjAAAV0kyjD5j1FZeOt7GsQ/xYBaV04zQ5aAeGfAzEsyhwXurU8fH5/ clhKGHLC2lPzs0EVONjqi+mneQ== X-Google-Smtp-Source: APXvYqyS5KI1oHFoY6/zQrlq8Yiqp7iqxRVDi01q+CokCcH37IjXgrnE6wN04s/h+IuCAivbEKXemw== X-Received: by 2002:a7b:c34a:: with SMTP id l10mr14130871wmj.66.1574450191767; Fri, 22 Nov 2019 11:16:31 -0800 (PST) Received: from angus.unipv.it (angus.unipv.it. [193.206.67.163]) by smtp.gmail.com with ESMTPSA id t14sm8525469wrw.87.2019.11.22.11.16.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Nov 2019 11:16:31 -0800 (PST) Message-ID: Subject: Re: Slow I/O on USB media after commit f664a3cc17b7d0a2bc3b3ab96181e1029b0ec0e6 From: Andrea Vai To: Ming Lei Cc: 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: Fri, 22 Nov 2019 20:16:30 +0100 In-Reply-To: <20191109222828.GA30568@ming.t460p> References: <20191109222828.GA30568@ming.t460p> 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 dom, 10/11/2019 alle 06.28 +0800, Ming Lei ha scritto: > Another thing we could try is to use 'none' via the following > command: > > echo none > /sys/block/sdh/queue/scheduler #suppose 'sdh' points > to the usb storage disk > > Because USB storage HBA is single hw queue, which depth is 1. This > way > should change to dispatch IO in the order of bio submission. > > Andrea, could you switch io scheduler to none and update us if > difference > can be made? Using the new kernel, there is indeed a difference because the time to copy a file is 1800 seconds with [mq-deadline], and 340 seconds with [none]. But that is still far away from the old kernel, which performs the copy of the same file in 76 seconds. Side notes: - The numbers above are average values calculated on 100 trials for each different situation. As previously noticed on this thread, with the new kernel the times are also very different among the different trials in the same situation. With the old kernel the standard deviation on the times in a set of 100 trials is much smaller (to give some mean/sigma values: m=1800->s=530; m=340->s=131; m=76->s=13; ). - The size of the transferred file has been 1GB in these trials. Smaller files don't always give appreciable differences, but if you want I can also provide those data. Of course, I can also provide the raw data of each set of trials. Thanks, and bye, Andrea