Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3527825pxb; Mon, 24 Jan 2022 11:27:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJydQz1kXNIZxbLySDNyYcWHTg1JJzTJIBoZwX3YcxG5vx+ZIyWVhD6+wU3deOJM2RkwHj10 X-Received: by 2002:a17:902:f693:b0:14b:5f5f:312b with SMTP id l19-20020a170902f69300b0014b5f5f312bmr3582974plg.48.1643052448644; Mon, 24 Jan 2022 11:27:28 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1643052448; cv=pass; d=google.com; s=arc-20160816; b=Lc0kJOrc5t/u5lIlCXUuY2p1t45+4HO1ULGXiWTHkgLEujtgqGT2CjY2CC6ufz1PbN lq4Pi/rJkiNVDSOFLlhP80qMP46Ng7ee15LD91Uo19JJAJAmoE2LnP1PcnKXaxsxF9ja 1MFcGNIq38G4qskZSntNT5N218yIrNim8CAAoiYDqLNhmCNzKu5RvEL0etXvJXz3QPbo /ZQFlgHQuSWR0q6vrFWX0fqmyKQytBjrcdkfFPEjyvauoHKrJzYt+1XL1dFp5L2LczxM /clzfPx7kmPzbQRDBZ0dARvirnoaagK8pM1U2erw2q/28mGe4epSz9Zhx6d3BUlgmaus 0jsA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-id:content-language:accept-language:message-id:date :thread-index:thread-topic:subject:cc:to:from:dkim-signature :dkim-signature; bh=9YMhRkWHICXwMHRMUwFomGSwv2KBy2U/n1Mtvm3kJs4=; b=ch9lnO6R6v+IdHj9v4COYON1g6KILPEGCqgME3PCFYgtv/WluFbHK3JstdPpp2TRYI c7R6oGjOXfLVzC+8SVNpsI0bEC9gcnmh78nJ5+B8Z80ofRBhkQdX9FZEvvSzqIBsX7Rb c/WM4xyFl1hA564/UPPZcdhFni/wNXyQpc0WmolDUeRaTDLaMlih8SD4d99nB1tyIJWR wkXXuh6L2YSoEfnCX29BxpMEJdf0VVGITb0g0yqftWkFx2CTnwtaELcTJKXmwUjyz0e8 8BLF7upSW3TVMB5PuZ/TRpbacTzRb9D0GBAigsI5LZoWruaJo9uZy6WOezZ9VRT6Ulek Lp0w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@oracle.com header.s=corp-2021-07-09 header.b=EbL2S3Hp; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=E9P35qu1; arc=pass (i=1); 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o5si12696341pgu.13.2022.01.24.11.27.10; Mon, 24 Jan 2022 11:27:28 -0800 (PST) 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=@oracle.com header.s=corp-2021-07-09 header.b=EbL2S3Hp; dkim=pass header.i=@oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=E9P35qu1; arc=pass (i=1); 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=oracle.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238834AbiAXPRt (ORCPT + 99 others); Mon, 24 Jan 2022 10:17:49 -0500 Received: from mx0b-00069f02.pphosted.com ([205.220.177.32]:25114 "EHLO mx0b-00069f02.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238469AbiAXPRt (ORCPT ); Mon, 24 Jan 2022 10:17:49 -0500 Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.16.1.2/8.16.1.2) with SMTP id 20OD0xkX022864; Mon, 24 Jan 2022 15:17:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : content-type : content-id : content-transfer-encoding : mime-version; s=corp-2021-07-09; bh=9YMhRkWHICXwMHRMUwFomGSwv2KBy2U/n1Mtvm3kJs4=; b=EbL2S3Hpqb7IKEPre4r7uWBAkI5MMKFp6HXLZQrbhR5NX6AeTg668/kvrUBUY1Gvubou CM5QHJgv4iYQOxXznosDmpaHGnNn4M2OQ6bhFqMUNRg7npPjRAnRVrrYTIK62UAD2QZq 1eqIN7SwTHClVwofot+U8sJd+V/qsBQqvBz9yqTyWYAUIZKasYqJTWRGNdbfRTaJwJku GMPkzsTlNV+kp2tkIOzCHRBgK51mq24LEIypkL18hYBKT72lusvBJNlFqHLsqT6cM2qz 1leLqTkQnfc+vGuIXa5Ot/K9KUuFNf1bTYeaXkV4K581MTwnuqauRnWAorMLLiIDdRNG PA== Received: from aserp3020.oracle.com (aserp3020.oracle.com [141.146.126.70]) by mx0b-00069f02.pphosted.com with ESMTP id 3dsvmj8brt-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 24 Jan 2022 15:17:46 +0000 Received: from pps.filterd (aserp3020.oracle.com [127.0.0.1]) by aserp3020.oracle.com (8.16.1.2/8.16.1.2) with SMTP id 20OFAiw6096059; Mon, 24 Jan 2022 15:17:45 GMT Received: from nam10-dm6-obe.outbound.protection.outlook.com (mail-dm6nam10lp2102.outbound.protection.outlook.com [104.47.58.102]) by aserp3020.oracle.com with ESMTP id 3dr9r45ufb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 24 Jan 2022 15:17:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JzffHRTa9n+pFCgitEsavJRzAyCE0If8mCxN3ZqArSxYOui4L7tByX0+n6NReA4WZYrYuLM6DGQ8NenWfd81bK4bZ4TSIivVn3eFJ6F7/cWxpPvL8ZFmPRwwsszoNnT4i4DNkFEVgzlM1KBoPqb3nMeplNzN1wWBbHwRLH3UxvztRZ/kPAZ0O/MUkKAvPmiRo43JROFKkEV9SfTfnWtNQWF3AWHKhASSfGkyvN09IgaIXwN4uISaiFrzROFrbNyL8T5JS4iVxQRWHs3gIKJIX+bkil86IIwr7xrttMPRK7lU8QXtQnepAx9lrALBQyFVxl1/dAS7oaZSK/2mVDIkeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=9YMhRkWHICXwMHRMUwFomGSwv2KBy2U/n1Mtvm3kJs4=; b=fUWq7tLtLqwZM8dl1pefNJ63F3+NmrUghbSUinvAlAaBbRpMeYFlFlI1ZSD5bPJHTjAlSBL0aMwJq4TrVXnbC2dMk25yx/WPuv109YWN/5wG3z4HIuuVGaE6rYLny/Jhqp968p7HGDRySXCpBs4JDfI1ZEUQtuTpAkDGvEMBCbuXYIcwgP1Vjmop0gw/FM119jh3MrTjIVuCAvfp4wgHC9Eo242LTQPTB/s3W7Cy2psFQ2sHtSgJlSqpDoN1ZqRg30GbQfY/9Qjb6XmL8nbNgLt8SUTTpPbsCDYX4c+vOsDGita/I5/2cmpnA2aQmYa6XQ9c4r1qCu0nSVdwcdl7nQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9YMhRkWHICXwMHRMUwFomGSwv2KBy2U/n1Mtvm3kJs4=; b=E9P35qu1EILcV4v9ABLL/cNkXqXB60Um5A0UmifTwy30Z6il6er652ATvuPJoGpVCZeKKTIf5bl6HO9qT/A6A1aoMewtpJ11KABK+R0JLIb49L2xez+ED1Vs+/66gTHF71rMS0iZSfqz++WdYGdjICrhW0DtIhMJPhFiI5JUvy0= Received: from CH0PR10MB4858.namprd10.prod.outlook.com (2603:10b6:610:cb::17) by DM6PR10MB3146.namprd10.prod.outlook.com (2603:10b6:5:1a6::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4909.17; Mon, 24 Jan 2022 15:17:43 +0000 Received: from CH0PR10MB4858.namprd10.prod.outlook.com ([fe80::241e:15fa:e7d8:dea7]) by CH0PR10MB4858.namprd10.prod.outlook.com ([fe80::241e:15fa:e7d8:dea7%9]) with mapi id 15.20.4909.017; Mon, 24 Jan 2022 15:17:43 +0000 From: Chuck Lever III To: Neil Brown CC: Linux NFS Mailing List Subject: dynamic management of nfsd thread count Thread-Topic: dynamic management of nfsd thread count Thread-Index: AQHYETWIjqH23KS61Ea8gdX7jSVUMQ== Date: Mon, 24 Jan 2022 15:17:43 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-mailer: Apple Mail (2.3654.120.0.1.13) x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: b22faf8c-4eea-4582-4681-08d9df4cab7f x-ms-traffictypediagnostic: DM6PR10MB3146:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: p1PFxobzmOry3miXJjTWT3bwdD4GWOJ+W6QGHf320Y1AoDvVo9Vq8RvBzUk7Ute2z3JwFuwRHvKFl2obnHNheYRq/F2/c93cubAb2nVGcmzp6LxcpdMWxP7F1D1GLRfc7sqHWBXeqle/yJNcwB3QOsv9G2YPEVVDxHzMr2NoUMaLnpDAAh3PTouQCxjOuRYyzJIMKmhYZ33bT4+lWvBt7cm74nDGczaa7wTMdRl6asKYC+VUqcus+zPSufkYjcEpgeKmqcg0L9qkmscgaTmvwzL9vk4zpJsf9UfMPhH5qsTPGJiSfHWrfsX2BWCHaIhuS8tr0UYpU9JgzDA/gaxuyN3avZ9WlO7S4HjPjkML43wualr9ZRgAvII2lRI6FX4mXSR3NwEpFlBp7jN+vBM1ZTyB6F4B2sCTa8WNgyBITUonS/XCemxpGZAHM7MFW9Sbz8Q+I+yfM3iaZBMyjp2a07PxmUkqPdaDTYGQJaUCG9essIctAqTz7jiTH2E49VwpXozaTnnNBZCgKp/3ufsK3jOkI5sXaLja/y8t611YHbAN1OTZFKiCJXX0DJTz2XkZBxOMWAIzzU/97tleBUbxhBnsnSCJqjyN3xWLdznzEV8slkaoMOhDMYly/QBeCaG8GmsNdr9mDWimTmUDx40OjdpU8JKIestQYnHtLHjYom4UAQ121pl9k+vpUWrE02HmRgLRKMyybgb06gzImhBRp9aKtgtGR+ZdPnZ9s2+Tjt/cgUkH2APsl6Zs5XUq+NXI x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH0PR10MB4858.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(366004)(64756008)(66446008)(66556008)(6916009)(66476007)(8676002)(6512007)(5660300002)(33656002)(316002)(66946007)(26005)(76116006)(38070700005)(186003)(508600001)(6486002)(2616005)(38100700002)(6506007)(122000001)(36756003)(4326008)(83380400001)(2906002)(86362001)(71200400001)(8936002)(45980500001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?nt+JRGhAHkh08sKHqQFB4qozkNfs1zrBDaJl861/L0lXGaE6/Sgby8+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DSHOADpWPIbpUG11gKen?= =?us-ascii?Q?v5rodqXVwiL138cUSvVvrh6M1b3FgbfK7ak5LWW/l2XITujq2fbDwflbK887?= =?us-ascii?Q?5ahL+yquxMh2G/58n7zamZ+BGXy8rcv2uAfaLc2V+8/4H1gl+pNTOU/3y0HX?= =?us-ascii?Q?6zVb7zLuzPwbOaYA7+aZt/AiSoHEv10NPOsXSs4Z8BZAUnjDjSdyTIdijwrV?= =?us-ascii?Q?3ftsFA7lwz3ECXQGHzBqeYmTXU6oN66zymPqUT/NUdaha/ApQaTWyejwMFCe?= =?us-ascii?Q?oMx6S9dwaF+HxCdFmKRkDUKloFebOGSpZOHSlOs56K3O3yQXYgJXbIOo8+c7?= =?us-ascii?Q?PmMaKR8MhfWVva9l6M611YiLfgPmPXKlOuzDkACzgQKQu2daXjeDlxeaNLSV?= =?us-ascii?Q?B9vUj6VVdeSgiEG533f6izoIR/t6IEz196CJzKuc+EdVgc78rXpvpkKVeBvX?= =?us-ascii?Q?tzoxMVNGCgKjpPUctATgC3nT4N3LcRl3mltCBIwvON6aJ4jkef3uH/rtE/6D?= =?us-ascii?Q?wGNHgvwOpNNtlS9/BPu5mOXLAKYrFlivuGi4XreGJ2NaV1CVmI13Vvo+Qhq2?= =?us-ascii?Q?iWlfBtRWasnZBOx2TCECg+jAUGSf8GH49/ILw/yiDHORtDKdlLf/RAmPK4xt?= =?us-ascii?Q?c3MLnrfZb17z9oypbcBld6RBgp7i3SOesfxt5J9g5TCSrK0ohu/X0pbfUt11?= =?us-ascii?Q?K2czj4q1sJZyxxhhH62t83g=3D?= Content-Type: text/plain; charset="us-ascii" Content-ID: <33D1EC00DB7DB748860969B12C145B2B@namprd10.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: CH0PR10MB4858.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: b22faf8c-4eea-4582-4681-08d9df4cab7f X-MS-Exchange-CrossTenant-originalarrivaltime: 24 Jan 2022 15:17:43.6139 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: /A20VBPGvXr7n380K7cZqsrH5TQJpeJgPxR1aqWlxeUzazvqJH4qhPQfQUV+0c8Id4YyuyjxKRTFbQOpA698+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR10MB3146 X-Proofpoint-Virus-Version: vendor=nai engine=6300 definitions=10236 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 bulkscore=0 mlxlogscore=999 suspectscore=0 spamscore=0 adultscore=0 phishscore=0 malwarescore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2201110000 definitions=main-2201240102 X-Proofpoint-GUID: yJ9tsd6K_Vgi4ZKe2O1cb_PeXEXNTWHU X-Proofpoint-ORIG-GUID: yJ9tsd6K_Vgi4ZKe2O1cb_PeXEXNTWHU Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org Hi Neil- The clean-up of NFSD thread management has been merged into v5.17-rc. I'm wondering if you have thought more about how to implement dynamic management. One thing that occurred to me was that there was a changeset that attempted to convert NFSD threads into work queues. We merged some of that but stopped when it was found that work queue scheduling seems to have some worst case behavior that sometimes impacts the performance of the Linux NFS server. The part of that work that was merged is now vestigial, and might need to be reverted before proceeding with dynamic NFSD thread management. For example: 476 void svc_xprt_enqueue(struct svc_xprt *xprt) 477 { 478 if (test_bit(XPT_BUSY, &xprt->xpt_flags)) 479 return; 480 xprt->xpt_server->sv_ops->svo_enqueue_xprt(xprt); 481 } 482 EXPORT_SYMBOL_GPL(svc_xprt_enqueue); The svo_enqueue_xprt method was to be different for the different scheduling mechanisms. But to this day there is only one method defined: svc_xprt_do_enqueue() Do you have plans to use this or discard it? If not, I'd like to see that it is removed eventually, as virtual functions are more costly than they used to be thanks to Spectre/Meltdown, and this one is invoked multiple times per RPC. -- Chuck Lever