Received: by 2002:a05:6a10:eb17:0:0:0:0 with SMTP id hx23csp3841243pxb; Tue, 7 Sep 2021 08:40:24 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzJdFwTXHnPWFxZlisAbZzx+8gjYc6PsHZW7Ouu6Z+oEeyD7AJ+MOtX7we06//7vOHw+jOY X-Received: by 2002:a92:cda9:: with SMTP id g9mr12017251ild.18.1631029224798; Tue, 07 Sep 2021 08:40:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631029224; cv=none; d=google.com; s=arc-20160816; b=ThACyhVZXdLKkYvRLVB4O5SOhPUgVlIuGJp5yKwpf4FT0WDbZ+eaUlDC7ZGvkgYI5D kznsdAUnViBA6TMZ6khwEqbDkQFRi2nfTq4kUB2NEdMK6BMA5pzgN9O3ZaVkKosWyewp WeWNI8c6cPcL6vn30OPE/cIzMUDwBMnpSUPc09m43fBYrnzMKgoMCXTtPQIYdJO4f9y7 9uaaVmaErLqb/xftPmP1qkshWw2IjVq/n/S75zWMuYtbm/fUMi3LN7C72FmiCROEUDge 1cXcx3oG6Q0NpHF234CAEmEJOtKqlYfgpMV1GLthcm3G/FrnhzZjt3vbqByGrcTpa8Vj /xMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature:dkim-filter; bh=Yy3QiJ+Wm8mNfpY+zv7WrsYIFygYyJ5xoCrJBQYX/Gc=; b=rIVSfKq+aJlY5+OEgSFua3BuH38ZslL7rsJG2at/z6ONOR2MkxfJRqh8GCdScEYgOW 84P52d6lg9i3lVUNFWVbiSB8WhstmsHK3AjlMvSUgAb3pvPRi2VNcvnQTz9tH3TNjhQ+ NwBWc+OdAeqxnS/J2SAOLqnm/mxGLjh6Ytz66VIuDz9xgTObVJK9ZmjKfTYZMO16L9Ee 6nYixTJ5YIy/A+uNNoFW4nMIgwUj+7dMRvuigSDxvuhYt7KQMQF1GE/nss2Q3jAN1VBW Awt09K1EMiJLif57iJK6cJR5INoR69X2xykXH6HtADgTL3NNpg+LzljtzwtvQnh3XLnf a53g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@fieldses.org header.s=default header.b=JPLQlCPr; 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 h33si9538520jav.17.2021.09.07.08.39.58; Tue, 07 Sep 2021 08:40: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; dkim=pass header.i=@fieldses.org header.s=default header.b=JPLQlCPr; 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 S232112AbhIGPkw (ORCPT + 99 others); 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.