Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp2387604pxp; Mon, 21 Mar 2022 18:48:34 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwh7oxirRBYpwcEefwazZdkufiFFNQAQiD4S3exewE7miGIq4bsCQiwJMX8nvShiu+xFu6g X-Received: by 2002:a17:902:ea0b:b0:154:7f33:d558 with SMTP id s11-20020a170902ea0b00b001547f33d558mr1958658plg.1.1647913714439; Mon, 21 Mar 2022 18:48:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647913714; cv=none; d=google.com; s=arc-20160816; b=pDIztePr42UqcPx21xwm7bQXNTd/10qWK3SLr7QAwVohxCFptH6HrBYspJPiVs+9zH Slr6JJn4aUuJOvM+4AgNUG4CMlBPmHD0LhlTVHPzKng9YfwXa7VxmZFtZgcCNdLpGa96 HIpEe6le41m2E1nz8gQ0W6ioTYNEoh0JkK0QJESGEwgkHkRdjuznwnRtAcMBShPusOnX vUrAODwehANyQI9Lyqzj0aMlxeErC56o64gV32Qt7CCv863pocFbp3KD8FJozAd0B7a2 nfTB2iepYbvGPKZGM+4VCT+ED2sAiz7pecUp37K5pvXSD8D4wTjcn4GVkzc5XUbuH5TR ck/A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=qzgjqoWmh+t9gxVvdBXqEwjxuQoNm4Pyql/QdGIY56w=; b=oXzxLcQep4kMwik3CLhEe3vdK/iZebRzOmd4C/xaPtBKN0lXCiTc0YylDDnNNNLYYa OYMXUCyCOR3BlEQ5LsgSYSH22yhFZ4F3ySSqi6lwSb01HrUDcLTW+XfaG21DCRyXwE4X /Z8GsUYM+Eujj7gVOPDLgJpeHQybwTQj7iEY1kCJMtD1+qyCHhSBON4Xt6G3+yEFgQZx WUDGmtQQopJ9HgLa2QtUlxLqmPNAAz9IvnFchbvq0Hqy9+6rfDm+s1Z1r1iJut6CDOJS BSXc4qh5giHBtrrSUkPA9I33jdnauyAorRj3IUM+ZyQslhZnHu90xK9T8/ewuKqvvhT4 n0SA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GoHGwPMK; spf=softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id g1-20020a63dd41000000b003816043efcfsi14510220pgj.452.2022.03.21.18.48.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Mar 2022 18:48:34 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=GoHGwPMK; spf=softfail (google.com: domain of transitioning linux-nfs-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-nfs-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id DAE681DA77; Mon, 21 Mar 2022 18:22:30 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234628AbiCVBXz (ORCPT + 99 others); Mon, 21 Mar 2022 21:23:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234621AbiCVBXy (ORCPT ); Mon, 21 Mar 2022 21:23:54 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8A2B1DA77 for ; Mon, 21 Mar 2022 18:22:27 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 5A686B81AFD for ; Tue, 22 Mar 2022 01:22:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AE3ACC340E8; Tue, 22 Mar 2022 01:22:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1647912145; bh=uMjNaDhQikir6YSCGCjDm3nJKvfqJTQRvB1VWIwdQC4=; h=From:To:Cc:Subject:Date:From; b=GoHGwPMKwIlZEGVzGo9qKWAs2u0S5BSusM6zyVwNb5stPcU81t8msF3kOOBiViVEm S+OOllUR01CdD8wsUsZObcHQSWV0e9LnlQgSrWXxr2rMbGdhGdomxkzx6z0elNZjZu OCAQjAwb6cPQpPZxRkKnxiTbyIFPIcsQNnetVK48WLKCciTmbgJpMcWj/o/L5tP30X QsxZ23DzVtd6kztZ4hhziJgyMFUX+1ExsPGGDyH9F5b90RhcB4kzpgOALPHZQcRSnD J5crxIvrUUxS0+6mVx4aTw5zGtuC8aV4xzgP9TSScDYQupGVdNXz6TxQDbMD91uZSz LjN7au7Racb8A== From: trondmy@kernel.org To: linux-nfs@vger.kernel.org Cc: Neil Brown Subject: [PATCH v2 0/9] Crossing our fingers is not a strategy Date: Mon, 21 Mar 2022 21:16:09 -0400 Message-Id: <20220322011618.1052288-1-trondmy@kernel.org> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org From: Trond Myklebust We'd like to avoid GFP_NOWAIT whenever possible, because it has no fall- back reclaim strategy for dealing with a failure of the initial allocation. At the same time, memory pools appear to be suboptimal as an allocation strategy when used with anything other than GFP_NOWAIT, since they cause threads to hang upon failure. This patch series therefore aims to demote the mempools to being a strategy of last resort, with the primary allocation strategy being to use the underlying slabs. While we're at it, we want to ensure that rpciod, xprtiod and nfsiod all use the same allocation strategy, so that the latter two don't thwart our ability to complete writeback RPC calls by getting blocked in the mm layer. Trond Myklebust (9): NFS: Fix memory allocation in rpc_malloc() NFS: Fix memory allocation in rpc_alloc_task() SUNRPC: Fix unx_lookup_cred() allocation SUNRPC: Make the rpciod and xprtiod slab allocation modes consistent NFS: nfsiod should not block forever in mempool_alloc() NFS: Avoid writeback threads getting stuck in mempool_alloc() NFSv4/pnfs: Ensure pNFS allocation modes are consistent with nfsiod pNFS/flexfiles: Ensure pNFS allocation modes are consistent with nfsiod pNFS/files: Ensure pNFS allocation modes are consistent with nfsiod fs/nfs/filelayout/filelayout.c | 2 +- fs/nfs/flexfilelayout/flexfilelayout.c | 50 +++++++++++--------------- fs/nfs/internal.h | 7 ++++ fs/nfs/nfs42proc.c | 2 +- fs/nfs/pagelist.c | 10 +++--- fs/nfs/pnfs.c | 39 +++++++++----------- fs/nfs/pnfs_nfs.c | 8 +++-- fs/nfs/write.c | 34 +++++++++--------- include/linux/nfs_fs.h | 2 +- include/linux/sunrpc/sched.h | 1 + net/sunrpc/auth_unix.c | 18 +++++----- net/sunrpc/backchannel_rqst.c | 8 ++--- net/sunrpc/rpcb_clnt.c | 4 +-- net/sunrpc/sched.c | 31 ++++++++++------ net/sunrpc/socklib.c | 3 +- net/sunrpc/xprt.c | 5 +-- net/sunrpc/xprtsock.c | 11 +++--- 17 files changed, 123 insertions(+), 112 deletions(-) -- 2.35.1