Date: Mon, 26 Jun 2006 05:37:24 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 100025 for review Message-ID: <200606260537.k5Q5bOgw020000@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606260537.k5Q5bOgw020000>