Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp7922940rwb; Wed, 23 Nov 2022 12:40:16 -0800 (PST) X-Google-Smtp-Source: AA0mqf61DwIpBntfd2wWhsKSqmr6aHxe+xRr5tYNORg/yZeMOoHYvfJFLD1dLshKkTwLlbCthlvG X-Received: by 2002:aa7:cf12:0:b0:469:a6ce:bb5 with SMTP id a18-20020aa7cf12000000b00469a6ce0bb5mr10179449edy.368.1669236016560; Wed, 23 Nov 2022 12:40:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669236016; cv=none; d=google.com; s=arc-20160816; b=cc63Yh4fgiE3CAacGKQG3QgLOThi/9dGLGkib2s0+JBvyiSl4LpaMqZi2z1I/d1e+C R+vpPhcApINgq6INpkgzuxvABtTzoI17J4dtPMsQnIUBIX6/e9Gg0x996vk7oXPGwWvp HeEibROWJSKeTmal09V6KoZHiIadIyqG4v17lNVqCOhfgGoaXTf/cC4qi9Ts8iW+L371 ZM14fAvZ3sh7FgkcHek4LYyZ6ZnInoWk2NJ/f+KaBRGha9NKgCiFHw4+WiXEhLEHXtWz I9QQoGxtXIMSUO0NXwlg1siSFkFvo+6rt14ys8tm7hSZ1Iwd0GgyVa96m7lIQux/G9/l G/zw== 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; bh=EIwgCVQdeabpDgky2yWDiED//TZuFkW5esnwk4q0RfU=; b=j1UNsgPfa/qu6A+XwmoYJYFcjgCTKlrDc+HeNeucadN9gc9GqroT+0mgf/IkMkTpij kQe0gIvn57uurjfghwGXOr+somMqW6cQzB71uAzhMggK0A4g3ZGUSQ9YiBF4Lx1/Jp35 7Mv7Ial5AT3ORbAQKHD0Y3F17BXB+hIN+z/9pAYtnKRQA/nTJH9fgt+lJHWrr6+/kv4o 6aG5i5F3E4vnN9AVZ9bAGUjiGjTNRGipp8oYc+aOvYyPBsdWHSbiz2A8Nb/fivM6k+FF ucOOnZJIJAteGiHM/Ay98EoNbqreiEKn+78JHCLnxWH7P2oi8wHT1a2s1PR0EQqt/RvX DbTg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="Yo1uT/6S"; 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=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v2-20020aa7d802000000b004617facf124si13741042edq.253.2022.11.23.12.39.54; Wed, 23 Nov 2022 12:40:16 -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=@redhat.com header.s=mimecast20190719 header.b="Yo1uT/6S"; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236160AbiKWUKl (ORCPT + 88 others); Wed, 23 Nov 2022 15:10:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60644 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233625AbiKWUKj (ORCPT ); Wed, 23 Nov 2022 15:10:39 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3629C7C464 for ; Wed, 23 Nov 2022 12:09:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1669234181; 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=EIwgCVQdeabpDgky2yWDiED//TZuFkW5esnwk4q0RfU=; b=Yo1uT/6SCWZ+/h0+iOhY6iiA42/S0Pz7MPuBhPRCGq8LHE8AnnB1LCFQ3CeZWVF/D/qUIk oaoVrScOdalF3AWkVflS6HIpWjxrKn5CQfJvEmWvXKyG/Bu58dkJI4hQR5do06fEmdpULm k18TC9OIOQXmtTEzEUhHhrETroMMDxo= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-367-eEgxoCpvO7S99hJI1A2GQQ-1; Wed, 23 Nov 2022 15:09:37 -0500 X-MC-Unique: eEgxoCpvO7S99hJI1A2GQQ-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 34ECE1012463; Wed, 23 Nov 2022 20:09:37 +0000 (UTC) Received: from redhat.com (unknown [10.2.16.241]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9005F17582; Wed, 23 Nov 2022 20:09:36 +0000 (UTC) Date: Wed, 23 Nov 2022 14:09:31 -0600 From: Eric Blake To: Pavel Machek 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: <20221123200845.cuct5euvikqksojm@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20220429 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE 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-kernel@vger.kernel.org On Tue, Nov 22, 2022 at 12:56:41PM +0100, Pavel Machek wrote: > 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? 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? -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org