From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-11.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 93938C388F9 for ; Fri, 23 Oct 2020 09:44:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 307C02225F for ; Fri, 23 Oct 2020 09:44:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S461643AbgJWJon (ORCPT ); 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