From patchwork Tue Jul 21 15:51:44 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "J. Bruce Fields" X-Patchwork-Id: 6837011 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EA804C05AC for ; Tue, 21 Jul 2015 15:51:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1B82620544 for ; Tue, 21 Jul 2015 15:51:48 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DDFC72053E for ; Tue, 21 Jul 2015 15:51:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754936AbbGUPvp (ORCPT ); Tue, 21 Jul 2015 11:51:45 -0400 Received: from fieldses.org ([173.255.197.46]:38567 "EHLO fieldses.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754146AbbGUPvp (ORCPT ); Tue, 21 Jul 2015 11:51:45 -0400 Received: by fieldses.org (Postfix, from userid 2815) id BB1932831; Tue, 21 Jul 2015 11:51:44 -0400 (EDT) Date: Tue, 21 Jul 2015 11:51:44 -0400 From: "J. Bruce Fields" To: Frank Steiner Cc: linux-nfs@vger.kernel.org Subject: Re: Parallel file locking quite slow with vers=4.0 compared to vers=3 Message-ID: <20150721155144.GC11050@fieldses.org> References: <55ACFF59.7040707@bio.ifi.lmu.de> <20150720212305.GB11050@fieldses.org> <55ADEA5C.8020607@bio.ifi.lmu.de> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <55ADEA5C.8020607@bio.ifi.lmu.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Jul 21, 2015 at 08:44:44AM +0200, Frank Steiner wrote: > J. Bruce Fields wrote > > > One way to confirm that might be to run client kernels modified to make > > the polling behavior (controlled by > > fs/nfs/nfs4proc.c:nfs4_set_lock_task_retry()) more aggressive, and see > > if that removes the delays in your case. > > > > If that works, then it might also be worth considering implementing > > CB_NOTIFY_LOCK: > > > > https://tools.ietf.org/html/rfc5661#page-593 > > I wouldn't mind to test any kind of patch if someone would find the time > to provide some. Writing them myself is beyond my skills I'm afraid :-) Well, I was just thinking of something like this. (*Not* saying this is what we really want to do, but it might help confirm where your delay is coming from.) --b. --- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 6f228b5..c119ba7 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c @@ -5367,7 +5367,7 @@ int nfs4_proc_delegreturn(struct inode *inode, struct rpc_cred *cred, const nfs4 return err; } -#define NFS4_LOCK_MINTIMEOUT (1 * HZ) +#define NFS4_LOCK_MINTIMEOUT (1 * HZ / 10) #define NFS4_LOCK_MAXTIMEOUT (30 * HZ) /*