From nobody Tue May 9 09:52:38 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4QFtkJ36rZz49yj0; Tue, 9 May 2023 09:52:40 +0000 (UTC) (envelope-from mjguzik@gmail.com) Received: from mail-oa1-x2f.google.com (mail-oa1-x2f.google.com [IPv6:2001:4860:4864:20::2f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QFtkJ1Sxhz4CX7; Tue, 9 May 2023 09:52:40 +0000 (UTC) (envelope-from mjguzik@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-oa1-x2f.google.com with SMTP id 586e51a60fabf-192adab8f0eso4636309fac.2; Tue, 09 May 2023 02:52:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1683625959; x=1686217959; h=content-transfer-encoding:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=5bc8ARlxx8E0BoFt1K+B7b788oz0m9SuSri+x7BfJ4k=; b=bPzWW+cmq6qEurLSBC/7Gh63dSrw1Hs5OPaa/TpTOp6kXepVPbxV2csBmsFP5N/req 88ioCLAwXWeYh28KS09+YHNO2wl7v8iuRkgYcRK8ATRiHRaW9f4qlQs4ZD5Opcszx/Or 0Qc3FY00y3ENRPML9Vsy8VSDS78m3INo2UXWBGdqBWW+9Jdg0jsT8L9s/wDfYjxMI0yb Ok5giLyrF64S2wYDJ5s2R3oh54UAmx7ogD9FxdaaF87OZ+6ML2h9Tj91pMa0m74kUyEH kySNJuFe2ea9Fku7r3c4PCgdGrQJoqZjUtA5u8kHOLVoz2Yy7dr3z6DTRv5cT6bbZZz8 mnbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683625959; x=1686217959; h=content-transfer-encoding:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5bc8ARlxx8E0BoFt1K+B7b788oz0m9SuSri+x7BfJ4k=; b=ZZXfg0pp/6rKVjJNg/O+qRgf8xtDAMdilX+dzRsvBv9nHBcNvNyscDgpB1fUOCbR9h qCYUi12QSvaTLjH6qdDxJAO9XbIBHccHVKKgUDt44CFEPJaLjb2tVIJ75g0OIJz47dZZ t81N2A4VrC3b7/nCzWdkHjI46cWnCLsMawnDd0AcsAkRxYuSVcbJwYeWhwur4K/TdQFr Qs1nss9HQqbt/poh49I+Uz3aYVfPU1hwP0rOAmtbgQ5LGgCJ4mtXgHcKZT8kpGoE2RvC iy+mFKgIrlqX5QBSY0AONyqIKyF11W/mvH7QLJBbFSOrEgP/d/SSpQr/0SPCtAv0J9vE Vhcw== X-Gm-Message-State: AC+VfDxTp+qbcQrbnOvHRxRAbGo3b1c6RpWxv2QaDPorCoQAGprll071 oJu6vg/CPZOjiPtecr2Q6qigmjbNkM5RgGP5oTy0bXZN X-Google-Smtp-Source: ACHHUZ72vKQm9w9KAOEe4WvzMukopSp+EPJUIo01wgedt81Col5nTHx8B+lTYy7wL1yltJYMUrtBavdHotGiY7VF4eM= X-Received: by 2002:a05:6870:c793:b0:192:52b4:8489 with SMTP id dy19-20020a056870c79300b0019252b48489mr6670227oab.21.1683625958942; Tue, 09 May 2023 02:52:38 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Received: by 2002:ac9:7101:0:b0:4d4:94b:7266 with HTTP; Tue, 9 May 2023 02:52:38 -0700 (PDT) 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> From: Mateusz Guzik Date: Tue, 9 May 2023 11:52:38 +0200 Message-ID: Subject: Re: git: 76887e84be97 - main - cpuset: increase userland maximum size to 1024 To: =?UTF-8?Q?Corvin_K=C3=B6hne?= Cc: Ed Maste , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4QFtkJ1Sxhz4CX7 X-Spamd-Bar: ---- X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2001:4860:4864::/48, country:US] X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-ThisMailContainsUnwantedMimeParts: N On 5/9/23, Corvin K=C3=B6hne wrote: > On Tue, 2023-05-09 at 09:43 +0200, Corvin K=C3=B6hne wrote: >> On Tue, 2023-05-09 at 08:59 +0200, Corvin K=C3=B6hne 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=3D76887e84be975698b14699d7d0= dfb157d73e9990 >> > > >> > > commit 76887e84be975698b14699d7d0dfb157d73e9990 >> > > Author: Ed Maste >> > > AuthorDate: 2023-05-02 20:57:12 +0000 >> > > Commit: Ed Maste >> > > 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/20d8d9809a8c0a3ddd1d0156e77e= c53a1ed95747/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. > > [1] > https://github.com/freebsd/freebsd-src/blob/c543e09f1f8ef98f201f7dd3f34ae= 023d61dfa83/sys/amd64/include/vmm.h#L759 > > > On one hand this really should not be a part of the abi (you could have a pointer to cpuset and a a var stating the size). On the other hand, i suspect the least problematic long term solution is to introduce usercpuset_t (or whatever the name) and have a conversion func on import. This would still mean you need a kernel and user variant of the vm_exit struct. --=20 Mateusz Guzik