Date: Sun, 1 Apr 2007 04:43:28 GMT From: Kip Macy <kmacy@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 117052 for review Message-ID: <200704010443.l314hS82077282@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=117052 Change 117052 by kmacy@kmacy_vt-x:opentoe_init on 2007/04/01 04:43:00 mb_ctor_clust should not assume that all clusters come from the 2k cluster zone MFP4 after: 2 weeks Affected files ... .. //depot/projects/opentoe/sys/kern/kern_mbuf.c#2 edit Differences ... ==== //depot/projects/opentoe/sys/kern/kern_mbuf.c#2 (text+ko) ==== @@ -396,31 +396,36 @@ struct mbuf *m; u_int *refcnt; int type = 0; - + uma_zone_t zone; + #ifdef INVARIANTS trash_ctor(mem, size, arg, how); #endif + switch (size) { + case MCLBYTES: + type = EXT_CLUSTER; + zone = zone_clust; + break; +#if MJUMPAGESIZE != MCLBYTES + case MJUMPAGESIZE: + type = EXT_JUMBOP; + zone = zone_jumbop; + break; +#endif + case MJUM9BYTES: + type = EXT_JUMBO9; + zone = zone_jumbo9; + break; + case MJUM16BYTES: + type = EXT_JUMBO16; + zone = zone_jumbo16; + break; + default: + panic("unknown cluster size"); + break; + } m = (struct mbuf *)arg; if (m != NULL) { - switch (size) { - case MCLBYTES: - type = EXT_CLUSTER; - break; -#if MJUMPAGESIZE != MCLBYTES - case MJUMPAGESIZE: - type = EXT_JUMBOP; - break; -#endif - case MJUM9BYTES: - type = EXT_JUMBO9; - break; - case MJUM16BYTES: - type = EXT_JUMBO16; - break; - default: - panic("unknown cluster size"); - break; - } m->m_ext.ext_buf = (caddr_t)mem; m->m_data = m->m_ext.ext_buf; m->m_flags |= M_EXT; @@ -428,10 +433,10 @@ m->m_ext.ext_args = NULL; m->m_ext.ext_size = size; m->m_ext.ext_type = type; - m->m_ext.ref_cnt = uma_find_refcnt(zone_clust, mem); + m->m_ext.ref_cnt = uma_find_refcnt(zone, mem); *m->m_ext.ref_cnt = 1; } else { - refcnt = uma_find_refcnt(zone_clust, mem); + refcnt = uma_find_refcnt(zone, mem); *refcnt = 1; } return (0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200704010443.l314hS82077282>