From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752617AbbEKHTN (ORCPT ); Mon, 11 May 2015 03:19:13 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:53150 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752526AbbEKHTK (ORCPT ); Mon, 11 May 2015 03:19:10 -0400 Date: Mon, 11 May 2015 00:19:09 -0700 From: Christoph Hellwig To: Ming Lei Cc: Christoph Hellwig , Linux Kernel Mailing List , Dave Kleikamp , Jens Axboe , Zach Brown , 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: <20150511071909.GA19488@infradead.org> References: <1430932106-17451-1-git-send-email-ming.lei@canonical.com> <1430932106-17451-2-git-send-email-ming.lei@canonical.com> <20150507071618.GA7595@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 08:12:31PM +0800, Ming Lei wrote: > In case of loop, it is quite specific about dirtying READ pages in > direct IO because fs over loop has considered dirtying these pages > already. > > For other cases of ITER_BVEC or ITER_KVEC, if the page is > anonymous or mapped, dirtying is still needed, otherwise > the new written data may be dropped like direct-io from user space. But those would be user pages. Anyone who passes a kernel page doesn't expect it do be dirtied for normal kernel interfaces.