FreeBSD/sys/geom/sched/gs_rr.c
/*
 * Dump the scheduler status when writing to this sysctl variable.
 * XXX right now we only dump the status of the last instance created.
 * not a severe issue because this is only for debugging
 */
Dump the scheduler status when writing to this sysctl variable.
XXX right now we only dump the status of the last instance created.
not a severe issue because this is only for debugging
Dump the scheduler status when writing to this sysctl variable . XXX right now we only dump the status of the last instance created . not a severe issue because this is only for debugging
static int
gs_rr_sysctl_status(SYSCTL_HANDLER_ARGS)
{
        int error, val = 0;
	struct g_rr_softc *sc;
        error = sysctl_handle_int(oidp, &val, 0, req);
        if (error || !req->newptr )
                return (error);
        printf("called %s\n", __FUNCTION__);
	LIST_FOREACH(sc, &me.sc_head, sc_next) {
		int i, tot = 0;
		printf("--- sc %p active %p nqueues %d "
		    "callout %d in_flight %d ---\n",
		    sc, sc->sc_active, sc->sc_nqueues,
		    callout_active(&sc->sc_wait),
		    sc->sc_in_flight);
		for (i = 0; i < G_RR_HASH_SIZE; i++) {
			struct g_rr_queue *qp;
			LIST_FOREACH(qp, &sc->sc_hash[i], q_hash) {
				gs_rr_dump_q(qp, tot);
				tot++;
			}
		}
	}
        return (0);
}
static int gs_rr_sysctl_status ( SYSCTL_HANDLER_ARGS ) { int error , val = 0 ; struct g_rr_softc * sc ; error = sysctl_handle_int ( oidp , & val , 0 , req ) ; if ( error || ! req -> newptr ) return ( error ) ; printf ( " \n " , __FUNCTION__ ) ; LIST_FOREACH ( sc , & me . sc_head , sc_next ) { int i , tot = 0 ; printf ( " " " \n " , sc , sc -> sc_active , sc -> sc_nqueues , callout_active ( & sc -> sc_wait ) , sc -> sc_in_flight ) ; for ( i = 0 ; i < G_RR_HASH_SIZE ; i ++ ) { struct g_rr_queue * qp ; LIST_FOREACH ( qp , & sc -> sc_hash [ i ] , q_hash ) { gs_rr_dump_q ( qp , tot ) ; tot ++ ; } } } return ( 0 ) ; }
Dump the scheduler status when writing to this sysctl variable.
Dump the scheduler status when writing to this sysctl variable .