From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753211AbbEGHQV (ORCPT ); Thu, 7 May 2015 03:16:21 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:39978 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751209AbbEGHQT (ORCPT ); Thu, 7 May 2015 03:16:19 -0400 Date: Thu, 7 May 2015 00:16:18 -0700 From: Christoph Hellwig To: Ming Lei Cc: linux-kernel@vger.kernel.org, Dave Kleikamp , Jens Axboe , Zach Brown , Christoph Hellwig , Maxim Patlasov , Andrew Morton , Alexander Viro , Tejun Heo Subject: Re: [PATCH v3 1/4] fs: kiocb: introduce IOCB_DONT_DIRTY_PAGE flag for direct IO Message-ID: <20150507071618.GA7595@infradead.org> References: <1430932106-17451-1-git-send-email-ming.lei@canonical.com> <1430932106-17451-2-git-send-email-ming.lei@canonical.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1430932106-17451-2-git-send-email-ming.lei@canonical.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, May 07, 2015 at 01:08:23AM +0800, Ming Lei wrote: > When direct IO is submitted from kernel, it is often unnecessary > to dirty pages, for example of loop, dirtying pages have been > considered in the upper filesystem(over loop) side already, and > they don't need to be dirtied again. > > So this patch introduces IOCB_DONT_DIRTY_PAGE flag for direct IO, > and other ITER_BVEC and ITER_KVEC cases might benefit from it too. > > The patch is based on previous Dave's patch. in-kernel I/O should never dirty the pages written to or read from, so just checking the iov_iter type should be enough.