From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (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 AA51417BAF for ; Mon, 9 Sep 2024 02:02:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725847324; cv=none; b=hB0qE1kfETY8Yhtr8vo4zUbC9GX+cibkg91Wx58zetRlg64JZNwFIVYW0fzOypHvILYwPiViyiFiYxbshXowPfPsg4xhQ4sydttbSfi0QcFKJwh79KaWjwJe4eqoPawtbvnSFP93lBQsFlhex9TozF2InjZEmG655U2Yj+DuyxE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1725847324; c=relaxed/simple; bh=Ak4RUYn1eA5rfEtC6UaT2NAXVhW2XNZwTEkhokuf7aA=; h=From:To:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=h7i6o/I68uYL+qj9Oog3DmtZbE+GUVyDQW0CZ8e6btnQnzRknSVSEu6kpn59SVgzGUNsNsirx/AkuLnsdl6D9CBqYi+4odXxWZpuP1Kd15pE07eNSWyHeBtFe8+QgM3irm2hmrex5sZXpJMFmZVAvSXn5GAqlxuexVIghbjFs9s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=ZynIk91k; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ZynIk91k" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725847321; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zkgZukq1NH7xZqgst5PAi/0pE3TPAwASepcK6DYlOEo=; b=ZynIk91kqr4z8ZV3ho+lJNxw5TEFt5nWNOXGR0eqqtjCtcsVUL582VmPTXBAlLvhzKXW1r x7cNBIGO/D4AsaeNRJDemhsAa87egQ+fG1dj5Tmmeer97kZmp84PhzWZ6VoCel3MXijpkJ bRAM4LbphZGmH/fByKxuaGhduCAbgLI= Received: from mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-381-kwgtn3btOuilcuSSm7lDBw-1; Sun, 08 Sep 2024 22:01:59 -0400 X-MC-Unique: kwgtn3btOuilcuSSm7lDBw-1 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 5EDBD1956080; Mon, 9 Sep 2024 02:01:58 +0000 (UTC) Received: from server.redhat.com (unknown [10.72.112.25]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D2BF21956086; Mon, 9 Sep 2024 02:01:53 +0000 (UTC) From: Cindy Lu To: lulu@redhat.com, jasowang@redhat.com, mst@redhat.com, michael.christie@oracle.com, linux-kernel@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: [RESEND PATCH v1 1/7] vhost: Add a new module_param for enable kthread Date: Mon, 9 Sep 2024 10:00:39 +0800 Message-ID: <20240909020138.1245873-2-lulu@redhat.com> In-Reply-To: <20240909020138.1245873-1-lulu@redhat.com> References: <20240909020138.1245873-1-lulu@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 Add a new module parameter to enable kthread while loading modules. This parameter will identify if the vhost will use kthread or a task. The default value will be true. Signed-off-by: Cindy Lu --- drivers/vhost/vhost.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c index 9ac25d08f473..be43181af659 100644 --- a/drivers/vhost/vhost.c +++ b/drivers/vhost/vhost.c @@ -41,6 +41,9 @@ static int max_iotlb_entries = 2048; module_param(max_iotlb_entries, int, 0444); MODULE_PARM_DESC(max_iotlb_entries, "Maximum number of iotlb entries. (default: 2048)"); +bool enforce_kthread = true; +module_param(enforce_kthread, bool, 0444); +MODULE_PARM_DESC(enforce_kthread, "enable vhost to use kthread (default: Y)"); enum { VHOST_MEMORY_F_LOG = 0x1, -- 2.45.0