Talpey, Thomas wrote: > At 12:35 PM 7/13/2007, Chuck Lever wrote: >> Talpey, Thomas wrote: >>> RPCRDMA: rpc rdma protocol implementation >>> +#include >>> +#include >>> +#include >> I haven't looked closely at this yet, but is there really a dependency >> in here on NFS? I don't see NFS dependencies in other parts of the RPC >> client or server, save the legacy debugging interface >> (/proc/sys/sunrpc/nfs_debug and friends). >> > > It's right here: > >>> +/* >>> + * Totally imperfect, temporary attempt to detect nfs reads... >>> + * e.g. establish a hint via xdr_inline_pages, etc. >>> + */ >>> +static int >>> +is_nfs_read(struct rpc_rqst *rqst) >>> +{ > > In which the code peeks into the rpc request to divine its origin. > NFS reads prefer a slightly different RDMA handling, because they > (ideally) transfer directly into the buffer cache, or other pagelist > buffers such as passed by directio. Ops such as readdir however > prefer a contiguous transfer. Well, the other "read-like" operations (like readdir or readlink) use a single page cache page, as far as i recall. In fact there is some desire to support multi-page readdir and readdirplus operations at some point. > The alternative is mentioned, and would involve marking pagelists > built in xdr_inline_pages(), this of course would also require changes to > the NFS-layer callers. I am prepared to do that, pending the outcome > of these comments. I would humbly prefer the clean alternative: I think several other operations can use this. Seems like the distinction is the operations that read data (like readdir, readlink, read) and those that read metadata (getattr). The ULP should provide a hint on each of these. Possibly you could hack the nfs_procedures tables (which is an RPC client data structure) to provide the hint.