From nobody Thu May 16 00:58:54 2024 X-Original-To: dev-commits-src-branches@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 4VfsDS0kdLz5KB5F; Thu, 16 May 2024 00:59:04 +0000 (UTC) (envelope-from zlei@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 4VfsDR5rTJz4SgB; Thu, 16 May 2024 00:59:03 +0000 (UTC) (envelope-from zlei@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715821143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TVD0Bu1cwnlj/Jc3E62kT9jP9QDJQYZoihJkLvI1Gck=; b=DVjIL0zuT6oXK0ktRGt4d8Bzk0rdhfYJ+2avXR5wHfQXhgkkXEd8AsjndfXbAACtA3/0/d xGjfzES0rxMo31E7g3XyO5wxzSUHU7KuCbVEtDG6+60civIhL6OkRVNvOKZSFefnYoXVrE yS0k58NykBibn3HYBQhpBxARDmy2ly8CQN5Hc3tqgwWdtcKvgiLzU/x5oCQdvFNlyABZ8X LW7sCAfbRS8eiN0lfCWkebKQb8K+eqPKdwoGfa1nrRVXHqW0iVmH6UsZ6KdoyV7h15q+gr lgs8T7HRUa3WUl5PqNKRy8ShVqb0quJClNQvST6dnxcsQrnbWcSNtl8+XVu+XQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715821143; a=rsa-sha256; cv=none; b=Mli9u8wbXzFlLxBmHElll5wFAxV1B9ju0UIYx/SBWX5bgwAHnuI6Ry0vCwJKeJFrLLPCWQ /ezrGAM4ROgCNhOE5NZZkH0ENSpP+hhznURlLCc4n2AcYcvC/8aCczb7aZT2CPfpuswCsO Z6M7PFy22RGs6IFBbs0fqjyDlqy0SrnHspTt6eIk7ALGgVvQ6ZzSJfh28kBGKBaUD1zjsl /WCGOCYXgjdIriMg25TkxMHGm9EASSCWtLRG5jYuSkppNp6JTQfnGPs1PweTVQybhTtI/p SuH7h1gu1O0TTYc6UduqzjWqNtG1MiC3dLAGrwPT9I1RjnFnWyOPBt6yzILpGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715821143; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TVD0Bu1cwnlj/Jc3E62kT9jP9QDJQYZoihJkLvI1Gck=; b=nV3TnQ9sbn+KXUy9QxewD8+B3JBOQxt5pbhmp70HXcx1v7w1Urd5EFVx6iEPDVAEX7VoA3 DLfskE7W59OnM/Pl9ITT8bYZdEPBQxm13QbV/lW6Gb6gDN8U8Ci9j4chIPswzWlaSsk4ae T0Ri4xv+5nWEeC9b4M+ylI17v89X5pNiJMoquTwXiNjyuNVj9L80HVDejSCeqDsu9ShHRF fGtU6uTeqRlYEUmgWVJky9zFeb8GMxnfqzz96JvZK82TD8Bb289QfsjVo4Lg6CjwDPQ85+ Qb8cQi+FplHCPD2pYP37+cwARJ+fAVFeo/NtUQhutmFYBapQry1bvaE+4gH+QQ== Received: from smtpclient.apple (unknown [IPv6:2001:19f0:6001:9db:98f0:9fe0:3545:10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) (Authenticated sender: zlei/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4VfsDQ3X3MzT4h; Thu, 16 May 2024 00:59:02 +0000 (UTC) (envelope-from zlei@FreeBSD.org) Content-Type: text/plain; charset=us-ascii List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.120.41.1.8\)) Subject: Re: git: b827afb9e3a7 - releng/14.1 - Revert "intrng: switch from MAXCPU to mp_ncpus" From: Zhenlei Huang In-Reply-To: <202405151635.44FGZxAS021246@gitrepo.freebsd.org> Date: Thu, 16 May 2024 08:58:54 +0800 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-branches@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <88AD738C-4E2C-430D-8AE1-D1C7A633B977@FreeBSD.org> References: <202405151635.44FGZxAS021246@gitrepo.freebsd.org> To: Mike Karels X-Mailer: Apple Mail (2.3696.120.41.1.8) > On May 16, 2024, at 12:35 AM, Mike Karels wrote: >=20 > The branch releng/14.1 has been updated by karels: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Db827afb9e3a7aaaa2da7d101c46881c6= 46d4df2f >=20 > commit b827afb9e3a7aaaa2da7d101c46881c646d4df2f > Author: Mike Karels > AuthorDate: 2024-05-14 22:44:58 +0000 > Commit: Mike Karels > CommitDate: 2024-05-15 16:35:38 +0000 >=20 > Revert "intrng: switch from MAXCPU to mp_ncpus" >=20 > This reverts commit b4d11915c73f199501672b278be86e1f63790036. > This is a direct commit to stable/14. The change breaks booting > on older Raspberry Pi 4's, although that works on main. The cause Emm, I think this revert affects other arch also. Does this have large = impact ? If yes, and only older Paspberry Pi 4 is to be fixed, why not add conditional compile #if = directive for Paspberry Pi 4 instead ? For amd64 the MAXCPU has been bumped from 256 to 1024 [1]. That is large = IMO. 1. 9051987e40c5 amd64: Bump MAXCPU to 1024 (from 256) > is unknown. The original commit should be redone on stable/14 > if/when it catches up with main. >=20 > (cherry picked from commit = 3e627553bbd791a4f73eaeea2c2d795fd4e0ee70) >=20 > Approved-by: re (cperciva) > --- > sys/kern/subr_intr.c | 22 +++++++++++----------- > 1 file changed, 11 insertions(+), 11 deletions(-) >=20 > diff --git a/sys/kern/subr_intr.c b/sys/kern/subr_intr.c > index 49fe20cdc890..6535c42f2404 100644 > --- a/sys/kern/subr_intr.c > +++ b/sys/kern/subr_intr.c > @@ -175,11 +175,11 @@ intr_irq_init(void *dummy __unused) >=20 > /* > * - 2 counters for each I/O interrupt. > - * - mp_maxid + 1 counters for each IPI counters for SMP. > + * - MAXCPU counters for each IPI counters for SMP. > */ > nintrcnt =3D intr_nirq * 2; > #ifdef SMP > - nintrcnt +=3D INTR_IPI_COUNT * (mp_maxid + 1); > + nintrcnt +=3D INTR_IPI_COUNT * MAXCPU; > #endif >=20 > intrcnt =3D mallocarray(nintrcnt, sizeof(u_long), M_INTRNG, > @@ -312,18 +312,18 @@ intr_ipi_setup_counters(const char *name) > mtx_lock(&isrc_table_lock); >=20 > /* > - * We should never have a problem finding mp_maxid + 1 = contiguous > - * counters, in practice. Interrupts will be allocated = sequentially > - * during boot, so the array should fill from low to high index. = Once > - * reserved, the IPI counters will never be released. Similarly, = we > - * will not need to allocate more IPIs once the system is = running. > + * We should never have a problem finding MAXCPU contiguous = counters, > + * in practice. Interrupts will be allocated sequentially during = boot, > + * so the array should fill from low to high index. Once = reserved, the > + * IPI counters will never be released. Similarly, we will not = need to > + * allocate more IPIs once the system is running. > */ > - bit_ffc_area(intrcnt_bitmap, nintrcnt, mp_maxid + 1, &index); > + bit_ffc_area(intrcnt_bitmap, nintrcnt, MAXCPU, &index); > if (index =3D=3D -1) > panic("Failed to allocate %d counters. Array = exhausted?", > - mp_maxid + 1); > - bit_nset(intrcnt_bitmap, index, index + mp_maxid); > - for (i =3D 0; i < mp_maxid + 1; i++) { > + MAXCPU); > + bit_nset(intrcnt_bitmap, index, index + MAXCPU - 1); > + for (i =3D 0; i < MAXCPU; i++) { > snprintf(str, INTRNAME_LEN, "cpu%d:%s", i, name); > intrcnt_setname(str, index + i); > } Best regards, Zhenlei