From nobody Mon May 08 19:01:33 2023 X-Original-To: freebsd-current@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 4QFVy75y8Nz4BFpW; Mon, 8 May 2023 19:01:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4QFVy75WDCz40QD; Mon, 8 May 2023 19:01:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683572495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=naNyuef0hEVh7ER6V5H6FTzeZ6VyxOxioyEBOv+r7W0=; b=lwLpfL+EO9D8N8A3ioCLYPhTtKqcuNJr+8c/b7w246n2kGtXJ2A+ONwfRvO8G3E4uPfVJa 3ULj4HyGj+N6T+ph26MOT1LsLSInLWEaQNMV1qbu4r7FF7AZXHI2P4paNc48l3J8Jq4EjV KJSWPogPvg2x/otJFySr6K7juEBZze4hO6nSWbQLf7rIwNYmcwZvYGKUTuuPBljakpudLd F0Du0L/L+4wmEN3wiaxYUbcfJs+vVKiL8THd0Za6ytBomrprlTp58kB1k/iPJwwVLYHErz FY4MeRzg0XKBPHJbE2Mci6pOW+87Kablq+ZW1DZcIweO0zzdD7Q+C2NzWN6+0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1683572495; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=naNyuef0hEVh7ER6V5H6FTzeZ6VyxOxioyEBOv+r7W0=; b=HhDFcnIrwgvrTDa5tBfvXctD6VVLevsbrxm0A74FoKtMxuVjEFeh6cChxI9twgeF9jq7Gj oIRbs8ZcjfiThRtg/EKfzLgeha1iudAcWwSbAlr0amUInky4Czpm108MkSL/aisUxr0I2r fDiFTjQvJjfvNtCx1oZc5RXptroXFINOvHyoqHxzqlmQW2yx7PTREKL7Ha5oR2SRnFTtSz siFKA7bLvSRORL5yAF/w/Brcc6EsOtMDtzIU0Ps1qXbtvBTQAMGwmiSVHU4J0UwZA4yNVo q3JK9L3o8lZLkAynRucqHBntK/G9MlghATtv0WCc0y7K6QjA6CwWCaMeEo03uA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1683572495; a=rsa-sha256; cv=none; b=urh9GxT+/EPhnDSiwxSj9xWox540k4J8JxwxPG+dT/jA4HkbT6l8ESIcHHwNM58Z7x9XTH P7TKuKgc8EpnLWfPQZUnb5wzORAEmoWQxhKrU9n49UCaZgWlJXmz0jvIwSvlZNaBEkILI7 eTH0GWF+nvNCQ1YhpUYaNyh+8JDp+ub5sFu1MPKvAoNRvEMB1N89ZaH+vVF6u0fBRjZyjP PNX3PO96ZQaTb+8GOQRP6pn7LuJSEhMPhWtNkws9CoZqW65R/Il0vL8sDYAoyjnENmdThW rV7nqcB2u+/E3jJlRjdkqn99zNmJKfdZA+pRHt8OZLQoqMbqQmG4V5lHoWuLfw== Received: from [IPV6:2601:648:8680:16b0:9597:2b45:6d3:31cd] (unknown [IPv6:2601:648:8680:16b0:9597:2b45:6d3:31cd]) (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 did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4QFVy72Cbvzy7H; Mon, 8 May 2023 19:01:35 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <5e59d762-6f58-46a4-bceb-de7fcb87682d@FreeBSD.org> Date: Mon, 8 May 2023 12:01:33 -0700 List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.10.1 Subject: Re: Support for more than 256 CPU cores Content-Language: en-US To: Ed Maste , freebsd-arch , FreeBSD Current References: From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ThisMailContainsUnwantedMimeParts: N On 5/5/23 6:38 AM, Ed Maste wrote: > FreeBSD supports up to 256 CPU cores in the default kernel configuration > (on Tier-1 architectures). Systems with more than 256 cores are > available now, and will become increasingly common over FreeBSD 14’s > lifetime. The FreeBSD Foundation is supporting the effort to increase > MAXCPU, and PR269572[1] is open to track tasks and changes. > > As a project we have scalability work ahead of us to make best use of > high core count machines, but at a minimum we should be able to boot a > GENERIC kernel on such systems, and have an ABI for the FreeBSD 14 > release that supports such a configuration. > > Some changes have already been committed in support of increased MAXCPU, > including increasing MAX_APIC_ID (commit c8113dad7ed4) and a number of > changes to reduce bloat (such as commits 42f722e721cd, e72f7ed43eef, > 78cfa762ebf2 and 74ac712f72cf). > > The next step is to increase the maximum cpuset size for userland. > I have this change open in review D39941[2] and an exp-run request in > PR271213[3]. Following that the kernel change for increasing MAXCPU is > in D36838[4]. > > Additional work on bloat reduction will continue after this change, and > looking forward FreeBSD is going to need ongoing effort from the > community and the FreeBSD Foundation to continue improving scalability. > > [1] https://bugs.freebsd.org/269572 > [2] https://reviews.freebsd.org/D39941 > [3] https://bugs.freebsd.org/271213 > [4] https://reviews.freebsd.org/D36838 FWIW, I think it will be useful for main to run with a larger userspace MAXCPU than kernel for at least a while so that we have better testing of that configuration and to give headroom for bumping MAXCPU in the kernel during the 14.x branch. The only other viable path I think which would be more work would be to rework cpuset_t in userspace to always use a dynamically sized mask. This could perhaps be done in an API-preserving manner by making cpuset_t an opaque wrapper type in userland and requiring CPU_* to indirect to functions in libc, etc. That's a fair bit more work however. -- John Baldwin