| Function report | 
| Source Code: block\blk-iocost.c | Create Date:2022-07-28 17:47:48 | 
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick | 
| home page | Tree | 
| Annotation kernel can get tool activity | Download SCCT | Chinese | 
Name:iocg_activate
Proto:static bool iocg_activate(struct ioc_gq *iocg, struct ioc_now *now)
Type:bool
Parameter:
| Type | Parameter | Name | 
|---|---|---|
| struct ioc_gq * | iocg | |
| struct ioc_now * | now | 
| 1038 | If Not list_empty - tests whether a list is empty*@head: the list to test. Then | 
| 1040 | cur_period = atomic64_read( & c'd each period ) | 
| 1043 | Return true | 
| 1047 | If see __propagate_active_weight() and current_hweight() for details Then Return false | 
| 1050 | spin_lock_irq( & lock) | 
| 1055 | cur_period = atomic64_read( & c'd each period ) | 
| 1056 | last_period = atomic64_read( & * The period this iocg was last active in. Used for deactivation * and invalidating `vtime`.) | 
| 1057 | atomic64_set( & * The period this iocg was last active in. Used for deactivation * and invalidating `vtime`., cur_period) | 
| 1060 | If Not list_empty - tests whether a list is empty*@head: the list to test. Then Go to succeed_unlock | 
| 1062 | When i > 0 cycle If Not list_empty - tests whether a list is empty*@head: the list to test. Then | 
| 1064 | Go to fail_unlock | 
| 1066 | If see __propagate_active_weight() and current_hweight() for details Then Go to fail_unlock | 
| 1080 | If last_period + max_period_delta < cur_period || time_before64(vtime, vmin) Then | 
| 1083 | atomic64_add(vmin - vtime, & done_vtime) | 
| 1092 | hweight_gen = atomic_read( & r lazy hweights ) - 1 | 
| 1094 | propagate_active_weight(iocg, weight, last_inuse ? : weight) | 
| 1097 | TRACE_IOCG_PATH(iocg_activate, iocg, now, last_period, cur_period, vtime) | 
| 1100 | last_vtime = vtime | 
| 1103 | running = IOC_RUNNING | 
| 1104 | ioc_start_period(ioc, now) | 
| 1107 | succeed_unlock : | 
| 1108 | spin_unlock_irq( & lock) | 
| 1109 | Return true | 
| 1111 | fail_unlock : | 
| 1112 | spin_unlock_irq( & lock) | 
| 1113 | Return false | 
| Name | Describe | 
|---|---|
| ioc_rqos_throttle | 
| 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 |