From owner-p4-projects@FreeBSD.ORG Thu Sep 27 22:10:44 2007 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 3E2FB16A41A; Thu, 27 Sep 2007 22:10:44 +0000 (UTC) Delivered-To: perforce@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7D4516A420 for ; Thu, 27 Sep 2007 22:10:43 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id C109713C458 for ; Thu, 27 Sep 2007 22:10:43 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.1/8.14.1) with ESMTP id l8RMAh6f081578 for ; Thu, 27 Sep 2007 22:10:43 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.14.1/8.14.1/Submit) id l8RMAhl7081575 for perforce@freebsd.org; Thu, 27 Sep 2007 22:10:43 GMT (envelope-from jb@freebsd.org) Date: Thu, 27 Sep 2007 22:10:43 GMT Message-Id: <200709272210.l8RMAhl7081575@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 126889 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: Thu, 27 Sep 2007 22:10:44 -0000 http://perforce.freebsd.org/chv.cgi?CH=126889 Change 126889 by jb@jb_freebsd1 on 2007/09/27 22:09:44 Use the global variable that mi_startup() set to the size of the extended thread structure size. This include struct td_sched and struct kdtrace_thread, both of which are otherwise opaque to the thread handling code. There is a remaining issue regarding the DTrace thread-specific variables that need to be zeroed on allocation. That'll require another #define and the assumption that they are at the beginning of struct kdtrace_thread. Affected files ... .. //depot/projects/dtrace/src/sys/kern/kern_thread.c#12 edit Differences ... ==== //depot/projects/dtrace/src/sys/kern/kern_thread.c#12 (text+ko) ==== @@ -243,7 +243,7 @@ mtx_init(&tid_lock, "TID lock", NULL, MTX_DEF); tid_unrhdr = new_unrhdr(PID_MAX + 1, INT_MAX, &tid_lock); - thread_zone = uma_zcreate("THREAD", sched_sizeof_thread(), + thread_zone = uma_zcreate("THREAD", kdtrace_thread_size, thread_ctor, thread_dtor, thread_init, thread_fini, 16 - 1, 0); #ifdef KSE