lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACVXFVPHYXo2AvcX8GHzdre3kMp2ViHTKdrMbqg3awngCy-GEg@mail.gmail.com>
Date:	Tue, 12 May 2015 16:54:47 +0800
From:	Ming Lei <ming.lei@...onical.com>
To:	Christoph Hellwig <hch@...radead.org>
Cc:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	Dave Kleikamp <dave.kleikamp@...cle.com>,
	Jens Axboe <axboe@...nel.dk>, Zach Brown <zab@...bo.net>,
	Maxim Patlasov <mpatlasov@...allels.com>,
	Andrew Morton <akpm@...ux-foundation.org>,
	Alexander Viro <viro@...iv.linux.org.uk>,
	Tejun Heo <tj@...nel.org>
Subject: Re: [PATCH v3 1/4] fs: kiocb: introduce IOCB_DONT_DIRTY_PAGE flag for
 direct IO

On Tue, May 12, 2015 at 3:24 PM, Christoph Hellwig <hch@...radead.org> wrote:
> On Mon, May 11, 2015 at 09:02:54PM +0800, Ming Lei wrote:
>> > But those would be user pages.  Anyone who passes a kernel page doesn't
>>
>> Inside kernel it is hard to say one page in page cache is kernel or
>> user page, :-)
>
> Inside the kernel it's easy to say that it's the caller business to
> make sure we don't need to carry through hacks like this.
>
>> > expect it do be dirtied for normal kernel interfaces.
>>
>> Currently the coming direct IO introduced for loop should be the 1st direct
>> read inside kernel, so there isn't the case of passing kernel pages, and
>> obviously ITER_BVEC/ITER_KVEC doesn't mean the page is 'kernel' page.
>>
>> Another direct IO inside kernel is __swap_writepage(), and it is still
>> ITER_BVEC and user page. Maybe in the future swap_readpage()
>> can use direct IO with BVEC too.
>
>
> Swap will have very different rules to deal with page dirtying as it's
> part of the VM subsystem.  Again, the caller will now better.

Yes, the caller knows better, that is why I introduce the flag, so
the caller can set the flag if it need direct-io to bypass the dirtying,
otherwise the caller can just clear the flag.  Or I understand you wrong?


Thanks,
Ming Lei
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ