From: Jeff Layton <jlayton@redhat.com>
To: "Yan, Zheng" <ukernel@gmail.com>
Cc: Zheng Yan <zyan@redhat.com>,
Ceph Development <ceph-devel@vger.kernel.org>
Subject: Re: is the renewal in dentry_lease_is_valid necessary?
Date: Tue, 28 Jun 2016 10:00:56 -0400 [thread overview]
Message-ID: <1467122456.32374.15.camel@redhat.com> (raw)
In-Reply-To: <CAAM7YAm7qHJkKjXSiG2bz-D04uNVJTbDw4XbvZ9mnU==u9eT2Q@mail.gmail.com>
On Tue, 2016-06-28 at 21:03 +0800, Yan, Zheng wrote:
> On Tue, Jun 28, 2016 at 3:07 AM, Jeff Layton <jlayton@redhat.com> wrote:
> >
> > I'm eyeballing how to make ceph dentry revalidation occur in rcu-walk
> > mode in the kernel cephfs client. It looks fairly straightforward, but
> > for one thing:
> >
> > dentry_lease_is_valid queues an asynchronous lease renewal if we're
> > halfway to the next lease renewal time:
> >
> > if (session) {
> > ceph_mdsc_lease_send_msg(session, dir, dentry,
> > CEPH_MDS_LEASE_RENEW, seq);
> > ceph_put_mds_session(session);
> > }
> >
> > That can sleep, so we have to drop out of rcu walk mode in that case.
> >
> > Is this lease renewal strictly necessary? I can make the code drop out
> > of rcuwalk mode and try again in that case, but if this is just an
> > opportunistic thing, then it may be better for performance to take a
> > pass on renewing the lease early if we're still in RCU walk mode.
> >
> dentry_lease_is_valid is the only place that renew lease. I think it's
> better to drop out of rcuwalk and try again
>
> Regards
> Yan, Zheng
>
That seems really odd to me.
That call is only ever done in the d_revalidate codepath, so you'll
only get a lease renewal when you have repeated path-based access to an
existing dentry.
Maybe this means that I don't really understand ceph leases. More
questions...
What exactly does the lease cover here?
Shouldn't we be renewing it even if we're _not_ doing any path-based
access? For instance, if I open a file and issue reads and writes
against it, that doesn't involve pathnames and the lease doesn't get an
explicit renewal. Doesn't it still need to be renewed though?
--
Jeff Layton <jlayton@redhat.com>
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2016-06-28 14:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-27 19:07 is the renewal in dentry_lease_is_valid necessary? Jeff Layton
2016-06-27 20:11 ` Gregory Farnum
2016-06-28 13:03 ` Yan, Zheng
2016-06-28 14:00 ` Jeff Layton [this message]
2016-06-28 18:58 ` Gregory Farnum
2016-06-29 6:53 ` Yan, Zheng
2016-06-29 12:25 ` Jeff Layton
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=1467122456.32374.15.camel@redhat.com \
--to=jlayton@redhat.com \
--cc=ceph-devel@vger.kernel.org \
--cc=ukernel@gmail.com \
--cc=zyan@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.