From: Christoph Hellwig <hch@infradead.org>
To: Dmitry Monakhov <dmonakhov@openvz.org>
Cc: Christoph Hellwig <hch@infradead.org>,
linux-kernel@vger.kernel.org, jens.axboe@oracle.com
Subject: Re: [PATCH 1/4] block: implement compatible DISCARD support
Date: Thu, 11 Feb 2010 08:09:45 -0500 [thread overview]
Message-ID: <20100211130945.GA7644@infradead.org> (raw)
In-Reply-To: <87d40cq66k.fsf@openvz.org>
On Thu, Feb 11, 2010 at 03:59:31PM +0300, Dmitry Monakhov wrote:
> I mean that it is impossible to know was it really successful or not.
> We may just replace this function with this following function.
> const char* make_me_hapy()
> {
> return "you are happy already.";
> }
Which is an entirely valid, although suboptimal implementation.
> AFAIK Currently there is no any generic block interface which send
> io requests without ability to check the result.
> The question is should it be sync or async it is not easy to design
> simple async interface so let's use sync by default
> BTW: That's why blkdev_issue_barrier has to wait by default.
This is going to kill performance.
> > That's incorrect - both the scsi WRITE SAME and ATA UNMAP
> > implementations write to the payload.
> WOW. What for?
Becuase these commands contain ranges of to be flushed blocks
in their payload.
> > Which is a bit different from fixing efficiency issues in discard, I'd
> > prefer that to be split into a separate patch, especially as there might
> > be quite a bit of discussion on the zeroout behaviour.
> Seems that you also right here. At list it is not obvious how we should
> send compat_discard bios WRITE,WRITE_SYNC or WRITE_SYNC_PLUG?
> But blkdev_issue_zeroout() interface allow all this flags.
> let's wait a bit and i'll redesign the patchset correspondingly
The !wait case is ansynchronous, so WRITE seems fine. The wait and
!barrier case is more interesting, as this one is very close to
synchrous write semantics. But I'm not sure it's really worth
optimization for that, this case is not used for online discarding
but things like mkfs that have the filesystem for itself, or that
not yet merged background discard for xfs which doesn't care too
much about I/O priority.
next prev parent reply other threads:[~2010-02-11 13:09 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-11 10:53 [PATCH 1/4] block: implement compatible DISCARD support Dmitry Monakhov
2010-02-11 10:57 ` [PATCH 2/4] block: support compat discard mode by default Dmitry Monakhov
2010-02-11 11:25 ` Dmitry Monakhov
2010-02-11 12:22 ` Christoph Hellwig
2010-02-11 10:59 ` [PATCH 3/4] ext4: convert extent zeroout to generic function Dmitry Monakhov
2010-02-11 11:01 ` [PATCH 4/4] btrfs: add discard_compat support Dmitry Monakhov
2010-02-11 11:15 ` Dmitry Monakhov
2010-02-11 12:21 ` [PATCH 1/4] block: implement compatible DISCARD support Christoph Hellwig
2010-02-11 12:59 ` Dmitry Monakhov
2010-02-11 13:09 ` Christoph Hellwig [this message]
2010-02-11 13:45 ` Dmitry Monakhov
2010-02-11 14:06 ` Christoph Hellwig
2010-02-11 14:40 ` Martin K. Petersen
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=20100211130945.GA7644@infradead.org \
--to=hch@infradead.org \
--cc=dmonakhov@openvz.org \
--cc=jens.axboe@oracle.com \
--cc=linux-kernel@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox