From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx106.postini.com [74.125.245.106]) by kanga.kvack.org (Postfix) with SMTP id CBE216B13F0 for ; Tue, 31 Jan 2012 06:08:01 -0500 (EST) Date: Tue, 31 Jan 2012 18:57:54 +0800 From: Wu Fengguang Subject: Re: [PATCH] fix readahead pipeline break caused by block plug Message-ID: <20120131105754.GA3867@localhost> References: <1327996780.21268.42.camel@sli10-conroe> <20120131103416.GA1661@localhost> <20120131104621.GA27003@infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20120131104621.GA27003@infradead.org> Sender: owner-linux-mm@kvack.org List-ID: To: Christoph Hellwig Cc: Shaohua Li , lkml , linux-mm , Andrew Morton , Jens Axboe , Herbert Poetzl , Eric Dumazet , Vivek Goyal On Tue, Jan 31, 2012 at 05:46:21AM -0500, Christoph Hellwig wrote: > On Tue, Jan 31, 2012 at 06:34:16PM +0800, Wu Fengguang wrote: > > } > > > > + blk_start_plug(&plug); > > written = mapping->a_ops->direct_IO(WRITE, iocb, iov, pos, *nr_segs); > > + blk_finish_plug(&plug); > > Please move the plugging into ->direct_IO for both read and write, as > that is the boundary between generic highlevel code, and low-level block > code that should know about plugs. The problem is, there are a dozen of ->direct_IO callback functions. While there are only two ->direct_IO() callers, one for READ and another for WRITE, which are much easier to deal with. Thanks, Fengguang -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org