1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

Don't make MJUMPAGESIZE equal to PAGE_SIZE unconditionally.

When PAGE_SIZE is 16K, MJUMPAGESIZE equals MJUM16BYTES and
causes build breakages.
For PAGE_SIZE < 2K, define MJUMPAGESIZE as MCLBYTES.
For PAGE_SIZE > 8K, define MJUMPAGESIZE as 8K.
Everywhere inbetween, define MJUMPAGESIZE as PAGE_SIZE.

Thus MCLBYTES <= MJUMPAGESIZE <= 8KB.
This commit is contained in:
Marcel Moolenaar 2009-11-23 23:23:05 +00:00
parent 0cdc14c810
commit a78fb6f93d
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=199723

View File

@ -144,7 +144,14 @@
#define MCLBYTES (1 << MCLSHIFT) /* size of an mbuf cluster */
#define MJUMPAGESIZE PAGE_SIZE /* jumbo cluster 4k */
#if PAGE_SIZE < 2048
#define MJUMPAGESIZE MCLBYTES
#elif PAGE_SIZE <= 8192
#define MJUMPAGESIZE PAGE_SIZE
#else
#define MJUMPAGESIZE (8 * 1024)
#endif
#define MJUM9BYTES (9 * 1024) /* jumbo cluster 9k */
#define MJUM16BYTES (16 * 1024) /* jumbo cluster 16k */