From owner-p4-projects@FreeBSD.ORG Sun Apr 1 04:43:32 2007 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id AD9E216A405; Sun, 1 Apr 2007 04:43:31 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E44ED16A406 for ; Sun, 1 Apr 2007 04:43:28 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [69.147.83.41]) by mx1.freebsd.org (Postfix) with ESMTP id 7D3DA13C45D for ; Sun, 1 Apr 2007 04:43:28 +0000 (UTC) (envelope-from kmacy@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.8/8.13.8) with ESMTP id l314hSDM077285 for ; Sun, 1 Apr 2007 04:43:28 GMT (envelope-from kmacy@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.8/8.13.8/Submit) id l314hS82077282 for perforce@freebsd.org; Sun, 1 Apr 2007 04:43:28 GMT (envelope-from kmacy@freebsd.org) Date: Sun, 1 Apr 2007 04:43:28 GMT Message-Id: <200704010443.l314hS82077282@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to kmacy@freebsd.org using -f From: Kip Macy To: Perforce Change Reviews Cc: Subject: PERFORCE change 117052 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 01 Apr 2007 04:43:32 -0000 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);