Date: Fri, 14 Sep 2007 19:17:39 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 126407 for review Message-ID: <200709141917.l8EJHdST023519@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=126407 Change 126407 by kmacy@kmacy_home:ethng on 2007/09/14 19:17:23 make physically contigous jumbo frames a boot time option defaulting to on Affected files ... .. //depot/projects/ethng/src/sys/kern/kern_mbuf.c#4 edit Differences ... ==== //depot/projects/ethng/src/sys/kern/kern_mbuf.c#4 (text+ko) ==== @@ -99,6 +99,8 @@ int nmbjumbop; /* limits number of page size jumbo clusters */ int nmbjumbo9; /* limits number of 9k jumbo clusters */ int nmbjumbo16; /* limits number of 16k jumbo clusters */ +int jumbo_phys_contig = 1; /* jumbo frames are physically contiguous */ + struct mbstat mbstat; static void @@ -140,7 +142,8 @@ "Maximum number of mbuf 16k jumbo clusters allowed"); SYSCTL_STRUCT(_kern_ipc, OID_AUTO, mbstat, CTLFLAG_RD, &mbstat, mbstat, "Mbuf general information and statistics"); - +SYSCTL_INT(_kern_ipc, OID_AUTO, jumbo_phys_contig, CTLFLAG_RW, &jumbo_phys_contig, 1, + "jumbo frames are physically contiguous"); /* * Zones from which we allocate. */ @@ -227,7 +230,8 @@ if (nmbjumbo9 > 0) uma_zone_set_max(zone_jumbo9, nmbjumbo9); - uma_zone_set_contig(zone_jumbo9); + if (jumbo_phys_contig) + uma_zone_set_contig(zone_jumbo9); zone_jumbo16 = uma_zcreate(MBUF_JUMBO16_MEM_NAME, MJUM16BYTES, mb_ctor_clust, mb_dtor_clust, @@ -240,7 +244,8 @@ if (nmbjumbo16 > 0) uma_zone_set_max(zone_jumbo16, nmbjumbo16); - uma_zone_set_contig(zone_jumbo16); + if (jumbo_phys_contig) + uma_zone_set_contig(zone_jumbo16); zone_ext_refcnt = uma_zcreate(MBUF_EXTREFCNT_MEM_NAME, sizeof(u_int), NULL, NULL,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200709141917.l8EJHdST023519>