From patchwork Mon Jan 27 17:25:55 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Adamson X-Patchwork-Id: 3543331 Return-Path: X-Original-To: patchwork-linux-nfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1208D9F382 for ; Mon, 27 Jan 2014 17:26:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0672720108 for ; Mon, 27 Jan 2014 17:26:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 95AB9200F2 for ; Mon, 27 Jan 2014 17:26:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753516AbaA0R0G (ORCPT ); Mon, 27 Jan 2014 12:26:06 -0500 Received: from mx11.netapp.com ([216.240.18.76]:51652 "EHLO mx11.netapp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753480AbaA0R0G (ORCPT ); Mon, 27 Jan 2014 12:26:06 -0500 X-IronPort-AV: E=Sophos;i="4.95,730,1384329600"; d="scan'208";a="98378060" Received: from vmwexceht03-prd.hq.netapp.com ([10.106.76.241]) by mx11-out.netapp.com with ESMTP; 27 Jan 2014 09:26:01 -0800 Received: from smtp1.corp.netapp.com (10.57.156.124) by VMWEXCEHT03-PRD.hq.netapp.com (10.106.76.241) with Microsoft SMTP Server id 14.3.123.3; Mon, 27 Jan 2014 09:26:00 -0800 Received: from fc19-2.androsad.fake (vpn2ntap-40052.vpn.netapp.com [10.55.66.60]) by smtp1.corp.netapp.com (8.13.1/8.13.1/NTAP-1.6) with ESMTP id s0RHPxVI004929; Mon, 27 Jan 2014 09:25:59 -0800 (PST) From: To: CC: , Andy Adamson Subject: [PATCH 1/1] NFSv4.1 Do not preallocate session slots in nfs4_end_drain_slot_tbl Date: Mon, 27 Jan 2014 12:25:55 -0500 Message-ID: <1390843555-3498-1-git-send-email-andros@netapp.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-7.4 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 From: Andy Adamson Pre-allocating session slots for RPC tasks waking up from a wait queue provides a shorter slot allocation code path and can help performance. Durring multiple server reboots (interface moves), the pre-allocated slot can be held and not freed as a task is transferred to various slot table wait queues and the state manager is draining these queues. Not freeing the slots results in a state manager hang waiting for completion on the slot table draining. In this case, performance is not a consideration as the client is in recovery of a session or a clientid. Prevent this state manager hang by not pre-allocating session slots, but just wake up the tasks and let them grab a sessions slot in the nfs4_alloc_slot call in nfs41-setup_sequence. Signed-off-by: Andy Adamson --- fs/nfs/nfs4state.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index e5be725..6ddd96e 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -219,7 +219,7 @@ static void nfs4_end_drain_slot_table(struct nfs4_slot_table *tbl) { if (test_and_clear_bit(NFS4_SLOT_TBL_DRAINING, &tbl->slot_tbl_state)) { spin_lock(&tbl->slot_tbl_lock); - nfs41_wake_slot_table(tbl); + rpc_wake_up(&tbl->slot_tbl_waitq); spin_unlock(&tbl->slot_tbl_lock); } }