Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp8017466rwb; Wed, 23 Nov 2022 14:13:06 -0800 (PST) X-Google-Smtp-Source: AA0mqf6k505zd/3swgRfEI57kv2sJ/zzafASrBBQWx3dsL3fzxmmc695rH01Y+e1K2/nZ8CFTygB X-Received: by 2002:a17:902:cf41:b0:189:3e36:28b8 with SMTP id e1-20020a170902cf4100b001893e3628b8mr6137174plg.94.1669241586072; Wed, 23 Nov 2022 14:13:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669241586; cv=none; d=google.com; s=arc-20160816; b=wXrdemDxKcQHQMk6ozfdgE4TYwfq0AZVouyscf16YASplpetzoDPKllTf6byHKGWjc X+Bfeel++XXhB4pFF1PBYrXak0NlJPg/I9dAfhv0O+m5nAQEy4hg3v8LnW/2t5lrKfgB BEDv4gEov+c9uFxQMfhXlRcktaP8nPCswIBI2FCCdICiOsrVjJC9CZS/Tz2HBeY2Twhi zXWimo3y2BC4bwCm9mtdPLCq/V0MiOFiUbnTLs0QDcGpGfS80TGF3x+6m17nIga3eywC t2awIx9DJ3/+e2oq8ue04Igc0bdE61FnRVqH2Q1SXvjKOPLc8OZTpS5HkM9CFEAqJBE0 jq2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Q65EMJnwcuNJS6WHzM0LQX+f1I0sGP+f67KLpa3vbZE=; b=STSegP2nHaSFtIKRTgcj6t8glJ1YDEysDk/eJ6gIcclbWz2gAIti4esinFK4a54+Zv IzGTCU7brfC3niY61jJujXGxZm5KhX3ticJkqbqNmt54Suaa6xvYK/FjGSiaM7VXO7hq ZWwugGSAVbgL0Yue7YDLNeZ9KEehY/b+WwJczr15i+OogMBBfzUN/xyalywCTT4d+E3F QYw3B71aVC9fhBJ6VG3dRwVbFaU2R/QXHmqdxWrFNTuvIVey0ZZ6YpXr7YU/uk3Zn6HM qL9WiHNj9GVEoFqGWd5jNL0uoboBmbbrrwubkWZeyDWHq+xipdBT67aUV3BvK16IR8ZQ y3/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ucw.cz header.s=gen1 header.b=IG0Y0wHq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ucw.cz Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t16-20020a1709028c9000b001870506835bsi15767304plo.601.2022.11.23.14.12.55; Wed, 23 Nov 2022 14:13:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ucw.cz header.s=gen1 header.b=IG0Y0wHq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ucw.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231368AbiKWWBj (ORCPT + 88 others); Wed, 23 Nov 2022 17:01:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232770AbiKWWBP (ORCPT ); Wed, 23 Nov 2022 17:01:15 -0500 Received: from jabberwock.ucw.cz (jabberwock.ucw.cz [46.255.230.98]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCFE2ECCFE; Wed, 23 Nov 2022 14:01:10 -0800 (PST) Received: by jabberwock.ucw.cz (Postfix, from userid 1017) id 91CFD1C09F9; Wed, 23 Nov 2022 23:01:00 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ucw.cz; s=gen1; t=1669240860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=Q65EMJnwcuNJS6WHzM0LQX+f1I0sGP+f67KLpa3vbZE=; b=IG0Y0wHqiAgKueehtVZeBYE4TV6104FF7i3Cf+qplvTduvnvJ7kiEMEKG+8N8gEXh3jbPa d+PdEBWC9aVSxLvk4WtE07IhWHSXhEtx/DUniJVDa/mOZOEAf+51pmgJgAvgIEQHkHsdm3 EJO31VjUIi8ynXq4xsvYJ9jDiYHzAbI= Date: Wed, 23 Nov 2022 23:01:00 +0100 From: Pavel Machek To: Eric Blake Cc: kernel list , josef@toxicpanda.com, linux-block@vger.kernel.org, nbd@other.debian.org Subject: Re: nbd: please don't spawn 16 threads when nbd is not even in use Message-ID: References: <20221123200845.cuct5euvikqksojm@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="eZEEPNQ49Z9vZpD+" Content-Disposition: inline In-Reply-To: <20221123200845.cuct5euvikqksojm@redhat.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE autolearn=ham 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-kernel@vger.kernel.org --eZEEPNQ49Z9vZpD+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi! > > I see this... and it looks like there are 16 workqueues before nbd is > > even used. Surely there are better ways to do that? >=20 > Yes, it would be nice to create a pool of workers that only spawns up > threads when actual parallel requests are made. Are you willing to > help write the patch? I was thinking more "only spawn a workqueue when nbd is opened" or so. I have 16 of them, and I'm not using nbd. Workqueue per open device is okay, current situation... not so much. Pavel --=20 People of Russia, stop Putin before his war on Ukraine escalates. --eZEEPNQ49Z9vZpD+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABECAB0WIQRPfPO7r0eAhk010v0w5/Bqldv68gUCY36YHAAKCRAw5/Bqldv6 8tYzAJ9XeuHxOzeqq2h6cNWDEpX8sxtKMgCcD6V7OICwJACN3mYJp/TZEwnnrV0= =kZvb -----END PGP SIGNATURE----- --eZEEPNQ49Z9vZpD+--