linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Trond Myklebust <Trond.Myklebust@netapp.com>
To: Mikael Davranche <mikael.davranche@free.fr>
Cc: linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH 0/3] NLM: Proposal for a timeout setting on blocking locks
Date: Tue, 11 Mar 2008 19:25:43 -0400	[thread overview]
Message-ID: <1205277943.16687.14.camel@heimdal.trondhjem.org> (raw)
In-Reply-To: <1205237665.47d677a143941@imp.free.fr>


On Tue, 2008-03-11 at 13:14 +0100, Mikael Davranche wrote:
> Hi,
> 
> When a lock blocks, the server sends us a BLOCKED message. When it releases, it
> may sends us an NLM callback. When it does not (it depends on NLM
>  implementations), the client waits for 30 seconds before attempting to reclaim
> the lock again.
> 
> The 30 seconds time is hard-coded on fs/lockd/clntproc.c:
> #define NLMCLNT_POLL_TIMEOUT   (30*HZ)
> 
> 30 seconds is generally suitable, but in some cases, it is too much and it may
> be set to less than that. I have this problem in my production env
> ironment when an e-mail box receives more than 1 e-mail every 30 seconds. In
> that particular case, the nlm_blocked list grows up and never reduce
> s. Setting this time to less than 30 seconds resolves the problem.
> 
> This short series of patches enables the set of this timeout, setting a new
> /proc entry named nlm_clnt_poll_timeout (this name is based on the NL
> MCLNT_POLL_TIMEOUT define). Patches are based on the 2.6.24.3 version (is that a
> problem? may I base them on the 2.6.25-rc5 one?).

You want to reduce the retransmission timeout on NLM because you receive
more than 1 email per retransmission timeout? I can't see how the two
are related. 

Normally, the server should call your client back using an NLM_GRANTED
call as soon as the lock is available. If that isn't happening, then you
need to look at why not. The retransmission+timeout is supposed to be a
failsafe for when the NLM_GRANTED mechanism fails, not the main method
for grabbing a lock.

For instance, it may be that the server is unable to call the client
back because you've hidden it behind a firewall or NAT, or perhaps your
netfilter settings on either the client or the server are blocking the
callback.

Cheers
  Trond

-- 
Trond Myklebust
NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com

  parent reply	other threads:[~2008-03-11 23:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-11 12:14 [PATCH 0/3] NLM: Proposal for a timeout setting on blocking locks Mikael Davranche
2008-03-11 12:15 ` [PATCH 1/3] " Mikael Davranche
2008-03-11 12:16 ` [PATCH 2/3] " Mikael Davranche
2008-03-11 12:18 ` [PATCH 3/3] " Mikael Davranche
2008-03-11 23:25 ` Trond Myklebust [this message]
2008-03-12 11:26   ` [PATCH 0/3] " Mikael Davranche
2008-03-12 13:33     ` Trond Myklebust
2008-03-12 15:51       ` Mikael Davranche

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=1205277943.16687.14.camel@heimdal.trondhjem.org \
    --to=trond.myklebust@netapp.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mikael.davranche@free.fr \
    /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).