subr_devstat.c (41153) | subr_devstat.c (41193) |
---|---|
1/* 2 * Copyright (c) 1997, 1998 Kenneth D. Merry. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * | 1/* 2 * Copyright (c) 1997, 1998 Kenneth D. Merry. 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26 * SUCH DAMAGE. 27 * |
28 * $Id: subr_devstat.c,v 1.4 1998/10/14 20:44:05 ken Exp $ | 28 * $Id: subr_devstat.c,v 1.5 1998/11/14 21:58:51 wollman Exp $ |
29 */ 30 31#include <sys/param.h> 32#include <sys/kernel.h> 33#include <sys/systm.h> 34#include <sys/time.h> 35#include <sys/types.h> 36#include <sys/sysctl.h> --- 135 unchanged lines hidden (view full) --- 172 */ 173 if (ds->busy_count == 0) { 174 /* Calculate how long we were busy */ 175 busy_time = ds->last_comp_time; 176 timevalsub(&busy_time, &ds->start_time); 177 178 /* Add our busy time to the total busy time. */ 179 timevaladd(&ds->busy_time, &busy_time); | 29 */ 30 31#include <sys/param.h> 32#include <sys/kernel.h> 33#include <sys/systm.h> 34#include <sys/time.h> 35#include <sys/types.h> 36#include <sys/sysctl.h> --- 135 unchanged lines hidden (view full) --- 172 */ 173 if (ds->busy_count == 0) { 174 /* Calculate how long we were busy */ 175 busy_time = ds->last_comp_time; 176 timevalsub(&busy_time, &ds->start_time); 177 178 /* Add our busy time to the total busy time. */ 179 timevaladd(&ds->busy_time, &busy_time); |
180 } 181 /* 182 * XXX KDM this is temporarily disabled to avoid causing 183 * unsophisticated users to panic. There are unfixed bugs in the 184 * wd driver that will set off this error message. 185 */ 186#if 0 187 else if (ds->busy_count < 0) | 180 } else if (ds->busy_count < 0) |
188 printf("devstat_end_transaction: HELP!! busy_count " 189 "for %s%d is < 0 (%d)!\n", ds->device_name, 190 ds->unit_number, ds->busy_count); | 181 printf("devstat_end_transaction: HELP!! busy_count " 182 "for %s%d is < 0 (%d)!\n", ds->device_name, 183 ds->unit_number, ds->busy_count); |
191#endif | |
192} 193 194/* 195 * This is the sysctl handler for the devstat package. The data pushed out 196 * on the kern.devstat.all sysctl variable consists of the current devstat 197 * generation number, and then an array of devstat structures, one for each 198 * device in the system. 199 * --- 56 unchanged lines hidden --- | 184} 185 186/* 187 * This is the sysctl handler for the devstat package. The data pushed out 188 * on the kern.devstat.all sysctl variable consists of the current devstat 189 * generation number, and then an array of devstat structures, one for each 190 * device in the system. 191 * --- 56 unchanged lines hidden --- |