linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peng Tao <tao.peng@emc.com>
To: "Myklebust, Trond" <Trond.Myklebust@netapp.com>
Cc: "linux-nfs@vger.kernel.org" <linux-nfs@vger.kernel.org>
Subject: Re: [PATCH 3/3] pnfsblock: bail out unaligned DIO
Date: Tue, 29 May 2012 01:07:05 +0800	[thread overview]
Message-ID: <CA+a=Yy5J8KaVNVWSwprUeZKsUMTV09C-OoaS59CUsd0ohii2OA@mail.gmail.com> (raw)
In-Reply-To: <1338222809.3472.13.camel@lade.trondhjem.org>

On Tue, May 29, 2012 at 12:33 AM, Myklebust, Trond
<Trond.Myklebust@netapp.com> wrote:
> On Mon, 2012-05-28 at 00:26 -0400, tao.peng@emc.com wrote:
>> > -----Original Message-----
>> > From: Myklebust, Trond [mailto:Trond.Myklebust@netapp.com]
>> > Sent: Monday, May 28, 2012 11:45 AM
>> > To: Peng, Tao
>> > Cc: bergwolf@gmail.com; linux-nfs@vger.kernel.org
>> > Subject: RE: [PATCH 3/3] pnfsblock: bail out unaligned DIO
>> >
>> > On Sun, 2012-05-27 at 22:30 -0400, tao.peng@emc.com wrote:
>> > > As explain in the other mail, it is necessary to have pnfs_dio_begin/end, so I prefer to do the test
>> > as early as possible, which is in pnfs_dio_begin.
>> >
>> > There is no pnfs_dio_begin/end.
>> OK. I will put DIO alignment tests inside pg_init.
>>
>> And any comments on for stable patch in the thread ([PATCH] pnfsblock: bail out page unaligned IO)? If you agree, I will base DIO changes on top of it to avoid conflicts.
>> There are reasons to test alignment at different place for buffer IO and DIO. For buffer IO, pg_init isn't the right place because we don't have nfs page there. For DIO, pg_test isn't the right place because we need to check cross page boundary.
>
> Since all pages in the struct nfs_pageio_descriptor are guaranteed to be
> contiguous, you really only need to check the first and last page in the
> series for alignment.
>
> pg_init() does take the first nfs_page request as its argument and so it
> should be possible to check the alignment of the first page in the
> series there.
> You can then check the alignment of the last page in your
> ->write_pagelist() and return PNFS_NOT_ATTEMPTED if appropriate.
>
Thanks. Will do it as you suggested.

> Note that all applications that use O_DIRECT are expected to use aligned
> memory, since that's what the open() manpage implies is the safe option
> for all filesystems. Unaligned memory is therefore not something that we
> need to optimise for.
>
do_blockdev_direct_IO() is checking memory alignment for direct IO. Is
there any difference between NFS and other FS here?

Cheers,
Tao

  reply	other threads:[~2012-05-28 17:07 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-27  5:32 [PATCH 0/3] NFS41: make block layout driver work w/ NFS DIO changes Peng Tao
2012-05-27  5:32 ` [PATCH 1/3] NFS41: add pnfs_dio_begin/dio_end Peng Tao
2012-05-27 16:29   ` Myklebust, Trond
2012-05-28  2:30     ` tao.peng
2012-05-28  3:42       ` Myklebust, Trond
2012-05-28  4:13         ` tao.peng
2012-05-28 10:44           ` Boaz Harrosh
2012-05-28 10:51             ` Boaz Harrosh
2012-05-28 17:14               ` Peng Tao
2012-05-28 17:24                 ` Boaz Harrosh
2012-05-28 17:36                   ` Peng Tao
2012-05-28 17:44                     ` Myklebust, Trond
2012-05-27  5:32 ` [PATCH 2/3] pnfsblock: call block plug in bl_dio_begin/end Peng Tao
2012-05-27  5:33 ` [PATCH 3/3] pnfsblock: bail out unaligned DIO Peng Tao
2012-05-27 16:38   ` Myklebust, Trond
2012-05-28  2:30     ` tao.peng
2012-05-28  3:45       ` Myklebust, Trond
2012-05-28  4:26         ` tao.peng
2012-05-28 16:33           ` Myklebust, Trond
2012-05-28 17:07             ` Peng Tao [this message]
2012-05-28 11:26       ` Boaz Harrosh
2012-05-28 16:50         ` Peng Tao
2012-05-28 17:10           ` Boaz Harrosh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CA+a=Yy5J8KaVNVWSwprUeZKsUMTV09C-OoaS59CUsd0ohii2OA@mail.gmail.com' \
    --to=tao.peng@emc.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).