Date: Mon, 26 Jun 2006 06:04:00 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 100030 for review Message-ID: <200606260604.k5Q640jm022626@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=100030 Change 100030 by jb@jb_freebsd2 on 2006/06/26 06:03:26 Allow the state creation function to be called for anon states. For the time being, use only high level cyclic timers. The low level ones come from software interrupts and the current cyclic implementation causes scheduler instability when using those. The long term solution may well be to only have one cyclic timer level since FreeBSD isn't built on top of this timer design. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_state.c#10 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_state.c#10 (text+ko) ==== @@ -191,7 +191,7 @@ major_t major; #else cred_t *cr = NULL; - int m = minor(dev); + int m = 0; #endif char c[30]; dtrace_state_t *state; @@ -212,8 +212,10 @@ state = ddi_get_soft_state(dtrace_softstate, m); #else - if (dev != NULL) + if (dev != NULL) { cr = dev->si_cred; + m = minor(dev); + } /* Allocate memory for the state. */ state = malloc(sizeof(dtrace_state_t), M_DTRACE, M_WAITOK | M_ZERO); @@ -710,6 +712,8 @@ hdlr.cyh_func = (cyc_func_t)dtrace_state_clean; hdlr.cyh_arg = state; hdlr.cyh_level = CY_LOW_LEVEL; +/* XXX CY_LOW_LEVEL requires use of the scheduler on FreeBSD and this ends in tears for anon enablings. */ +hdlr.cyh_level = CY_HIGH_LEVEL; when.cyt_when = 0; when.cyt_interval = opt[DTRACEOPT_CLEANRATE]; @@ -719,6 +723,8 @@ hdlr.cyh_func = (cyc_func_t)dtrace_state_deadman; hdlr.cyh_arg = state; hdlr.cyh_level = CY_LOW_LEVEL; +/* XXX CY_LOW_LEVEL requires use of the scheduler on FreeBSD and this ends in tears for anon enablings. */ +hdlr.cyh_level = CY_HIGH_LEVEL; when.cyt_when = 0; when.cyt_interval = dtrace_deadman_interval;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606260604.k5Q640jm022626>