Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-iocost.c Create Date:2022-07-28 17:47:39
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:current_hweight

Proto:static void current_hweight(struct ioc_gq *iocg, unsigned int *hw_activep, unsigned int *hw_inusep)

Type:void

Parameter:

TypeParameterName
struct ioc_gq *iocg
unsigned int *hw_activep
unsigned int *hw_inusep
959  ioc = ioc
965  ioc_gen = atomic_read( & r lazy hweights )
966  If ioc_gen == hweight_gen Then Go to out
979  smp_rmb()
981  hwa = hwi = HWEIGHT_WHOLE
982  When lvl <= this iocg's depth in the hierarchy and ancestors including self - 1 cycle
983  parent = ancestors[lvl]
984  child = ancestors[lvl + 1]
985  active_sum = READ_ONCE( see __propagate_active_weight() and current_hweight() for details )
986  inuse_sum = READ_ONCE(child_inuse_sum)
987  active = READ_ONCE(active)
988  inuse = READ_ONCE(inuse)
991  If Not active_sum || Not inuse_sum Then Continue
994  active_sum = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(active, active_sum)
995  hwa = hwa * active / active_sum
997  inuse_sum = max - return maximum of two values of the same or compatible types*@x: first value*@y: second value(inuse, inuse_sum)
998  hwi = hwi * inuse / inuse_sum
1001  hweight_active = max_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u32, hwa, 1)
1002  hweight_inuse = max_t - return maximum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u32, hwi, 1)
1003  hweight_gen = ioc_gen
1004  out :
1005  If hw_activep Then hw_activep = hweight_active
1007  If hw_inusep Then hw_inusep = hweight_inuse
Caller
NameDescribe
iocg_kick_waitq
iocg_kick_delay
ioc_timer_fn
ioc_rqos_throttle
ioc_rqos_merge