Received: by 2002:a05:6500:1b41:b0:1fb:d597:ff75 with SMTP id cz1csp373463lqb; Tue, 4 Jun 2024 14:08:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCU6y0awOz4tJWUxoxNmfVlefrZG9iMlGxpiwiknyuwmSIeaFwpj1JpkYnx61hnh/WAfScEPo85DzHnhMlRW5wWWEmKql4S5ntDHfyq1eA== X-Google-Smtp-Source: AGHT+IFxbTDKoZA2FPMmxAX76CosRwyKRsC0Lte72q/eJc9lhzPzvW8LoyJi8EZ6brrdQ51itMQU X-Received: by 2002:a17:903:32c9:b0:1f6:62b0:8f8d with SMTP id d9443c01a7336-1f6936b76ecmr60906055ad.5.1717535297146; Tue, 04 Jun 2024 14:08:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717535297; cv=pass; d=google.com; s=arc-20160816; b=b+2iWR0MfqA9IXwUOWMHb9B9Vr3f9g1yUw08Sspb6VQ0LTXjPCADRObLPtBhkEZHMm S8zQfJ5WSMcookCLKHhTPU2/8EpWgf6fBvIfP2r/6VdLz14vqOVQf0OXueX/c8mzG8Y/ 692Q29C2aRkSLmVuvsUSxNBVYZfi6QEMnBSEaTQGVy3WFZm7EttwSiOs3BAsTiFBlAz2 D8nLUQFjCttBPiGrMd1w18jYQLR80xjPGrh1jSlHKj+vAoFy+QgwHkGoKmEqK5baDYcm 0CNCXxi26vHU4PW8Cv/WlmAMR3FCSUuQMFkz8a4pLKzFT5C+/ypVb2yJE+FhyVNJP9wZ DgPw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:from :dkim-signature; bh=OWsAEOHTXNI0+d2V6akkDVw5yPf1Ftev4vWKqDVawPQ=; fh=vIhzdmiPOEM1c8uzJAq2BSBhXw58o6Y96fK0ufmUCxg=; b=kvd24BXef7tz/rK84YWL2g52SS+/hFbebbqe7nSpCMs0p9BYGFvbkPBUnyvixdgE+H MhOAGw34aXFQjuaW8+R2JBIaVwdKW2ZflcwUL5IkO7UBMgPOnjcuwPfcyajbACOHxNYQ V9LKQiPXt+w5VsbaCqt0GX3TtV60xB/2+4D1YPZLdHmxt861zyxTRAOQBM6oItCwCE9r Lf0I9HFk4iChhmbY50eWUBLwAI4L7yY9vLrwuENEkJirjtSgrGoqb+ILeethLGUZFQho Jxe142VDNX+26Z27RdNc+jIFZ+vqmFJIVjIguCHivrJXRC0TDsm2NKDzwEsX+OBtPIdk grIw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gei8Uz0w; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-3551-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3551-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6c359e09748si8672347a12.279.2024.06.04.14.08.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 Jun 2024 14:08:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-nfs+bounces-3551-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=gei8Uz0w; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-nfs+bounces-3551-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-nfs+bounces-3551-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 29C4F2852DC for ; Tue, 4 Jun 2024 21:08:16 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id F08FA142905; Tue, 4 Jun 2024 21:08:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="gei8Uz0w" X-Original-To: linux-nfs@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C1F0712D215; Tue, 4 Jun 2024 21:08:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717535292; cv=none; b=P4hqaHYMIPkU54A5/epUvljyBKG4OEDCoQtjpY0lH581cluwNzbcUfugmKJdwJor/97inX26meDMPf07p8ZB1DnkQMa1Isx/RWRQeNJRiYe8YPxCwUvlfeqhizB/8MtDu5keiQnq5SfLRGMSHYYWtOHGHcWC8Dy7ITf15/H4gAc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717535292; c=relaxed/simple; bh=1FN2QRadM5mT3+earethOmd6uU3BHoCh2blqMdZ4Qxw=; h=From:Subject:Date:Message-Id:MIME-Version:Content-Type:To:Cc; b=B8Hb0Gff8lSKG1r6S5ZJCc08QFsvIK9JbxE2PpNOHI8CkPXqot49ELpVrKZfKK/VT85FfcPI14neqOsWLohw4ExDAbI8K8/CP8J4El3aYFHcxaZNb3Wp8SVQ47zE9fkwaYdF+Y0mqbnfJOVLTqV1yyuHTs7CcjSmcUBOyutIfbQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=gei8Uz0w; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id E90F2C2BBFC; Tue, 4 Jun 2024 21:08:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717535292; bh=1FN2QRadM5mT3+earethOmd6uU3BHoCh2blqMdZ4Qxw=; h=From:Subject:Date:To:Cc:From; b=gei8Uz0wkgNfnGOYuBMY8G9c5of3Yla5SL/lbbGTO7+2NYsONCxbZsGQZFJb6Isft WD+MO/8Ur9i+CQoMX5KZjXCiYfA87Qfprl1y8t4Vrd/1HNfZXa9BrIEGVg4J48RmPw 4ddBUu8Xc6my3Jo9dgLvqJvG0ePXv2hkw81jcVgb7YHBs24XorPa9q+TNqnUCQxQVz WUnD5KmZae92kw+kQMv/gnJLi3KMWCcz/EB0VYrAcvHbnM30O6siz2zAt9KIXTskOh 3Hm9QlvSIUqmvz59D8jzXQDa3dgkzndvG1vmbY0L5nS4b9Ma0Dv+4Hag9USQRxCSuZ /iZS+KS2ryHSg== From: Jeff Layton Subject: [PATCH 0/3] nfsd/sunrpc: allow starting/stopping pooled NFS server via netlink Date: Tue, 04 Jun 2024 17:07:53 -0400 Message-Id: <20240604-nfsd-next-v1-0-8df686ae61de@kernel.org> Precedence: bulk X-Mailing-List: linux-nfs@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIACqCX2YC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxMDMwMT3by04hTdvNSKEt0kA5NkgxSjFAvLREsloPqCotS0zAqwWdGxtbU ADSPhKFsAAAA= To: Chuck Lever , Neil Brown , Olga Kornievskaia , Dai Ngo , Tom Talpey , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Trond Myklebust , Anna Schumaker , linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Jeff Layton X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=1437; i=jlayton@kernel.org; h=from:subject:message-id; bh=1FN2QRadM5mT3+earethOmd6uU3BHoCh2blqMdZ4Qxw=; b=owEBbQKS/ZANAwAIAQAOaEEZVoIVAcsmYgBmX4I6Mg6kDJgTvgCa215s6PzG4olxHCy87aFKg fjWrwCWjkSJAjMEAAEIAB0WIQRLwNeyRHGyoYTq9dMADmhBGVaCFQUCZl+COgAKCRAADmhBGVaC FcbqEACzLJWevA7cs6b7KiusGWyXVUOcwplB5Do/rty7ZZZU+PaCgRzTjW/D79KEcRGLUW+w56t ZrrIGdIC1Adp+4dIK/VjjAWo1XYLlWIhtSvRSwkMKxR0jnjvmlzaXYwTXfc/kzkgMoplD/VB8hO kTErr92/jCGKw3f1aJDTTk4Nx2aG4RTgTbPy5XSfsRQSV8G79XBWGPvx63QdE1qNXAEJu3WiJoq MZDxbIIBUPVbeE7zNv8sgDrkgka7YtmWRnB2oUjH5bJYNhSTBRBDlXHk+48tH5fLD/Tn+Nznebt 7do3+L+ZSBgLgwo8yiAHhmgPKM8ICTt+dQ9IeLSb3CryidMPpiiw8hnQqsam3QlpozL4mRW2zPv +hI2y1zdUaerjKVl1LDOgILsLlNOo2vjm6YzxpBsxAitNtjvx6asN47FMk6ydJuA767WR+++2Wu DGqPAk7t6rF6kuoI/fFOZI0lYiCYANcac2esQfgzQMefNz8mRO50NhsiyMA1sgn7XM8GD841VJi +XAP3iYXIfUo4zCByJb24Wsa5gfXibImwr9w+TxGSPHSqhtLeSDQrjRtFOT8qjQzFGOt8S4/Sfm qV/5+DSE/SXvyyrOWuZCJ++84PMqNwsp7LFEgxHhldcga+VHcv74zEvzV6tEXmr76vhRXn1ZW5Y lTwvNaMwvfy2fXw== X-Developer-Key: i=jlayton@kernel.org; a=openpgp; fpr=4BC0D7B24471B2A184EAF5D3000E684119568215 This patchset first attempts to detangle the pooled/non-pooled service handling in the sunrpc layer, unifies the codepaths that start the pooled vs. non-pooled nfsd, and then wires up the new netlink threads interface to allow you to start a pooled server by specifying an array of thread counts. FWIW, eventually I'd like to wire up the pool_mode setting to netlink as well. I took a stab at adding a pool_mode parameter to the set_threads interface, but I think that's the wrong approach. By the time we call set_threads, we've usually already allocated the serv. I think pool_mode setting has to be done with new netlink call. I'll probably tackle that in a later patchset. Signed-off-by: Jeff Layton --- Jeff Layton (3): sunrpc: fix up the special handling of sv_nrpools == 1 nfsd: make nfsd_svc call nfsd_set_nrthreads nfsd: allow passing in array of thread counts via netlink fs/nfsd/nfsctl.c | 45 ++++++++++++++++++++++++++++++++------------- fs/nfsd/nfsd.h | 3 ++- fs/nfsd/nfssvc.c | 30 +++++++++++++----------------- include/linux/sunrpc/svc.h | 1 + net/sunrpc/svc.c | 26 +++++++------------------- 5 files changed, 55 insertions(+), 50 deletions(-) --- base-commit: fec4124bac55ad92c47585fe537e646fe108b8fa change-id: 20240604-nfsd-next-b04c0d2d89a9 Best regards, -- Jeff Layton