函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:block\blk-iocost.c Create Date:2022-07-27 19:24:57
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:ioc_pd_init

函数原型:static void ioc_pd_init(struct blkg_policy_data *pd)

返回类型:void

参数:

类型参数名称
struct blkg_policy_data *pd
1992  iocg等于pd_to_iocg(pd)
1993  blkg等于pdata_to_blkg - get blkg associated with policy private data*@pd: policy private data of interest*@pd is policy private data. Determine the blkg it's associated with.
1994  ioc等于q_to_ioc( Pointer to the associated request_queue )
1999  ake a snapshot of the current [v]time and vrate
2001  ioc等于ioc
2002  atomic64_set( & * `vtime` is this iocg's vtime cursor which progresses as IOs are * issued. If lagging behind device vtime, the delta represents * the currently available IO budget. If runnning ahead, the * overage. * `vtime_done` is the same but progressed on completion , vnow)
2003  atomic64_set( & done_vtime, vnow)
2004  atomic64_set( & abs_vdebt, 0)
2005  atomic64_set( & * The period this iocg was last active in. Used for deactivation * and invalidating `vtime`., atomic64_read( & c'd each period ))
2006  初始化链表头
2007  hweight_active等于HWEIGHT_WHOLE
2008  hweight_inuse等于HWEIGHT_WHOLE
2010  init_waitqueue_head( & waitq)
2011  hrtimer_init - initialize a timer to the given clock*@timer: the timer to be initialized*@clock_id: the clock to be used*@mode: The modes which are relevant for intitialization:* HRTIMER_MODE_ABS, HRTIMER_MODE_REL, HRTIMER_MODE_ABS_SOFT,*
2012  function等于iocg_waitq_timer_fn
2013  hrtimer_init - initialize a timer to the given clock*@timer: the timer to be initialized*@clock_id: the clock to be used*@mode: The modes which are relevant for intitialization:* HRTIMER_MODE_ABS, HRTIMER_MODE_REL, HRTIMER_MODE_ABS_SOFT,*
2014  function等于iocg_delay_timer_fn
2016  this iocg's depth in the hierarchy and ancestors including self 等于* The depth this cgroup is at. The root is at depth zero and each * step down the hierarchy increments the level. This along with * ancestor_ids[] can determine whether a given cgroup is a * descendant of another without traversing the hierarchy.
2018 tblkg循环
2019  tiocg等于blkg_to_iocg(tblkg)
2020  ancestors[ this iocg's depth in the hierarchy and ancestors including self ]等于tiocg
2023  spin_lock_irqsave( & lock, flags)
2024  weight_updated(iocg)
2025  spin_unlock_irqrestore( & lock, flags)