From patchwork Tue Apr 28 20:21:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 6292051 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 4BDF09F373 for ; Tue, 28 Apr 2015 20:22:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7582E202B4 for ; Tue, 28 Apr 2015 20:22:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 67D272028D for ; Tue, 28 Apr 2015 20:21:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965951AbbD1UV6 (ORCPT ); Tue, 28 Apr 2015 16:21:58 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:51452 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965258AbbD1UV5 (ORCPT ); Tue, 28 Apr 2015 16:21:57 -0400 Received: from hch by bombadil.infradead.org with local (Exim 4.80.1 #2 (Red Hat Linux)) id 1YnC0z-0007ed-0p; Tue, 28 Apr 2015 20:21:57 +0000 Date: Tue, 28 Apr 2015 13:21:57 -0700 From: Christoph Hellwig To: Trond Myklebust Cc: linux-nfs@vger.kernel.org Subject: [PATCH, RFC] backchannel overflows Message-ID: <20150428202157.GA23972@infradead.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Currently the client will just crap out if a CB_NULL comes in at the same time as a slot controlled CB_COMPOUND that includes a CB_SEQUENCE. I don't really understand how the spec wants to treat CB_NULL in relation to the available backchannel slots, but given that it's not part of the sequences in CB_SEQUENCE it somehow nees to bypass them. If we make sure to overallocate the rpc-level buffers so that we have more than the available NFS-level slots we should be safe from this condition which makes a 4.1 server doing heavy recalls under load very unhapy by not returning an NFS level reply to its layout recalls. I dont really like this patch much, so any idea for a better solution would be highly welcome! --- 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/callback.h b/fs/nfs/callback.h index 84326e9..7afb3ef 100644 --- a/fs/nfs/callback.h +++ b/fs/nfs/callback.h @@ -205,7 +205,7 @@ extern int nfs4_set_callback_sessionid(struct nfs_client *clp); * so we limit their concurrency to 1 by setting up the maximum number * of slots for the backchannel. */ -#define NFS41_BC_MIN_CALLBACKS 1 +#define NFS41_BC_MIN_CALLBACKS 2 #define NFS41_BC_MAX_CALLBACKS 1 extern unsigned int nfs_callback_set_tcpport;