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=-7.2 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no 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 0E70CC433F5 for ; Tue, 7 Sep 2021 15:39:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E58F360F5E for ; Tue, 7 Sep 2021 15:39:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232112AbhIGPkw (ORCPT ); Tue, 7 Sep 2021 11:40:52 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59534 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244911AbhIGPkw (ORCPT ); Tue, 7 Sep 2021 11:40:52 -0400 Received: from fieldses.org (fieldses.org [IPv6:2600:3c00:e000:2f7::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DA912C061575 for ; Tue, 7 Sep 2021 08:39:45 -0700 (PDT) Received: by fieldses.org (Postfix, from userid 2815) id A21E41C25; Tue, 7 Sep 2021 11:39:44 -0400 (EDT) DKIM-Filter: OpenDKIM Filter v2.11.0 fieldses.org A21E41C25 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fieldses.org; s=default; t=1631029184; bh=Yy3QiJ+Wm8mNfpY+zv7WrsYIFygYyJ5xoCrJBQYX/Gc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JPLQlCPrgtg7V959ovDSKLDE4hoaPNHkPKJRj5FVfn9hG4mqZgdQ7GVxujcYL8IYD d8C4DEZLkXaS+0867RF68iKyhmPJPA8N3RsYVus1aqwUrPsk0lY0Irvo7tw/q28Sfb kn1fgcZKolDDhcje7o4QQsVigm4mbzo815wUrTws= Date: Tue, 7 Sep 2021 11:39:44 -0400 From: Bruce Fields To: Chuck Lever III Cc: Neil Brown , Matthew Wilcox , Linux NFS Mailing List , Mel Gorman , Linux-MM Subject: Re: [PATCH] SUNRPC: use congestion_wait() in svc_alloc_args() Message-ID: <20210907153944.GA1364@fieldses.org> References: <163090344807.19339.10071205771966144716@noble.neil.brown.name> <848A6498-CFF3-4C66-AE83-959F8221E930@oracle.com> <163096695999.2518.10383290668057550257@noble.neil.brown.name> <163097529362.2518.16697605173806213577@noble.neil.brown.name> <8ED6E493-21A6-46BC-810A-D9DA42996979@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8ED6E493-21A6-46BC-810A-D9DA42996979@oracle.com> User-Agent: Mutt/1.5.21 (2010-09-15) Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org On Tue, Sep 07, 2021 at 02:53:48PM +0000, Chuck Lever III wrote: > > > > On Sep 6, 2021, at 8:41 PM, NeilBrown wrote: > > > > When does a single-page GFP_KERNEL allocation fail? Ever? > > > > I know that if I add __GFP_NOFAIL then it won't fail and that is > > preferred to looping. > > I know that if I add __GFP_RETRY_MAILFAIL (or others) then it might > > fail. > > But that is the semantics for a plain GFP_KERNEL ?? > > > > I recall a suggestion one that it would only fail if the process was > > being killed by the oom killer. That seems reasonable and would suggest > > that retrying is really bad. Is that true? > > > > For svc_alloc_args(), it might be better to fail and have the calling > > server thread exit. This would need to be combined with dynamic > > thread-count management so that when a request arrived, a new thread > > might be started. > > I don't immediately see a benefit to killing server threads > during periods of memory exhaustion, but sometimes I lack > imagination. Give up parallelism in return for at least hope of forward progress? (Which should be possible as long as there's at least one server thread.) --b.