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 A25DAC433FE for ; Tue, 7 Sep 2021 15:39:48 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id EAF3861051 for ; Tue, 7 Sep 2021 15:39:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org EAF3861051 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=fieldses.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=kvack.org Received: by kanga.kvack.org (Postfix) id 2E43C6B0071; Tue, 7 Sep 2021 11:39:47 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 293D06B0072; Tue, 7 Sep 2021 11:39:47 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 15D61900002; Tue, 7 Sep 2021 11:39:47 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0233.hostedemail.com [216.40.44.233]) by kanga.kvack.org (Postfix) with ESMTP id 0217F6B0071 for ; Tue, 7 Sep 2021 11:39:46 -0400 (EDT) Received: from smtpin02.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with ESMTP id A8E51181AEF31 for ; Tue, 7 Sep 2021 15:39:46 +0000 (UTC) X-FDA: 78561187572.02.A914812 Received: from fieldses.org (fieldses.org [173.255.197.46]) by imf06.hostedemail.com (Postfix) with ESMTP id 19CCC801A8A3 for ; Tue, 7 Sep 2021 15:39:45 +0000 (UTC) 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) X-Rspamd-Queue-Id: 19CCC801A8A3 Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=fieldses.org header.s=default header.b=JPLQlCPr; dmarc=none; spf=pass (imf06.hostedemail.com: domain of bfields@fieldses.org designates 173.255.197.46 as permitted sender) smtp.mailfrom=bfields@fieldses.org X-Rspamd-Server: rspam01 X-Stat-Signature: ogqn9febbyobsujsmqmb75fambjmyf4k X-HE-Tag: 1631029185-941713 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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.