On Fri, Apr 20, 2012 at 3:46 PM, Myklebust, Trond <Trond.Myklebust@xxxxxxxxxx> wrote: > On Fri, 2012-04-20 at 14:47 -0400, Fred Isaman wrote: >> The coalesce code made assumptions that will no longer be true once >> non-page aligned io occurs. This introduces no change in >> current behavior, but allows for more general situations to come. >> >> Signed-off-by: Fred Isaman <iisaman@xxxxxxxxxx> >> --- >> fs/nfs/nfs4filelayout.c | 12 ++++++++++++ >> fs/nfs/pagelist.c | 2 +- >> fs/nfs/pnfs.c | 8 ++++++++ >> 3 files changed, 21 insertions(+), 1 deletions(-) >> >> diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c >> index 5d01a16..b344946 100644 >> --- a/fs/nfs/pagelist.c >> +++ b/fs/nfs/pagelist.c >> @@ -280,7 +280,7 @@ static bool nfs_can_coalesce_requests(struct nfs_page *prev, >> return false; >> if (req->wb_context->state != prev->wb_context->state) >> return false; >> - if (req->wb_index != (prev->wb_index + 1)) >> + if (req_offset(req) != req_offset(prev) + prev->wb_bytes) > > Can we micro-optimise this just a teensy bit by moving it until after > the req->wb_base and prev->wb_base tests? Since those are > computationally simpler, doing them first might make the "can't > coalesce" test a little faster. > Sure. Do you want a new v4 submission with just that change? Fred -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html