From: Jens Axboe <axboe@kernel.dk>
To: Matthew Wilcox <matthew@wil.cx>
Cc: Christoph Hellwig <hch@lst.de>,
linux-fsdevel@vger.kernel.org,
Chris Mason <chris.mason@oracle.com>
Subject: Re: [PATCH] block: fix DISCARD_BARRIER requests
Date: Thu, 17 Jun 2010 14:06:21 +0200 [thread overview]
Message-ID: <4C1A0FBD.7070705@kernel.dk> (raw)
In-Reply-To: <20100617114947.GI9298@parisc-linux.org>
On 2010-06-17 13:49, Matthew Wilcox wrote:
> On Thu, Jun 17, 2010 at 10:10:18AM +0200, Jens Axboe wrote:
>> On 2010-06-17 09:54, Christoph Hellwig wrote:
>>> Filesystems assume that DISCARD_BARRIER are full barriers, so that they
>>> don't have to track in-progress discard operation when submitting new I/O.
>>> But currently we only treat them as elevator barriers, which don't
>>> actually do the nessecary queue drains.
>>>
>>> Also remove the unlikely around both the DISCARD and BARRIER requests -
>>> the happen far too often for a static mispredict.
>>
>> Thanks, applied. There was a recent problem report on btrfs using
>> discard, could possibly explain it if Chris assumed it was a full
>> barrier.
>
> If it was on real hardware (ie a SATA disc), it can't be this problem,
> since TRIM isn't NCQ so there was already an implicit queue drain ahead
> and behind the TRIM. I hear rumours of an NCQ TRIM coming 'RSN', but
> haven't seen any details on it yet.
Good point, it will drain the queue on SATA of course. The problem was
reported on MMC, I doubt the do queuing at all (though I have not
checked).
--
Jens Axboe
next prev parent reply other threads:[~2010-06-17 12:06 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-06-17 7:54 [PATCH] block: fix DISCARD_BARRIER requests Christoph Hellwig
2010-06-17 8:10 ` Jens Axboe
2010-06-17 11:49 ` Matthew Wilcox
2010-06-17 12:06 ` Jens Axboe [this message]
2010-06-17 16:54 ` Christoph Hellwig
2010-06-17 19:22 ` Chris Mason
2010-06-18 13:29 ` Kyungmin Park
2010-06-19 2:22 ` Kyungmin Park
2010-06-18 15:29 ` Jamie Lokier
2010-06-18 20:30 ` Chris Mason
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C1A0FBD.7070705@kernel.dk \
--to=axboe@kernel.dk \
--cc=chris.mason@oracle.com \
--cc=hch@lst.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=matthew@wil.cx \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.