Function report |
Source Code:block\blk-cgroup.c |
Create Date:2022-07-28 17:40:51 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Scale the accumulated delay based on how long it has been since we updated* the delay. We only call this when we are adding delay, in case it's been a* while since we added delay, and when we are checking to see if we need to
Proto:static void blkcg_scale_delay(struct blkcg_gq *blkg, u64 now)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
struct blkcg_gq * | blkg | |
u64 | now |
1515 | old = atomic64_read( & delay_start) |
1530 | If time_before64(old + NSEC_PER_SEC, now) && atomic64_cmpxchg( & delay_start, old, now) == old Then |
1532 | cur = atomic64_read( & delay_nsec) |
1533 | sub = min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u64, last_delay, now - old) |
1534 | cur_use = atomic_read( & use_delay) |
1540 | If cur_use < last_use Then sub = max_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u64, sub, last_delay >> 1) |
1549 | If Value for the false possibility is greater at compile time(cur < sub) Then |
1550 | atomic64_set( & delay_nsec, 0) |
1551 | last_delay = 0 |
1552 | Else |
1553 | atomic64_sub(sub, & delay_nsec) |
1554 | last_delay = cur - sub |
Name | Describe |
---|---|
blkcg_maybe_throttle_blkg | This is called when we want to actually walk up the hierarchy and check to* see if we need to throttle, and then actually throttle if there is some* accumulated delay. This should only be called upon return to user space so |
blkcg_add_delay | lkcg_add_delay - add delay to this blkg*@blkg: blkg of interest*@now: the current time in nanoseconds*@delta: how many nanoseconds of delay to add* Charge @delta to the blkg's current delay accumulation. This is used to |
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 |