Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1206796ybl; Sun, 1 Dec 2019 23:05:46 -0800 (PST) X-Google-Smtp-Source: APXvYqxjfW+yT2DZCN22uJE+QpRDLyh7Tg3shplnyHYYg7flTSmwVmhMwNP+z7t2HsAaMy6UUCUs X-Received: by 2002:a17:906:3602:: with SMTP id q2mr40287539ejb.167.1575270345978; Sun, 01 Dec 2019 23:05:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575270345; cv=none; d=google.com; s=arc-20160816; b=rbcTwDSTqdHMc9nU7+v72HYKAfr+PKwL18ohSyQhCTAxx5G4yJyDOa+LO0CQ6DlQNE CiatsD3kutiXtR+PNdZOaaMapstyaeHrCK2wyp2sdet3x1IT0dZyLRlPA1D6HkQeEuKI KW2g/phucqMEXobzLiVkhKWD1OOJAinxTrcYmW9FAmKyxHgj4pArFbP8TzeTNFcPz0iO wLMxwifMwFPevV9t8AfHvQl1eWW4WbF1grYsBLQvq0qpYcxQbSXfyNPN5srTCRUZgM7j K8Q9X1FLWPyf10isrtXDX4jmYDBRhRgZv22RMLVl5sTVZ0dlkNrJBN7kIkLLQ/m3J4i8 kYjw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=OIeJzPkfZfkQW+lmWkeb7QT4hklfgkIqwhLk0IajLpI=; b=FbrdAO/rDUqUl/vdlC8mvHXGZjwpaC+an2wiXhyOOJskWlK49nEhVSdBYk/8mV58wR yb8P7ItDzcROV2+Q7RDvhgrXN54NnJsrIHBeQL1WjXTh/aTVPKhLW4NiFOBZJT1j3LMS u/KDwezLKf/OIph9QYzxe7ZwAKd1G5/6DwOsnKMlXO2MgIxjF+38zhf/N34lWEgUqv1f iTS2Q9yvshDdZvvPWNnFbZ/A43KTDevsYIJH3JotngKmVNsF7gesj+lw0+7zjxHS7W9V gF+i4BtpHrrP6k0kL49WV6Q8iHL8yuOQ0FGSdUj9Yq7KV8bGg1c2idMTVyOsTlnI/a6n cy8w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@unipv-it.20150623.gappssmtp.com header.s=20150623 header.b=N0aMOxI3; 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 l17si1814805ejc.311.2019.12.01.23.05.22; Sun, 01 Dec 2019 23:05:45 -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=N0aMOxI3; 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 S1726254AbfLBHBq (ORCPT + 99 others); Mon, 2 Dec 2019 02:01:46 -0500 Received: from mail-wr1-f68.google.com ([209.85.221.68]:46520 "EHLO mail-wr1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726139AbfLBHBp (ORCPT ); Mon, 2 Dec 2019 02:01:45 -0500 Received: by mail-wr1-f68.google.com with SMTP id z7so39283412wrl.13 for ; Sun, 01 Dec 2019 23:01:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unipv-it.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=OIeJzPkfZfkQW+lmWkeb7QT4hklfgkIqwhLk0IajLpI=; b=N0aMOxI3Jdo7KPnUkFwlOU6WRz95oOUare7m7+UEZEH1gf0oxUY2Sg6BwmHMnmqsxA 16sb6a2cCJGC6N9a5Z8MFlD6SRdnSa3brpX3oIbIX6dwHxxVrJLoNemalxtDUjRfi7hd B3+FaHjMo5z29AI7l8M6we/KAb458Hf2uVKk2fUC905zKCOK0bMfgi/cIOrgBp9nDmES u1FdhoQaIs3KeZp6rld6IjQJ2r1kugusvB8awjLaI/lXY4lxX8wTJejXHVuhseopbF2F lgTWq6l9iGr61CHvvTtWwcC5ZnjgxQTnPK4qL6Ka329egpWKhyXa6h3IUARfOIxTZKIf iwYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=OIeJzPkfZfkQW+lmWkeb7QT4hklfgkIqwhLk0IajLpI=; b=eIq7+zQmL7OzloH1lVYk+xfKlTyTHkqZHXXd4vt9hE/8dYNSYbaLN/2PO1p+/zVZf5 eW7KW5oVfzQhSGjCLUuLRNK+rqj7hvSn+OxohCn9onjj9Tvrjphp074f26Zi9X6N6cVt YQgkgd1vlFH2smz9kineGpd1zoqGAP9Ulwgi+3kRB1Dx/xBJX8ZgX+K7uKD/MQLrzt2o YtrE/ABZqcaqwi11OFqO0WzyJcoLRNprY85IdgsSIlC//vD+POqcNBXg06OzY5D+2Cqt fWXwDDQb3Xw2cQadbhw+2VmMuen52K4yLm+RXLDc+noeFJpfrKz8pYlt7WdolwSqCtaq wI0g== X-Gm-Message-State: APjAAAVWWTLJoCgGP9oKa7k7x3RqQGfPm+ZoC3/cAyz2I5e0xVrwtzGX SWPJEzcuoxAxjnYl4R3jmXfpeQ== X-Received: by 2002:adf:eb08:: with SMTP id s8mr24816066wrn.5.1575270102144; Sun, 01 Dec 2019 23:01:42 -0800 (PST) Received: from brian.unipv.it ([37.163.132.5]) by smtp.gmail.com with ESMTPSA id y139sm18984178wmd.24.2019.12.01.23.01.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 01 Dec 2019 23:01:41 -0800 (PST) Date: Mon, 2 Dec 2019 08:01:35 +0100 From: Andrea Vai To: Bernd Schubert Cc: Ming Lei , "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: <20191202070135.GA4634@brian.unipv.it> References: <0876e232feace900735ac90d27136288b54dafe1.camel@unipv.it> <20191126023253.GA24501@ming.t460p> <0598fe2754bf0717d81f7e72d3e9b3230c608cc6.camel@unipv.it> <20191128091712.GD15549@ming.t460p> <20191129005734.GB1829@ming.t460p> <3c57bba1-831b-fc97-d5f7-e670f43fbbdc@aakef.fastmail.fm> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3c57bba1-831b-fc97-d5f7-e670f43fbbdc@aakef.fastmail.fm> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 29/11/19 12:44:53, Bernd Schubert wrote: > >> Trace attached. Produced by: start the trace script > >> (with the pendrive already plugged), wait some seconds, run the test > >> (1 trial, 1 GB), wait for the test to finish, stop the trace. > >> > >> The copy took 73 seconds, roughly as already seen before with the fast > >> old kernel. > > > > This trace shows a good write IO order because the writeback IOs are > > queued to block layer serially from the 'cp' task and writeback wq. > > > > However, writeback IO order is changed in current linus tree because > > the IOs are queued to block layer concurrently from the 'cp' task > > and writeback wq. It might be related with killing queue_congestion > > by blk-mq. > > What about using direct-io to ensure order is guaranteed? Pity that 'cp' > doesn't seem to have an option for it. But dd should do the trick. > Andrea, can you replace cp with a dd command (on the slow kernel)? > > dd if= of= bs=1M > oflag=direct On the "new bad patched" kernel, this command take 68 seconds to complete (mean on 100 trials, with a narrow standard deviation), so perfectly aligned with the cp command on the old fast good kernel. Thanks, and bye Andrea