Lines 880-885
cam_iosched_sysctl_latencies(SYSCTL_HANDLER_ARGS)
Link Here
|
880 |
return (error); |
880 |
return (error); |
881 |
} |
881 |
} |
882 |
|
882 |
|
|
|
883 |
static int |
884 |
cam_iosched_quanta_sysctl(SYSCTL_HANDLER_ARGS) |
885 |
{ |
886 |
int *quanta; |
887 |
int error, value; |
888 |
|
889 |
quanta = (unsigned *)arg1; |
890 |
value = *quanta; |
891 |
|
892 |
error = sysctl_handle_int(oidp, (int *)&value, 0, req); |
893 |
if ((error != 0) || (req->newptr == NULL)) |
894 |
return (error); |
895 |
|
896 |
if (value < 1 || value > hz) { |
897 |
printf("cam iosched: Quanta has to be above 0 and below %d (kern.hz).\n", hz); |
898 |
return (EINVAL); |
899 |
} |
900 |
*quanta = value; |
901 |
|
902 |
return (0); |
903 |
} |
904 |
|
883 |
static void |
905 |
static void |
884 |
cam_iosched_iop_stats_sysctl_init(struct cam_iosched_softc *isc, struct iop_stats *ios, char *name) |
906 |
cam_iosched_iop_stats_sysctl_init(struct cam_iosched_softc *isc, struct iop_stats *ios, char *name) |
885 |
{ |
907 |
{ |
Lines 1101-1109
void cam_iosched_sysctl_init(struct cam_iosched_softc *isc,
Link Here
|
1101 |
&isc->read_bias, 100, |
1123 |
&isc->read_bias, 100, |
1102 |
"How biased towards read should we be independent of limits"); |
1124 |
"How biased towards read should we be independent of limits"); |
1103 |
|
1125 |
|
1104 |
SYSCTL_ADD_INT(ctx, n, |
1126 |
SYSCTL_ADD_PROC(ctx, n, |
1105 |
OID_AUTO, "quanta", CTLFLAG_RW, |
1127 |
OID_AUTO, "quanta", CTLTYPE_UINT | CTLFLAG_RW, |
1106 |
&isc->quanta, 200, |
1128 |
&isc->quanta, 0, cam_iosched_quanta_sysctl, "I", |
1107 |
"How many quanta per second do we slice the I/O up into"); |
1129 |
"How many quanta per second do we slice the I/O up into"); |
1108 |
|
1130 |
|
1109 |
SYSCTL_ADD_INT(ctx, n, |
1131 |
SYSCTL_ADD_INT(ctx, n, |
1110 |
- |
|
|