Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755489Ab2B0XSJ (ORCPT ); Mon, 27 Feb 2012 18:18:09 -0500 Received: from rcsinet15.oracle.com ([148.87.113.117]:22941 "EHLO rcsinet15.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754955Ab2B0XSE (ORCPT ); Mon, 27 Feb 2012 18:18:04 -0500 Message-ID: <4F4C0F25.8000601@oracle.com> Date: Mon, 27 Feb 2012 17:17:57 -0600 From: Dave Kleikamp User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.2) Gecko/20120217 Thunderbird/10.0.2 MIME-Version: 1.0 To: "Myklebust, Trond" CC: "linux-fsdevel@vger.kernel.org" , "linux-kernel@vger.kernel.org" , Zach Brown , "linux-nfs@vger.kernel.org" Subject: Re: [RFC PATCH 22/22] nfs: add support for read_iter, write_iter References: <1330377576-3659-1-git-send-email-dave.kleikamp@oracle.com> <1330377576-3659-23-git-send-email-dave.kleikamp@oracle.com> <1330380530.5541.87.camel@lade.trondhjem.org> In-Reply-To: <1330380530.5541.87.camel@lade.trondhjem.org> X-Enigmail-Version: 1.3.5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Source-IP: acsinet22.oracle.com [141.146.126.238] X-CT-RefId: str=0001.0A090206.4F4C0F2C.0008,ss=1,re=0.000,fgs=0 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1570 Lines: 33 On 02/27/2012 04:08 PM, Myklebust, Trond wrote: > On Mon, 2012-02-27 at 15:19 -0600, Dave Kleikamp wrote: >> This patch implements the read_iter and write_iter file operations which >> allow kernel code to initiate directIO. This allows the loop device to >> read and write directly to the server, bypassing the page cache. >> >> Signed-off-by: Dave Kleikamp >> Cc: Zach Brown >> Cc: Trond Myklebust >> Cc: linux-nfs@vger.kernel.org > > Performance is going to be absolutely terrible for O_DIRECT bvecs if you > send just one page per RPC call. We are working on merging the O_DIRECT > and page cache code in order to give O_DIRECT the ability to coalesce > requests and do pNFS, and I'm hoping that code will be available soon. > > In the meantime, wouldn't it be possible to add basic coalescing to > nfs_direct_read_schedule_bvec/nfs_direct_write_schedule_bvec more or > less in the same way that we do for multi-page iovec segments? > i.e. if the next bvec is contiguous with the previous, and the resulting > RPC read length < rsize / write length < wsize, then add it to the same > RPC call. I basically followed the example of what the block layer was doing, but coalescing makes more sense for nfs. I'll rework it to do that. Thanks, Shaggy -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/