Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1168815ybi; Sun, 30 Jun 2019 08:58:03 -0700 (PDT) X-Google-Smtp-Source: APXvYqwOfV0LJWfTZNtGGVYwowvD4No2FjnM32e9KS33RmX+WIVpB3jZz+cCLobSHhHT5sDrCzw0 X-Received: by 2002:a65:530c:: with SMTP id m12mr19957044pgq.363.1561910283137; Sun, 30 Jun 2019 08:58:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561910283; cv=none; d=google.com; s=arc-20160816; b=FeZAYFwMJcK9pPIogZVlfgsIoq/jNtD6sfm9mn8TxcsbKSCg83Xmy7/pAWYeElt7XX GclFZqz4e3yld9TXak+uA+TFLWP18MZArZ/0wKctS68HjXt/JuKFmZ0uZlpmKZt2vCZO A1Z+D+lSOmpVMh0hHMInKymoXKvy7yuBobDkKikq3LqcJwkwINzCJQSJaiEmH3W74IIz Wpm7lNNk2KUgnRojL/tRFSfMXkT9SJ0VPYGZEbPpkFH07XKJPvDZIEmvPHpkUXvMv1S3 mqHaMPA1RJJJ2KYCnMmSVeMQj7FXGJ+EcflvGU+DDjo5ODxMRrXApCxjL2OwaNQQQp2F pkvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=f4I9bdxhuM8BTi0gPCX7v6Yy+8KEHx95K6cAIKvQPAM=; b=Ua/Z9XuyvSTZC4OceKcO9Vzfi3q8lgP8Ay0j07+bWHWbRqlYK0jqWRRNa3xtiqOn0x JVLshnaJgEQkM8Iuc1W6oEGziUSuhg6yUb40XsQz7PAtLiktTnxBmZAagwW8NsE3C1mg HfJTsaJ0g0x9+jBLsISicZLfWygMCwVDxqWXX28zSbnLp2Gymrt359sxdV6Y34QcohtX s6a862f8QZMd3Ah1MC2UkFH5q/udwIPMQZmxpkgwAkHzG0Gc+/kD6RNbMaPEhepmZA8g cjPOjwmTQyoBCligpYKkcxml6GZjKQO9c86ap16UTzjG/DMCzOJhMFaab0QXsJYzVM4S tuXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=GHfbfkyq; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a25si8750024pfk.201.2019.06.30.08.57.48; Sun, 30 Jun 2019 08:58:03 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=GHfbfkyq; spf=pass (google.com: best guess record for domain of linux-nfs-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726578AbfF3P5r (ORCPT + 99 others); Sun, 30 Jun 2019 11:57:47 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:46844 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726520AbfF3P5r (ORCPT ); Sun, 30 Jun 2019 11:57:47 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=f4I9bdxhuM8BTi0gPCX7v6Yy+8KEHx95K6cAIKvQPAM=; b=GHfbfkyquQn/yZQgR5eAV71Zt SEXDwz/jpfVbWZGF4kTy9za5fAEMW+xBuUxIELk1nkATn+OeydWl3BUbUD4heYvIW+3qoJWGc0Cwr qqlGKF9xSg9SXGzCIARNnpVNani3Wn9GhUklps713aQ7K2dewrATLXJqnUqZs1ms4KZj7z5dGAiPc d8AU0eU1EnIvboA0my6Aggrqn6yVEXvnH+2/OLgnko1mxXlGOSOU620X8UJcy8l6qaduwxW0NzfQ/ AwyV3KeYrjC2vduF6yEVAtJdwLAsAtaS5dM5suuEU2wcd+bJKeGHUZJk50oGMeDGD8zNSTJa90gUq ySCI6EMfg==; Received: from willy by bombadil.infradead.org with local (Exim 4.92 #3 (Red Hat Linux)) id 1hhcD3-0006gX-VK; Sun, 30 Jun 2019 15:57:45 +0000 Date: Sun, 30 Jun 2019 08:57:45 -0700 From: Matthew Wilcox To: Trond Myklebust Cc: "J. Bruce Fields" , Chuck Lever , Jeff Layton , linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org Subject: Re: [PATCH 05/16] nfsd: add a new struct file caching facility to nfsd Message-ID: <20190630155745.GC15900@bombadil.infradead.org> References: <20190630135240.7490-1-trond.myklebust@hammerspace.com> <20190630135240.7490-2-trond.myklebust@hammerspace.com> <20190630135240.7490-3-trond.myklebust@hammerspace.com> <20190630135240.7490-4-trond.myklebust@hammerspace.com> <20190630135240.7490-5-trond.myklebust@hammerspace.com> <20190630135240.7490-6-trond.myklebust@hammerspace.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190630135240.7490-6-trond.myklebust@hammerspace.com> User-Agent: Mutt/1.11.4 (2019-03-13) Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Sun, Jun 30, 2019 at 09:52:29AM -0400, Trond Myklebust wrote: > +/* FIXME: dynamically size this for the machine somehow? */ > +#define NFSD_FILE_HASH_BITS 12 > +#define NFSD_FILE_HASH_SIZE (1 << NFSD_FILE_HASH_BITS) > +#define NFSD_LAUNDRETTE_DELAY (2 * HZ) Isn't this what rhashtable is for?