Lines Matching +full:n +full:- +full:factor

1 // SPDX-License-Identifier: GPL-2.0
37 device = dasd_device_from_devindex((unsigned long) v - 1); in dasd_devices_show()
40 if (device->block) in dasd_devices_show()
41 block = device->block; in dasd_devices_show()
47 seq_printf(m, "%s", dev_name(&device->cdev->dev)); in dasd_devices_show()
49 if (device->discipline != NULL) in dasd_devices_show()
50 seq_printf(m, "(%s)", device->discipline->name); in dasd_devices_show()
54 if (block->gdp) in dasd_devices_show()
56 MAJOR(disk_devt(block->gdp)), in dasd_devices_show()
57 MINOR(disk_devt(block->gdp))); in dasd_devices_show()
61 if (block->gdp) in dasd_devices_show()
62 seq_printf(m, " is %-8s", block->gdp->disk_name); in dasd_devices_show()
66 substr = (device->features & DASD_FEATURE_READONLY) ? "(ro)" : " "; in dasd_devices_show()
69 switch (device->state) { in dasd_devices_show()
85 if (dasd_check_blocksize(block->bp_block)) in dasd_devices_show()
86 seq_printf(m, "n/f "); in dasd_devices_show()
90 block->bp_block, block->blocks, in dasd_devices_show()
91 ((block->bp_block >> 9) * in dasd_devices_show()
92 block->blocks) >> 11); in dasd_devices_show()
101 seq_printf(m, "\n"); in dasd_devices_show()
140 if (device->block) in dasd_stats_all_block_on()
141 rc = dasd_profile_on(&device->block->profile); in dasd_stats_all_block_on()
158 if (device->block) in dasd_stats_all_block_off()
159 dasd_profile_off(&device->block->profile); in dasd_stats_all_block_off()
173 if (device->block) in dasd_stats_all_block_reset()
174 dasd_profile_reset(&device->block->profile); in dasd_stats_all_block_reset()
179 static void dasd_statistics_array(struct seq_file *m, unsigned int *array, int factor) in dasd_statistics_array() argument
184 seq_printf(m, "%7d ", array[i] / factor); in dasd_statistics_array()
186 seq_putc(m, '\n'); in dasd_statistics_array()
188 seq_putc(m, '\n'); in dasd_statistics_array()
196 int factor; in dasd_stats_proc_show() local
202 seq_printf(m, "Statistics are off - they might be " in dasd_stats_proc_show()
204 "/proc/dasd/statistics'\n"); in dasd_stats_proc_show()
209 for (factor = 1; (prof->dasd_io_reqs / factor) > 9999999; in dasd_stats_proc_show()
210 factor *= 10); in dasd_stats_proc_show()
212 seq_printf(m, "%d dasd I/O requests\n", prof->dasd_io_reqs); in dasd_stats_proc_show()
213 seq_printf(m, "with %u sectors(512B each)\n", in dasd_stats_proc_show()
214 prof->dasd_io_sects); in dasd_stats_proc_show()
215 seq_printf(m, "Scale Factor is %d\n", factor); in dasd_stats_proc_show()
219 " _16k _32k _64k 128k\n"); in dasd_stats_proc_show()
223 " __1G __2G __4G " " _>4G\n"); in dasd_stats_proc_show()
225 seq_printf(m, "Histogram of sizes (512B secs)\n"); in dasd_stats_proc_show()
226 dasd_statistics_array(m, prof->dasd_io_secs, factor); in dasd_stats_proc_show()
227 seq_printf(m, "Histogram of I/O times (microseconds)\n"); in dasd_stats_proc_show()
228 dasd_statistics_array(m, prof->dasd_io_times, factor); in dasd_stats_proc_show()
229 seq_printf(m, "Histogram of I/O times per sector\n"); in dasd_stats_proc_show()
230 dasd_statistics_array(m, prof->dasd_io_timps, factor); in dasd_stats_proc_show()
231 seq_printf(m, "Histogram of I/O time till ssch\n"); in dasd_stats_proc_show()
232 dasd_statistics_array(m, prof->dasd_io_time1, factor); in dasd_stats_proc_show()
233 seq_printf(m, "Histogram of I/O time between ssch and irq\n"); in dasd_stats_proc_show()
234 dasd_statistics_array(m, prof->dasd_io_time2, factor); in dasd_stats_proc_show()
236 "and irq per sector\n"); in dasd_stats_proc_show()
237 dasd_statistics_array(m, prof->dasd_io_time2ps, factor); in dasd_stats_proc_show()
238 seq_printf(m, "Histogram of I/O time between irq and end\n"); in dasd_stats_proc_show()
239 dasd_statistics_array(m, prof->dasd_io_time3, factor); in dasd_stats_proc_show()
240 seq_printf(m, "# of req in chanq at enqueuing (1..32) \n"); in dasd_stats_proc_show()
241 dasd_statistics_array(m, prof->dasd_io_nr_req, factor); in dasd_stats_proc_show()
244 seq_printf(m, "Statistics are not activated in this kernel\n"); in dasd_stats_proc_show()
287 "on\n"); in dasd_stats_proc_write()
294 "off\n"); in dasd_stats_proc_write()
301 pr_info("The statistics have been reset\n"); in dasd_stats_proc_write()
307 rc = -EINVAL; in dasd_stats_proc_write()
308 pr_warn("%s is not a supported value for /proc/dasd/statistics\n", str); in dasd_stats_proc_write()
313 pr_warn("/proc/dasd/statistics: is not activated in this kernel\n"); in dasd_stats_proc_write()
327 * Create dasd proc-fs entries.
328 * In case creation failed, cleanup and return -ENOENT.
354 return -ENOENT; in dasd_proc_init()