public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: linux-nfs@vger.kernel.org
Subject: Re: [PATCH 2/2] NFS: Don't generate a GETATTR when opening an O_DIRECT file
Date: Thu, 11 Feb 2010 14:41:31 -0500	[thread overview]
Message-ID: <4B745D6B.8060601@oracle.com> (raw)
In-Reply-To: <1265916841.478.31.camel@localhost>

On 02/11/2010 02:34 PM, Trond Myklebust wrote:
> On Thu, 2010-02-11 at 14:20 -0500, Chuck Lever wrote:
>> On 02/11/2010 02:14 PM, Trond Myklebust wrote:
>>> On Thu, 2010-02-11 at 14:09 -0500, Chuck Lever wrote:
>>>> Close-to-open isn't needed for O_DIRECT files, since their data is
>>>> never cached.  So if their attribute cache hasn't expired, skip the
>>>> GETATTR.
>>>
>>> Don't we still want to ensure that the access cache is still valid?
>>
>> Would it be reasonable/feasible to squelch the GETATTR but force an
>> ACCESS call from nfs_permission?
>
> As long as the ACCESS call returns post-op attributes, then it is
> reasonable to do this for NFSv3 (or for NFSv4 opendir()) in all cases.
>
> I used to have patches for this, but was never able to show that the
> resulting total number of GETATTR+ACCESS calls was much affected.

It probably doesn't make a whole lot of difference in this case either, 
then.  The client would generate a GETATTR which effectively refreshes 
both the attribute cache and the access cache, or an ACCESS that does 
almost the same.

The previous patch probably fixes the (by far) largest part of the 
request overage here.

Does it make sense to drop this patch?

-- 
chuck[dot]lever[at]oracle[dot]com

  reply	other threads:[~2010-02-11 19:43 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-11 19:08 [PATCH 0/2] Reduce GETATTRs during direct I/O Chuck Lever
     [not found] ` <20100211185757.2666.90001.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-02-11 19:09   ` [PATCH 1/2] NFS: Too many GETATTR and ACCESS calls after " Chuck Lever
2010-02-11 19:09   ` [PATCH 2/2] NFS: Don't generate a GETATTR when opening an O_DIRECT file Chuck Lever
     [not found]     ` <20100211190918.2666.82008.stgit-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2010-02-11 19:13       ` Chuck Lever
2010-02-11 19:14       ` Trond Myklebust
2010-02-11 19:20         ` Chuck Lever
2010-02-11 19:34           ` Trond Myklebust
2010-02-11 19:41             ` Chuck Lever [this message]
2010-02-11 19:45               ` Trond Myklebust

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=4B745D6B.8060601@oracle.com \
    --to=chuck.lever@oracle.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