Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:ioc_pd_init

Proto:static void ioc_pd_init(struct blkg_policy_data *pd)

Type:void

Parameter:

TypeParameterName
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  Initialization list head
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  When tblkg cycle
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)