lkml.org 
[lkml]   [2015]   [Jun]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 1/5] fs: kiocb: introduce IOCB_DONT_DIRTY_PAGE flag for direct IO
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.


\
 
 \ /
  Last update: 2015-06-09 09:01    [W:0.085 / U:4.656 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site