Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp360546pxu; Fri, 23 Oct 2020 02:45:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzkXUMnraDHj2RVemUG75zPSuVQoQahMbB7YWBT8FU23t3JgP6aZuqdfDdZJYxOs+fDHKN7 X-Received: by 2002:a17:906:a211:: with SMTP id r17mr922829ejy.0.1603446324343; Fri, 23 Oct 2020 02:45:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603446324; cv=none; d=google.com; s=arc-20160816; b=S67tXZ3upCvk973VEZb8h9wpSD+XhmpiaNL2xDj1D8yTTpsQE/IH5fVlQs5KmmIzXC zQadfLD7EW+M2NmN4/vvT+eCR40tE/fImyyZI5f+enfk62Hy9DbHVEqzj1JQc6t8trZz 0++OKckJ/Su2CgjNWWM5JIgzziw4U/8wZ2AP7O5r3mQaGsTNP7Z/+hYtidK1f+lFXvgG rW02+wpMIDzREgTam4tpz5Hmztj5bhNNHi7XJ4jZFi6tvNrQ+8I2T+sHYcFDLUXeHqQ4 pNm0I6Gh6yMIu+dL2v295uoWYreBiCUljHQ+FzEEox7/AfWXGjoJlqY5I/ymbUN1F8fv lk9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=iXf0+blF/k0FmKxvfUKh1AB45no3W+IRhtRc5Af18No=; b=Ve0FpaQtdb11knQ5k7sd5YkUKHYglm7ZfFrD6CfXo6Vgic3Fle8zzRnHiIBHTmOH9L ulaLntuV4O0VRjZ8BbHdfInuZfm2XNgCOfCi1nQ76gzHME5wLLWcu1ehqiFb3RDrqmhK T/oE73VSe2IkhnffTfDrg/cqsrmv+aR1nlm7oFZJZr0IOxzHpB2ruX2j4KDPTDhNJdQU g1A7xJsR2a7zWMeHWVnUez05H1YzokUuNkRAc+mxxceFkg1HKzK0MF3ctHXvxNaU4FSr WrX4CrWMubd8Wm8WAvSRWR7VKmbf7677hqIdP4fL1EKOUicIGXvK6H3/K4jVHjRyFbkX GRJA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g5si419162edu.574.2020.10.23.02.44.48; Fri, 23 Oct 2020 02:45:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-nfs-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S461643AbgJWJon (ORCPT + 99 others); Fri, 23 Oct 2020 05:44:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41762 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S461642AbgJWJon (ORCPT ); Fri, 23 Oct 2020 05:44:43 -0400 Received: from michel.telenet-ops.be (michel.telenet-ops.be [IPv6:2a02:1800:110:4::f00:18]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF730C0613D2 for ; Fri, 23 Oct 2020 02:44:42 -0700 (PDT) Received: from ramsan ([84.195.186.194]) by michel.telenet-ops.be with bizsmtp id jMke230054C55Sk06MkeWb; Fri, 23 Oct 2020 11:44:38 +0200 Received: from geert (helo=localhost) by ramsan with local-esmtp (Exim 4.90_1) (envelope-from ) id 1kVtck-0007pP-4E; Fri, 23 Oct 2020 11:44:38 +0200 Date: Fri, 23 Oct 2020 11:44:38 +0200 (CEST) From: Geert Uytterhoeven To: "J. Bruce Fields" , Roberto Bergantinos Corpas cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] sunrpc: raise kernel RPC channel buffer size In-Reply-To: <20201019132000.GA32403@fieldses.org> Message-ID: References: <20201019093356.7395-1-rbergant@redhat.com> <20201019132000.GA32403@fieldses.org> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Hi Bruce, Roberto, On Mon, 19 Oct 2020, J. Bruce Fields wrote: > On Mon, Oct 19, 2020 at 11:33:56AM +0200, Roberto Bergantinos Corpas wrote: >> Its possible that using AUTH_SYS and mountd manage-gids option a >> user may hit the 8k RPC channel buffer limit. This have been observed >> on field, causing unanswered RPCs on clients after mountd fails to >> write on channel : >> >> rpc.mountd[11231]: auth_unix_gid: error writing reply >> >> Userland nfs-utils uses a buffer size of 32k (RPC_CHAN_BUF_SIZE), so >> lets match those two. > > Thanks, applying. > > That should allow about 4000 group memberships. If that doesn't do it > then maybe it's time to rethink.... > > --b. > >> >> Signed-off-by: Roberto Bergantinos Corpas >> --- >> net/sunrpc/cache.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c >> index baef5ee43dbb..08df4c599ab3 100644 >> --- a/net/sunrpc/cache.c >> +++ b/net/sunrpc/cache.c >> @@ -908,7 +908,7 @@ static ssize_t cache_do_downcall(char *kaddr, const char __user *buf, >> static ssize_t cache_slow_downcall(const char __user *buf, >> size_t count, struct cache_detail *cd) >> { >> - static char write_buf[8192]; /* protected by queue_io_mutex */ >> + static char write_buf[32768]; /* protected by queue_io_mutex */ >> ssize_t ret = -EINVAL; >> >> if (count >= sizeof(write_buf)) This is now commit 27a1e8a0f79e643d ("sunrpc: raise kernel RPC channel buffer size") upstream, and increases kernel size by 24 KiB, even if RPC is not used. Can this buffer allocated dynamically instead? This code path seems to be a slow path anyway. If it's critical, perhaps this buffer can be allocated on first use? Thanks! Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds