Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp7010901ybi; Thu, 13 Jun 2019 08:07:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqyj0p9VDwYGsVnvLYiiwSphaVKy/JktjAapIn3xlyyHTEsxTDrIDTtX9GB2mFsxeJO+LKKO X-Received: by 2002:a17:902:b717:: with SMTP id d23mr12204867pls.53.1560438433832; Thu, 13 Jun 2019 08:07:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560438433; cv=none; d=google.com; s=arc-20160816; b=vkr+nzT947AqpxGWbO35ETgT0+XZur3YQiBpNdBnFFeIZpsEHk7uHjBTKHFDVAXfUD xueiuwBPZsXmSi23hMZVVTjXbSupFYdfoyRMbpQNvR0t1zUlT8eJO8krFZf02LZ85vGe 5vIwwEOFX7xYrhSnnXCGTRnxO2EjytqRErdzpOS+e0jL7R0JWWy0BGSZNFH31Qp8Fkb3 0J9x8zPJlheb1oqxCr1BIb+XC4JksZXexCSzmldI0jDkr4Bcw0oos9QdNGtov0QjKa25 yh+y/7DrCiWeZawPHXOWSB73Dla/Vv/6x3hKr96ewBp/WYvrHXCb7vFipEutsd/snWTH ngIA== 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=OdDaHrZjCVjfx0F7I84Ms3iqXEsw9YFLBG1e37K/zSk=; b=jTF1LHU3TyvN7GG9L2krJZ9HNSDGh97Jx1ZnNHStsg9a1JfKTOJ8HKQdKTxqRDunol uVjvsQkdRRS8sdWygiHkiUgKOOs4IvdKpSvxcO+kkThV7UhprpdpIuvGTCpUioyC/mZg 0z6Grv79IUFefxU7yTbqhLuoT8W5CM5Iz+UD6ZgR2hZDRagddjPN7awUqtTSRHi5yEoY bHuyJi6Z++b8iGbu8ZuGZ8F4mMrAczFoLIxlUkZkte9u2R2bLLY1bq7BouczpC5i7QFG 4lEV5S/uRjoP18dDmCLbmahgkQH5YSHfHFGmqc5TK9OUUYoM4x33cqZzmGZ3vvy5xdf6 ozUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@toxicpanda-com.20150623.gappssmtp.com header.s=20150623 header.b=sYqQ6uKn; 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 x24si36834pgh.393.2019.06.13.08.06.57; Thu, 13 Jun 2019 08:07:13 -0700 (PDT) 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=@toxicpanda-com.20150623.gappssmtp.com header.s=20150623 header.b=sYqQ6uKn; 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 S1732854AbfFMPFf (ORCPT + 99 others); Thu, 13 Jun 2019 11:05:35 -0400 Received: from mail-qt1-f196.google.com ([209.85.160.196]:41802 "EHLO mail-qt1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732444AbfFMOPB (ORCPT ); Thu, 13 Jun 2019 10:15:01 -0400 Received: by mail-qt1-f196.google.com with SMTP id 33so14546539qtr.8 for ; Thu, 13 Jun 2019 07:15:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=toxicpanda-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=OdDaHrZjCVjfx0F7I84Ms3iqXEsw9YFLBG1e37K/zSk=; b=sYqQ6uKns66zBU93j9yEeT/LvK5SGvAWuiWz7tHFKP7mn86ErCaTm0z6ueEaaYTBtg dppoEWF3t5KwmGEiTyNyELHfy/K4HBjO63VBJld10Wczby5Bgw0JqRryBbLcTInMngZF sP9X0zKnUXr6BFW7dvX+xwYtaeoQpjJAJggqP317rGAKYhQtp+saVK4UXI3ItKnbhCoA hU9taLmEZSCOBzlLEaGANGcNtWJISSQt/5H+szYc4JyKWmFRwxx/WK/9aEzTWn1UGDte qjTdAr4LhHnD/vXiT4bAdYs4gHhceTk9y66k9SNnyJAQEtt21xVoHV5QE13CHyrq6LlU p0oA== 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=OdDaHrZjCVjfx0F7I84Ms3iqXEsw9YFLBG1e37K/zSk=; b=aM1780KFESYKYJwwfZSxXO0pMlvemyCoQB3YaHGZVd6DasdAmDWZ4dRG6LeNKkiQ9I YY2TDA5uj1Zy5ahaYWPl6IYm0c7esvqF6wJuyRZdJwknZRcKwmureq5BH+DBEP2EouAH qJYvbgTrS40xRyuD2yQCIfW6SxIjXHCJVZyoSM9MpAYqTwHam96lMaD2mVUZoYIiCJe/ N56z2QJjFmdyrKcxW8A5ytORvKQmw4yxUPelYaVioVz1LpzHGZqKwIBn1S3GTu5KnK78 c1tqXwzS3ZYuwWzz0MuwYYZ/g1nLWPijAeHIKQARHZfvBoxoPdRkWK4Nj3WIjjxvrgiB I87w== X-Gm-Message-State: APjAAAXvHfq0+ElqluEHGZWUjIBtk0xiHWz4vmY1HUOTPO0hNXKDZnp/ 0xvfkT19y0BSK0N4/oKJTq9C+w== X-Received: by 2002:a0c:9891:: with SMTP id f17mr790499qvd.49.1560435300381; Thu, 13 Jun 2019 07:15:00 -0700 (PDT) Received: from localhost ([2620:10d:c091:480::9d6b]) by smtp.gmail.com with ESMTPSA id w16sm1898172qtc.41.2019.06.13.07.14.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jun 2019 07:14:59 -0700 (PDT) Date: Thu, 13 Jun 2019 10:14:58 -0400 From: Josef Bacik To: Naohiro Aota Cc: linux-btrfs@vger.kernel.org, David Sterba , Chris Mason , Josef Bacik , Qu Wenruo , Nikolay Borisov , linux-kernel@vger.kernel.org, Hannes Reinecke , linux-fsdevel@vger.kernel.org, Damien Le Moal , Matias =?utf-8?B?QmrDuHJsaW5n?= , Johannes Thumshirn , Bart Van Assche Subject: Re: [PATCH 11/19] btrfs: introduce submit buffer Message-ID: <20190613141457.jws5ca63wfgjf7da@MacBook-Pro-91.local> References: <20190607131025.31996-1-naohiro.aota@wdc.com> <20190607131025.31996-12-naohiro.aota@wdc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190607131025.31996-12-naohiro.aota@wdc.com> User-Agent: NeoMutt/20180716 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 07, 2019 at 10:10:17PM +0900, Naohiro Aota wrote: > Sequential allocation is not enough to maintain sequential delivery of > write IOs to the device. Various features (async compress, async checksum, > ...) of btrfs affect ordering of the IOs. This patch introduces submit > buffer to sort WRITE bios belonging to a block group and sort them out > sequentially in increasing block address to achieve sequential write > sequences with __btrfs_map_bio(). > > Signed-off-by: Naohiro Aota I hate everything about this. Can't we just use the plugging infrastructure for this and then make sure it re-orders the bios before submitting them? Also what's to prevent the block layer scheduler from re-arranging these io's? Thanks, Josef