From owner-p4-projects@FreeBSD.ORG Mon Jun 26 05:37:25 2006 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 EDEFB16A404; Mon, 26 Jun 2006 05:37:24 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C3FE716A402 for ; Mon, 26 Jun 2006 05:37:24 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 800C643D7D for ; Mon, 26 Jun 2006 05:37:24 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k5Q5bO9L020003 for ; Mon, 26 Jun 2006 05:37:24 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k5Q5bOgw020000 for perforce@freebsd.org; Mon, 26 Jun 2006 05:37:24 GMT (envelope-from jb@freebsd.org) Date: Mon, 26 Jun 2006 05:37:24 GMT Message-Id: <200606260537.k5Q5bOgw020000@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 100025 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: Mon, 26 Jun 2006 05:37:25 -0000 http://perforce.freebsd.org/chv.cgi?CH=100025 Change 100025 by jb@jb_freebsd2 on 2006/06/26 05:37:23 The use of FreeBSD's semaphores here creates scheduler instability. This device needs a clean path from the timer interrupt. For the time being, since I'm only working on single processor systems, comment out the semaphore calls. When I get access to a multi-cpu machine, I'll need to implement a simple semaphore system for use here. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/kern/cyclic.c#4 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/kern/cyclic.c#4 (text+ko) ==== @@ -1006,7 +1006,9 @@ /* * We can now let the remove operation complete. */ +#ifdef DOODAD sema_post(&cpu->cyp_modify_wait); +#endif } /* @@ -1257,7 +1259,9 @@ */ if (nlev == CY_SOFT_LEVELS) { CYC_TRACE0(cpu, level, "resize-kick"); +#ifdef DOODAD sema_post(&cpu->cyp_modify_wait); +#endif } else { ASSERT(nlev < CY_SOFT_LEVELS); if (level != CY_LOW_LEVEL) { @@ -1434,7 +1438,9 @@ /* * Now block, waiting for the resize operation to complete. */ +#ifdef DOODAD sema_wait(&cpu->cyp_modify_wait); +#endif ASSERT(cpu->cyp_modify_levels == CY_SOFT_LEVELS); /* @@ -1875,8 +1881,10 @@ return (0); } +#ifdef DOODAD if (cpu->cyp_rpend != 0) sema_wait(&cpu->cyp_modify_wait); +#endif ASSERT(cpu->cyp_state == CYS_REMOVING); @@ -2140,7 +2148,9 @@ cpu->cyp_cpu = c; +#ifdef DOODAD sema_init(&cpu->cyp_modify_wait, 0, "cyclic modify"); +#endif cpu->cyp_size = 1; cpu->cyp_heap = kmem_zalloc(sizeof (cyc_index_t), KM_SLEEP); @@ -2221,7 +2231,9 @@ pc->cypc_buf = NULL; } +#ifdef DOODAD sema_destroy(&cpu->cyp_modify_wait); +#endif /* * Finally, clean up our remaining dynamic structures and NULL out