From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5C7CDCAC598 for ; Tue, 16 Sep 2025 09:33:51 +0000 (UTC) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uyS3v-0005vy-Or; Tue, 16 Sep 2025 05:33:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1uyS3r-0005vl-JT for qemu-devel@nongnu.org; Tue, 16 Sep 2025 05:33:19 -0400 Received: from linux.microsoft.com ([13.77.154.182]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1uyS3l-00045d-AX for qemu-devel@nongnu.org; Tue, 16 Sep 2025 05:33:19 -0400 Received: from example.com (unknown [167.220.208.43]) by linux.microsoft.com (Postfix) with ESMTPSA id 83BCD2015505; Tue, 16 Sep 2025 02:33:04 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 83BCD2015505 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1758015188; bh=Ni4zhHvUhyIBGzEHotqfaeOtkYpJCAQ8X3x85Wn3s/w=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=GE3AUdDO0FbPDIfL8+h+IiFg7O6J9StMcgAayOlKB4nI0hQRAbBMhsn9HqFBDqYjs YUqaf9TTNLz9usmGMYtLpt9sBcz7KLaCVrSmfOL0QT+fBbER5Xfk/9Hd6GuUoX2vgn tgxNvY2eTMhdfef3s6HLPMN+MMj8JfPrHe9fRohY= Date: Tue, 16 Sep 2025 11:33:01 +0200 From: Magnus Kulke To: Daniel =?iso-8859-1?Q?P=2E_Berrang=E9?= Cc: qemu-devel@nongnu.org, Eric Blake , Eduardo Habkost , "Michael S. Tsirkin" , Markus Armbruster , Magnus Kulke , Paolo Bonzini , Richard Henderson , Phil Dennis-Jordan , Marcel Apfelbaum , Alex =?iso-8859-1?Q?Benn=E9e?= , Magnus Kulke , Cornelia Huck , Zhao Liu , Thomas Huth , Yanan Wang , Cameron Esfahani , Wei Liu , Wei Liu , =?iso-8859-1?Q?Marc-Andr=E9?= Lureau , Roman Bolshakov , Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= Subject: Re: [PATCH v3 10/26] accel/mshv: Add vCPU creation and execution loop Message-ID: References: <20250807143951.1154713-1-magnuskulke@linux.microsoft.com> <20250807143951.1154713-11-magnuskulke@linux.microsoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Received-SPF: pass client-ip=13.77.154.182; envelope-from=magnuskulke@linux.microsoft.com; helo=linux.microsoft.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_PASS=-0.001, T_SPF_HELO_TEMPERROR=0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org On Wed, Aug 27, 2025 at 12:24:39PM +0100, Daniel P. Berrangé wrote: > So every MSHV vCPU has a corresponding Linux thread, similar > to the model with KVM. In libvirt we rely on the vCPU thread > being controllable with all the normal Linux process related > APIs. For example, setting thread CPU affinity, setting NUMA > memory policy, setting scheduler priorities, putting threads > into cgroups and applying a wide variety of cgroup controls. > > Will there be any significant "gotchas" with the threads for > MSHV vCPUs, that would mean the above libvirt controls would > either raise errors, or silently not have any effect ? > Hi Daniel, I am not aware of any such gotchas. The MSHV vCPU threads should be regular threads that spend most of their time blocked in ioctl(MSHV_RUN) calls, and as such they should be controllable by the facilities you mentioned. I know that that folks who tested this code have been using numactl for reliable performance assessments without running into issues. best, magnus