From: Christoph Hellwig <hch@infradead.org>
To: Ming Lei <ming.lei@canonical.com>
Cc: Christoph Hellwig <hch@infradead.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Dave Kleikamp <dave.kleikamp@oracle.com>,
Jens Axboe <axboe@kernel.dk>, Zach Brown <zab@zabbo.net>,
Maxim Patlasov <mpatlasov@parallels.com>,
Andrew Morton <akpm@linux-foundation.org>,
Alexander Viro <viro@zeniv.linux.org.uk>,
Tejun Heo <tj@kernel.org>, Dave Chinner <david@fromorbit.com>
Subject: Re: [PATCH v4 1/5] fs: kiocb: introduce IOCB_DONT_DIRTY_PAGE flag for direct IO
Date: Mon, 8 Jun 2015 23:29:43 -0700 [thread overview]
Message-ID: <20150609062943.GA32395@infradead.org> (raw)
In-Reply-To: <CACVXFVNKebHqKyNEh_eOYSGiB59+-vMsobUgw+08dh48jMQqNg@mail.gmail.com>
On Sat, Jun 06, 2015 at 08:42:33AM +0800, Ming Lei wrote:
> Both ITER_KVEC and ITER_BVEC doesn't mean the pages are kernel
> page, for example of loop and swap. That is why this patch is more flexiable,
> and won't cause regression since the users may have different dirtying
> rules as you mentioned last time.
>
> http://marc.info/?t=143093223200001&r=1&w=2
Again, we never dirty pages for the caller when doing general purpose
kernel I/O. For loop we either don't need it (totally in-kernel block
I/O) or the caller takes care of it (direct I/O on the loop device).
The swap code currently only uses ->direct_IO and thus isn't affected
by this flag. If we use it for write the low-level I/O code should not
dirty the page either.
So to repeat myself: for the current state of affairs adding a flag
that every sensible user has to set is a horrible interface. If for
some unforseen reason we'll need the flag later on it should have
reverse polarity, and only be added when needed.
next prev parent reply other threads:[~2015-06-09 6:29 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-29 6:35 [PATCH v4 0/4] block: loop: improve loop with AIO Ming Lei
2015-05-29 6:35 ` [PATCH v4 1/5] fs: kiocb: introduce IOCB_DONT_DIRTY_PAGE flag for direct IO Ming Lei
2015-06-05 15:03 ` Christoph Hellwig
2015-06-06 0:42 ` Ming Lei
2015-06-09 6:29 ` Christoph Hellwig [this message]
2015-06-09 9:58 ` Ming Lei
2015-05-29 6:35 ` [PATCH v4 2/5] block: loop: set QUEUE_FLAG_NOMERGES for request queue of loop Ming Lei
2015-05-29 6:35 ` [PATCH v4 3/5] block: loop: use kthread_work Ming Lei
2015-05-29 6:35 ` [PATCH v4 4/5] block: loop: prepare for supporing direct IO Ming Lei
2015-05-29 6:35 ` [PATCH v4 5/5] block: loop: support DIO & AIO Ming Lei
2015-06-05 8:26 ` [PATCH v4 0/4] block: loop: improve loop with AIO Ming Lei
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=20150609062943.GA32395@infradead.org \
--to=hch@infradead.org \
--cc=akpm@linux-foundation.org \
--cc=axboe@kernel.dk \
--cc=dave.kleikamp@oracle.com \
--cc=david@fromorbit.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ming.lei@canonical.com \
--cc=mpatlasov@parallels.com \
--cc=tj@kernel.org \
--cc=viro@zeniv.linux.org.uk \
--cc=zab@zabbo.net \
/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
all inboxes | Powered by JetHome®