PERFORCE change 100030 for review
John Birrell
jb at FreeBSD.org
Mon Jun 26 06:29:46 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=100030
Change 100030 by jb at 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;
More information about the p4-projects
mailing list