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

1 // SPDX-License-Identifier: GPL-2.0
42 device = dasd_device_from_devindex((unsigned long) v - 1); in dasd_devices_show()
45 if (device->block) in dasd_devices_show()
46 block = device->block; in dasd_devices_show()
52 seq_printf(m, "%s", dev_name(&device->cdev->dev)); in dasd_devices_show()
54 if (device->discipline != NULL) in dasd_devices_show()
55 seq_printf(m, "(%s)", device->discipline->name); in dasd_devices_show()
59 if (block->gdp) in dasd_devices_show()
61 MAJOR(disk_devt(block->gdp)), in dasd_devices_show()
62 MINOR(disk_devt(block->gdp))); in dasd_devices_show()
66 if (block->gdp) in dasd_devices_show()
67 seq_printf(m, " is %-8s", block->gdp->disk_name); in dasd_devices_show()
71 substr = (device->features & DASD_FEATURE_READONLY) ? "(ro)" : " "; in dasd_devices_show()
74 switch (device->state) { in dasd_devices_show()
90 if (dasd_check_blocksize(block->bp_block)) in dasd_devices_show()
91 seq_printf(m, "n/f "); in dasd_devices_show()
95 block->bp_block, block->blocks, in dasd_devices_show()
96 ((block->bp_block >> 9) * in dasd_devices_show()
97 block->blocks) >> 11); in dasd_devices_show()
106 seq_printf(m, "\n"); in dasd_devices_show()
145 if (device->block) in dasd_stats_all_block_on()
146 rc = dasd_profile_on(&device->block->profile); in dasd_stats_all_block_on()
163 if (device->block) in dasd_stats_all_block_off()
164 dasd_profile_off(&device->block->profile); in dasd_stats_all_block_off()
178 if (device->block) in dasd_stats_all_block_reset()
179 dasd_profile_reset(&device->block->profile); in dasd_stats_all_block_reset()
184 static void dasd_statistics_array(struct seq_file *m, unsigned int *array, int factor) in dasd_statistics_array() argument
189 seq_printf(m, "%7d ", array[i] / factor); in dasd_statistics_array()
191 seq_putc(m, '\n'); in dasd_statistics_array()
193 seq_putc(m, '\n'); in dasd_statistics_array()
201 int factor; in dasd_stats_proc_show() local
207 seq_printf(m, "Statistics are off - they might be " in dasd_stats_proc_show()
209 "/proc/dasd/statistics'\n"); in dasd_stats_proc_show()
214 for (factor = 1; (prof->dasd_io_reqs / factor) > 9999999; in dasd_stats_proc_show()
215 factor *= 10); in dasd_stats_proc_show()
217 seq_printf(m, "%d dasd I/O requests\n", prof->dasd_io_reqs); in dasd_stats_proc_show()
218 seq_printf(m, "with %u sectors(512B each)\n", in dasd_stats_proc_show()
219 prof->dasd_io_sects); in dasd_stats_proc_show()
220 seq_printf(m, "Scale Factor is %d\n", factor); in dasd_stats_proc_show()
224 " _16k _32k _64k 128k\n"); in dasd_stats_proc_show()
228 " __1G __2G __4G " " _>4G\n"); in dasd_stats_proc_show()
230 seq_printf(m, "Histogram of sizes (512B secs)\n"); in dasd_stats_proc_show()
231 dasd_statistics_array(m, prof->dasd_io_secs, factor); in dasd_stats_proc_show()
232 seq_printf(m, "Histogram of I/O times (microseconds)\n"); in dasd_stats_proc_show()
233 dasd_statistics_array(m, prof->dasd_io_times, factor); in dasd_stats_proc_show()
234 seq_printf(m, "Histogram of I/O times per sector\n"); in dasd_stats_proc_show()
235 dasd_statistics_array(m, prof->dasd_io_timps, factor); in dasd_stats_proc_show()
236 seq_printf(m, "Histogram of I/O time till ssch\n"); in dasd_stats_proc_show()
237 dasd_statistics_array(m, prof->dasd_io_time1, factor); in dasd_stats_proc_show()
238 seq_printf(m, "Histogram of I/O time between ssch and irq\n"); in dasd_stats_proc_show()
239 dasd_statistics_array(m, prof->dasd_io_time2, factor); in dasd_stats_proc_show()
241 "and irq per sector\n"); in dasd_stats_proc_show()
242 dasd_statistics_array(m, prof->dasd_io_time2ps, factor); in dasd_stats_proc_show()
243 seq_printf(m, "Histogram of I/O time between irq and end\n"); in dasd_stats_proc_show()
244 dasd_statistics_array(m, prof->dasd_io_time3, factor); in dasd_stats_proc_show()
245 seq_printf(m, "# of req in chanq at enqueuing (1..32) \n"); in dasd_stats_proc_show()
246 dasd_statistics_array(m, prof->dasd_io_nr_req, factor); in dasd_stats_proc_show()
249 seq_printf(m, "Statistics are not activated in this kernel\n"); in dasd_stats_proc_show()
292 "on\n"); in dasd_stats_proc_write()
299 "off\n"); in dasd_stats_proc_write()
306 pr_info("The statistics have been reset\n"); in dasd_stats_proc_write()
312 rc = -EINVAL; in dasd_stats_proc_write()
313 pr_warn("%s is not a supported value for /proc/dasd/statistics\n", str); in dasd_stats_proc_write()
318 pr_warn("/proc/dasd/statistics: is not activated in this kernel\n"); in dasd_stats_proc_write()
332 * Create dasd proc-fs entries.
333 * In case creation failed, cleanup and return -ENOENT.
359 return -ENOENT; in dasd_proc_init()