Function report |
Source Code:block\blk-iolatency.c |
Create Date:2022-07-28 17:45:33 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:iolatency_check_latencies
Proto:static void iolatency_check_latencies(struct iolatency_grp *iolat, u64 now)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
struct iolatency_grp * | iolat | |
u64 | now |
522 | blkg = lat_to_blkg(iolat) |
529 | latency_stat_init(iolat, & stat) |
531 | for_each_online_cpu(cpu) |
533 | s = per_cpu_ptr(stats, cpu) |
534 | latency_stat_sum(iolat, & stat, s) |
535 | latency_stat_init(iolat, s) |
537 | preempt_enable() |
540 | If Not parent Then Return |
545 | iolat_update_total_lat_avg(iolat, & stat) |
548 | If latency_sum_ok(iolat, & stat) && atomic_read( & Cookie to tell if we need to scale up or down. ) == DEFAULT_SCALE_COOKIE Then Return |
553 | spin_lock_irqsave( & lock, flags) |
555 | latency_stat_sum(iolat, & cur_stat, & stat) |
556 | Total io's from all of our children for the last summation. -= Our current number of IO's for the last summation. |
557 | Total io's from all of our children for the last summation. += latency_stat_samples(iolat, & cur_stat) |
560 | If Last time we adjusted the scale of everybody. >= now || now - Last time we adjusted the scale of everybody. < BLKIOLATENCY_MIN_ADJUST_TIME Then Go to out |
564 | If latency_sum_ok(iolat, & cur_stat) && latency_sum_ok(iolat, & stat) Then |
566 | If latency_stat_samples(iolat, & cur_stat) < BLKIOLATENCY_MIN_GOOD_SAMPLES Then Go to out |
569 | If The guy who actually changed the latency numbers. == iolat Then |
573 | Else if The latency that we missed. == 0 || The latency that we missed. >= min_lat_nsec Then |
576 | If Not The guy who actually changed the latency numbers. || The latency that we missed. > min_lat_nsec Then |
583 | latency_stat_init(iolat, & cur_stat) |
584 | out : |
585 | spin_unlock_irqrestore( & lock, flags) |
Name | Describe |
---|---|
blkcg_iolatency_done_bio |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |