Date: Wed, 10 May 2023 10:29:53 -0700 From: John Baldwin <jhb@FreeBSD.org> To: =?UTF-8?Q?Corvin_K=c3=b6hne?= <corvink@FreeBSD.org>, Ed Maste <emaste@FreeBSD.org>, src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 76887e84be97 - main - cpuset: increase userland maximum size to 1024 Message-ID: <077d3e1d-8d2a-5bf4-1f27-31d090e03731@FreeBSD.org> In-Reply-To: <692e003e4b684c093b16048a4e12cc2dd8fc1fe0.camel@FreeBSD.org> References: <202305081826.348IQm9N040108@gitrepo.freebsd.org> <0dadaa17917629e3399fe9acbab17eb60b63575d.camel@FreeBSD.org> <2f47388ab07eaeb820344e928adb96ff6f7a5916.camel@FreeBSD.org> <692e003e4b684c093b16048a4e12cc2dd8fc1fe0.camel@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 5/9/23 2:40 AM, Corvin Köhne wrote: > On Tue, 2023-05-09 at 09:43 +0200, Corvin Köhne wrote: >> On Tue, 2023-05-09 at 08:59 +0200, Corvin Köhne wrote: >>> On Mon, 2023-05-08 at 18:26 +0000, Ed Maste wrote: >>>> The branch main has been updated by emaste: >>>> >>>> URL: >>>> https://cgit.FreeBSD.org/src/commit/?id=76887e84be975698b14699d7d0dfb157d73e9990 >>>> >>>> commit 76887e84be975698b14699d7d0dfb157d73e9990 >>>> Author: Ed Maste <emaste@FreeBSD.org> >>>> AuthorDate: 2023-05-02 20:57:12 +0000 >>>> Commit: Ed Maste <emaste@FreeBSD.org> >>>> CommitDate: 2023-05-08 18:25:15 +0000 >>>> >>>> cpuset: increase userland maximum size to 1024 >>>> >>>> Hardware with more than 256 CPU cores is now available and >>>> will >>>> become >>>> increasingly common. Bump CPU_MAXSIZE (used for userland >>>> cpuset_t >>>> sizing) to 1024 to define the ABI for FreeBSD 14. >>>> >>>> PR: 269572, 271213 [exp-run] >>>> Reviewed by: mjg, jhb >>>> Relnotes: yes >>>> Sponsored by: The FreeBSD Foundation >>>> Differential Revision: https://reviews.freebsd.org/D39941 >>>> --- >>>> sys/sys/_cpuset.h | 2 +- >>>> 1 file changed, 1 insertion(+), 1 deletion(-) >>>> >>>> diff --git a/sys/sys/_cpuset.h b/sys/sys/_cpuset.h >>>> index b75ee595da3c..676f9855f384 100644 >>>> --- a/sys/sys/_cpuset.h >>>> +++ b/sys/sys/_cpuset.h >>>> @@ -40,7 +40,7 @@ >>>> #define CPU_SETSIZE MAXCPU >>>> #endif >>>> >>>> -#define CPU_MAXSIZE 256 >>>> +#define CPU_MAXSIZE 1024 >>>> >>>> #ifndef CPU_SETSIZE >>>> #define CPU_SETSIZE CPU_MAXSIZE >>> >>> Hi Ed, >>> >>> this somehow breaks bhyve on my system. It immediately exits with >>> "vm_run error -1" on startup. >>> >>> >> >> Setting MAXCPU [1] to 1024 as well, solves the issue. Not sure if >> it's >> a regression of your commit or a bhyve bug. >> >> [1] >> https://github.com/freebsd/freebsd-src/blob/20d8d9809a8c0a3ddd1d0156e77ec53a1ed95747/sys/amd64/include/param.h#L68 >> >> > > vmm kernel module and bhyve userland are sharing a cpuset_t. So, this > commit introduces a mismatch in the ioctl signature of VM_RUN. Any > advice how to fix this properly, would be appreciated. The ioctl needs to change to follow the pattern all the syscalls that use cpuset_t do: take a pointer to the cpuset_t and a size instead of embedding the cpuset_t in the ioctl structure. We will have to define a COMPAT_FREEBSD13 structure and ioctl with the current structure with a hardcoded cpuset_t size (probably just inline cpuset_t member as an anonymous struct with the same members as cpuset_t but a constant for the array count) as well. -- John Baldwin
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?077d3e1d-8d2a-5bf4-1f27-31d090e03731>