Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp7983477ybc; Fri, 29 Nov 2019 04:05:20 -0800 (PST) X-Google-Smtp-Source: APXvYqxuevD5QYIjXc8KkAt6rfPJAKcxzQ9e2dxV1qqTdK5BMUExfospSEc3/afqKpGBvfOJuc6N X-Received: by 2002:a05:600c:21d5:: with SMTP id x21mr1888827wmj.36.1575029120726; Fri, 29 Nov 2019 04:05:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1575029120; cv=none; d=google.com; s=arc-20160816; b=QJ/gqNre1v6CvBViSK3T2BouwQq2szMNjgz/bA65Rklcr7YIZE1A8emJGFcf0PIh9C xLeVcAgwNNceZWkRLbsNDegDliV+zSYPYN3lB8NXK8ZIZBcal6I/kdFESLJcOhm/Jp2S mmH1vAu+0ANZKsCiuUvH9gDZTZAwSzIrHaIBJWKo4sMdihl4tXKSV4ItpHI4839JhyrO myKtv4IH7lv4W21PIy69hMJYRz/Pb7VmSnafZmzt2EPqaQ1IJOxWSUbfCBxSjKOOY4J3 du43bfkWiFNgodIRRNwB+1a50nx1IeXb6IdvkgtvumJxQf8HHGXunEp6CR5xeM2W7XB3 MHJg== 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 :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :dkim-signature; bh=4e2fQd04m1vD23T4e+mMcwBXh6jch9xWoh1g3p5EFNM=; b=ZyeS570MwGPPbQqFUyIvBV4HTQePvzUtewn5WZATQ4oDCn9WGYcb14nUvdVN3fvsIL cyEYFXe+hhou3ily/HaCYGRwwB0QRE878o0AuCJaWR97a4rHFE6ZjfnYglGAnL6qPnks y8+NYoH3eFxza0erc6/9WA6CfqWM+f3IfyTVrqMVWkQ5EQZ+xRmLUR9Os7Hh+GTcoph0 BNOTOjMoQVmb2/ljAOdFPvynXyKXo/q1FfeOyCVRnJpS+9/tQeVFJnySJyRCfm2DBfwZ boQykSUoGjHO5045wxQ8J8PiYWK4ssfifqxGQwJ8QrWpzEbLmGwTBbOilyw7JU+KSZVn xj6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fastmail.fm header.s=fm1 header.b=PNW4u+dx; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=mL4JuWTO; 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=fastmail.fm Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i10si8418093edv.236.2019.11.29.04.04.55; Fri, 29 Nov 2019 04:05:20 -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=@fastmail.fm header.s=fm1 header.b=PNW4u+dx; dkim=pass header.i=@messagingengine.com header.s=fm1 header.b=mL4JuWTO; 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=fastmail.fm Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726832AbfK2MBL (ORCPT + 99 others); Fri, 29 Nov 2019 07:01:11 -0500 Received: from wnew2-smtp.messagingengine.com ([64.147.123.27]:45771 "EHLO wnew2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725892AbfK2MBL (ORCPT ); Fri, 29 Nov 2019 07:01:11 -0500 X-Greylist: delayed 979 seconds by postgrey-1.27 at vger.kernel.org; Fri, 29 Nov 2019 07:01:10 EST Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailnew.west.internal (Postfix) with ESMTP id C9AFC646; Fri, 29 Nov 2019 06:44:49 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 29 Nov 2019 06:44:50 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= subject:to:cc:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s=fm1; bh=4 e2fQd04m1vD23T4e+mMcwBXh6jch9xWoh1g3p5EFNM=; b=PNW4u+dxBIB7GYjUc 5cVpZNCZbEQ158cwoGvGOmH8UqFc9yCSQSRiUpp2xV4fGEp7gWbDSh+soLvM/Q9m 4/ElHSwYwU0ADCSsDjkXti2e1yVb8LSYgQzPrCoFkCKZSK+9IlRTwBM4GXXBnmYi /xqWXwFvaiDVm5+38ZX2qslsGxD3hVLF2CrpB1gHXuKh9xOXcKcoP/hjmubacWRp +yRIzcUCLJ/VbKK776HJAGPEt3ih0AkwbxzWRNBzR2ZfHV88zMiN11HIPzjqAVkt r3/D3SJevnlEWWtxJljIexyrC46VNiIWcmXb6ADd0J7pLKuse5ZXNetN0f21zv6Y UfcAA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=4e2fQd04m1vD23T4e+mMcwBXh6jch9xWoh1g3p5EF NM=; b=mL4JuWTOb40bZlY0aKiockV256QmMxMSGFBsYwqSuFFj8BYxJecUwu0zR D9JNQAPErJ0v9SwTltEmJaueQWICGpNAwP6spWoyGUVe8evZv1F4gJIM5QZoMg66 3F18RZO6ymMfOGE2NKP6cfamgTMvW/x9q5LyLnwydxCZxJSlLCThJkVciD+1ChPH Tgo9ho29XvG+wPLkUYHGDztyC+e5YRWQKOYczkxV5X6qiYxNnI3Ki+6MG5D6utOQ AwYzEpLd7DuCvC7y75jTzEKYKsakJUMM3QUmObGmoFbqykrC/wvK6/Pm0Q6QeCbM A4o3zxAADVexQIigQGwvJ9CY4A5Aw== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedufedrudeiledgvdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepuffvfhfhkffffgggjggtgfesthejredttdefjeenucfhrhhomhepuegvrhhn ugcuufgthhhusggvrhhtuceosghspghlihhsthhssegrrghkvghfrdhfrghsthhmrghilh drfhhmqeenucfkphepudejiedrudekledrieekrddukeelnecurfgrrhgrmhepmhgrihhl fhhrohhmpegsshgplhhishhtshesrggrkhgvfhdrfhgrshhtmhgrihhlrdhfmhenucevlh hushhtvghrufhiiigvpedt X-ME-Proxy: Received: from [192.168.1.20] (vol21-h02-176-189-68-189.dsl.sta.abo.bbox.fr [176.189.68.189]) by mail.messagingengine.com (Postfix) with ESMTPA id 0D64730600A7; Fri, 29 Nov 2019 06:44:45 -0500 (EST) Subject: Re: AW: Slow I/O on USB media after commit f664a3cc17b7d0a2bc3b3ab96181e1029b0ec0e6 To: Ming Lei , 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 References: <20191125151535.GA8044@ming.t460p> <0876e232feace900735ac90d27136288b54dafe1.camel@unipv.it> <20191126023253.GA24501@ming.t460p> <0598fe2754bf0717d81f7e72d3e9b3230c608cc6.camel@unipv.it> <20191128091712.GD15549@ming.t460p> <20191129005734.GB1829@ming.t460p> From: Bernd Schubert Message-ID: <3c57bba1-831b-fc97-d5f7-e670f43fbbdc@aakef.fastmail.fm> Date: Fri, 29 Nov 2019 12:44:53 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 MIME-Version: 1.0 In-Reply-To: <20191129005734.GB1829@ming.t460p> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> 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 - Bernd