From nobody Wed Aug 24 17:35:59 2022 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 4MCYCz5Z8hz4ZRLZ; Wed, 24 Aug 2022 17:35:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (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 "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MCYCz4vtfz3DZl; Wed, 24 Aug 2022 17:35:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661362559; 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; bh=rvuF6HK2556rWDIMm1M5tEOkHFg0auVVMTOVQbDoZpw=; b=E6i/nRiZ8mebcT9DTJ4/xlVyfv/CYh5oJeyE0lrsZ6of/uQl4KXuYIGAGJflg+KPVk4Z4z suZLOki3bC0KrsaGzWYuQTbm4OyPmfvf276goUmYXtAdfkGr0X4xeOTadT/PAL8R9AOdgK QUa6nRNOu1dR9lrkJK/eN9jP9NjgOtCL53E4fnFbzAl5oWVilgRrMn6pByluyXEYSU7bbB Yyz/7+z6j7bdLFXxdIrIQlHgpSe/qds5c4IECCBrm0KoRmzUbyrA1VoYahC1twPx5RM0Np 2P8e2GkFAPzM5BrP2paV8EcNk/9ViXQuWRkcopL7MvwVas7iG56uSG+WtzS7qA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MCYCz3dGSzHJs; Wed, 24 Aug 2022 17:35:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 27OHZx8q013242; Wed, 24 Aug 2022 17:35:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27OHZxPH013241; Wed, 24 Aug 2022 17:35:59 GMT (envelope-from git) Date: Wed, 24 Aug 2022 17:35:59 GMT Message-Id: <202208241735.27OHZxPH013241@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 840327e5ddf3 - main - mbuf: Don't support PAGE_SIZE < 4K 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 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 840327e5ddf304c1a15949c23b7806ec10d32c2b Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1661362559; 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; bh=rvuF6HK2556rWDIMm1M5tEOkHFg0auVVMTOVQbDoZpw=; b=xYK8sebmzYjetbJc1wCQyvfKqI9XKLfOXn4MDINou2nhXbG4tijexwpil47dQA1a2Onpws Y6FPuDp3VB+uq7Lwymww6LQXgYP/zxbTc26gE2+nTjO3EbJp0yCKakUEylP/Xe9NHEDE+A kCX61hB1WFy+r0qZmfUQJihjzKgxRozjLG3Lf4/8Sse+/4XOr6esG/V5pJHGHEPqrmFiid LutQ+Q3PsGnPSNxo0B7RMk3W/Gj93T26ELy1cFrYXJUQJ5Ou9G0RykNZD6ERLDZQ0WJ3T9 Eg98XM3fC4mLEf+tQrQ/0qVoVSd5vOLD+kzgJ6Nzqt/vokkaHQfsW4LLyqJ65Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1661362559; a=rsa-sha256; cv=none; b=WjJVrNcW1kzrKussivyLPeD2HWLgnrub1SSdf5P+TcErSue6DQvo7kqUpeqYM9dlCCtGYd Xu+/miU8/MAHutlkfzRc2C+2LoWKvu43A68MfokrI1Y0To00YYrlp9hRpYwJLjwIWB7VNw Oc1BzzXB91fQLARlg3xsLY8nV2ES8yriBY9zcshOB11/ouDN2oOecUlzZlg9G9xwZuO0cS KgVoBf8IUoeCcTQTolFwPpSAdc2TUpBwFbqmcTDOyXago02QO+AW+yiG6mw1N45ZT2xZ3p 433wdU6KcucSd/KBIGq246IJkZWTt//lxud+K29I0KofXuvm+JkDq6HSP0BrfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=840327e5ddf304c1a15949c23b7806ec10d32c2b commit 840327e5ddf304c1a15949c23b7806ec10d32c2b Author: Brooks Davis AuthorDate: 2022-08-24 17:34:07 +0000 Commit: Brooks Davis CommitDate: 2022-08-24 17:34:07 +0000 mbuf: Don't support PAGE_SIZE < 4K The Vax supported such things, but FreeBSD does not. This further implies that MJUMPAGESIZE > MCLBYTES so assert this and remove code handling them being equal. Reviewed by: kp, imp, jhb Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D36320 --- sys/kern/kern_mbuf.c | 3 +++ sys/sys/mbuf.h | 6 ------ sys/sys/param.h | 4 +--- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c index 1c0c5624b6d7..a302545192fe 100644 --- a/sys/kern/kern_mbuf.c +++ b/sys/kern/kern_mbuf.c @@ -63,6 +63,9 @@ __FBSDID("$FreeBSD$"); #include #include +_Static_assert(MJUMPAGESIZE > MCLBYTES, + "Cluster must be smaller than a jumbo page"); + /* * In FreeBSD, Mbufs and Mbuf Clusters are allocated from UMA * Zones. diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index 9e50a640eac0..601b1e92c172 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -894,11 +894,9 @@ m_gettype(int size) case MCLBYTES: type = EXT_CLUSTER; break; -#if MJUMPAGESIZE != MCLBYTES case MJUMPAGESIZE: type = EXT_JUMBOP; break; -#endif case MJUM9BYTES: type = EXT_JUMBO9; break; @@ -944,11 +942,9 @@ m_getzone(int size) case MCLBYTES: zone = zone_clust; break; -#if MJUMPAGESIZE != MCLBYTES case MJUMPAGESIZE: zone = zone_jumbop; break; -#endif case MJUM9BYTES: zone = zone_jumbo9; break; @@ -1068,11 +1064,9 @@ m_cljset(struct mbuf *m, void *cl, int type) case EXT_CLUSTER: size = MCLBYTES; break; -#if MJUMPAGESIZE != MCLBYTES case EXT_JUMBOP: size = MJUMPAGESIZE; break; -#endif case EXT_JUMBO9: size = MJUM9BYTES; break; diff --git a/sys/sys/param.h b/sys/sys/param.h index 59516c139136..6254b73f76a6 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -200,9 +200,7 @@ #define MCLBYTES (1 << MCLSHIFT) /* size of an mbuf cluster */ -#if PAGE_SIZE < 2048 -#define MJUMPAGESIZE MCLBYTES -#elif PAGE_SIZE <= 8192 +#if PAGE_SIZE <= 8192 #define MJUMPAGESIZE PAGE_SIZE #else #define MJUMPAGESIZE (8 * 1024)