From owner-freebsd-virtualization@freebsd.org Sat Jan 16 03:38:14 2021 Return-Path: Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 305464D1241 for ; Sat, 16 Jan 2021 03:38:14 +0000 (UTC) (envelope-from SRS0=Nbek=GT=freebsd.org=grehan@iredmail.onthenet.com.au) Received: from alto.onthenet.com.au (alto.OntheNet.com.au [203.13.68.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4DHkKJ6vRDz4l6G for ; Sat, 16 Jan 2021 03:38:12 +0000 (UTC) (envelope-from SRS0=Nbek=GT=freebsd.org=grehan@iredmail.onthenet.com.au) Received: from iredmail.onthenet.com.au (iredmail.onthenet.com.au [203.13.68.150]) by alto.onthenet.com.au (Postfix) with ESMTPS id D26242094A5E for ; Sat, 16 Jan 2021 13:38:06 +1000 (AEST) Received: from iredmail.onthenet.com.au (iredmail.onthenet.com.au [127.0.0.1]) by iredmail.onthenet.com.au (Postfix) with ESMTP id B99A720B4D20 for ; Sat, 16 Jan 2021 13:38:06 +1000 (AEST) Received: from iredmail.onthenet.com.au ([127.0.0.1]) by iredmail.onthenet.com.au (iredmail.onthenet.com.au [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id IXqVATHk8X_u for ; Sat, 16 Jan 2021 13:38:06 +1000 (AEST) Received: from MacBook-Air-4.local (unknown [120.29.44.245]) by iredmail.onthenet.com.au (Postfix) with ESMTPSA id 7314F20B4AA4; Sat, 16 Jan 2021 13:38:05 +1000 (AEST) Subject: Re: [bhyve][arm64] Number of allowed vcpus To: Andrei Martin References: Cc: freebsd-arm@freebsd.org, freebsd-virtualization@freebsd.org, Mihai Carabas , Elena Mihailescu , Darius Mihai From: Peter Grehan Message-ID: Date: Sat, 16 Jan 2021 13:38:05 +1000 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.5.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-CMAE-Score: 0 X-CMAE-Analysis: v=2.3 cv=BZdDLol2 c=1 sm=1 tr=0 a=A6CF0fG5TOl4vs6YHvqXgw==:117 a=vPr5hKY0Sloooc5EDKN//A==:17 a=IkcTkHD0fZMA:10 a=EmqxpYm9HcoA:10 a=6KiUTCuZYJAcem8CLqcA:9 a=QEXdDO2ut3YA:10 X-Rspamd-Queue-Id: 4DHkKJ6vRDz4l6G X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of SRS0=Nbek=GT=freebsd.org=grehan@iredmail.onthenet.com.au has no SPF policy when checking 203.13.68.12) smtp.mailfrom=SRS0=Nbek=GT=freebsd.org=grehan@iredmail.onthenet.com.au X-Spamd-Result: default: False [-1.90 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; RWL_MAILSPIKE_GOOD(0.00)[203.13.68.12:from]; RCPT_COUNT_FIVE(0.00)[6]; NEURAL_HAM_SHORT(-1.00)[-1.000]; FREEMAIL_TO(0.00)[gmail.com]; FORGED_SENDER(0.30)[grehan@freebsd.org,SRS0=Nbek=GT=freebsd.org=grehan@iredmail.onthenet.com.au]; RCVD_IN_DNSWL_LOW(-0.10)[203.13.68.12:from]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:9313, ipnet:203.13.68.0/23, country:AU]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[grehan@freebsd.org,SRS0=Nbek=GT=freebsd.org=grehan@iredmail.onthenet.com.au]; RBL_DBL_DONT_QUERY_IPS(0.00)[203.13.68.12:from]; RCVD_COUNT_FIVE(0.00)[5]; ARC_NA(0.00)[]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-virtualization@freebsd.org]; AUTH_NA(1.00)[]; DMARC_NA(0.00)[freebsd.org]; SPAMHAUS_ZRD(0.00)[203.13.68.12:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; R_SPF_NA(0.00)[no SPF record]; FREEMAIL_CC(0.00)[freebsd.org,gmail.com]; MAILMAN_DEST(0.00)[freebsd-virtualization] X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 16 Jan 2021 03:38:14 -0000 Hi Andrei, > I've summed up your proposals and sketched and algorithm: > N - the number of vcpus from the '-c' parameter > X - the number of vcpus from the device tree > > if there isn't the parameter -> start the vm with X vcpus > if there is the parameter --> if N <= X -> start the vm with N parameters > |-> if N > X -> throw an error > > I believe this gives the opportunity to rebuild the device tree and use all > vcpus (first branch) > or let the device tree as it is (more vcpus) but use only a subset of them. > Is this alright? If you are going to have the ability to rebuild the device tree, you might as well do it every time. If a user hasn't specified how many vCPUs on the command line, it's safe to assume a default of 1. later, Peter.