Function report |
Source Code:block\blk-iocost.c |
Create Date:2022-07-28 17:48:49 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:ioc_rqos_throttle
Proto:static void ioc_rqos_throttle(struct rq_qos *rqos, struct bio *bio)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
struct rq_qos * | rqos | |
struct bio * | bio |
1682 | ioc = accessors and helpers |
1683 | iocg = blkg_to_iocg(blkg) |
1690 | If Not enabled || Not this iocg's depth in the hierarchy and ancestors including self Then Return |
1694 | If Not iocg_activate(iocg, & now) Then Return |
1698 | abs_cost = calc_vtime_cost(bio, iocg, false) |
1699 | If Not abs_cost Then Return |
1702 | to detect randio = bio_end_sector(bio) |
1705 | current_hweight(iocg, & hw_active, & hw_inuse) |
1707 | If hw_inuse < hw_active && time_after_eq64(vtime + inuse_margin_vtime, vnow) Then |
1709 | TRACE_IOCG_PATH(inuse_reset, iocg, & now, inuse, weight, hw_inuse, hw_active) |
1711 | spin_lock_irq( & lock) |
1712 | propagate_active_weight(iocg, weight, weight) |
1713 | spin_unlock_irq( & lock) |
1714 | current_hweight(iocg, & hw_active, & hw_inuse) |
1717 | cost = Scale @abs_cost to the inverse of @hw_inuse. The lower the hierarchical* weight, the more expensive each IO. Must round up. |
1727 | iocg_commit_bio(iocg, bio, cost) |
1728 | Return |
1742 | atomic64_add(abs_cost, & abs_vdebt) |
1746 | Return |
1762 | spin_lock_irq( & lock) |
1776 | init_waitqueue_func_entry( & wait, iocg_wake_fn) |
1777 | private = current process |
1780 | committed = false |
1782 | __add_wait_queue_entry_tail( & waitq, & wait) |
1783 | iocg_kick_waitq(iocg, & now) |
1785 | spin_unlock_irq( & lock) |
1787 | When (true) cycle |
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 |