Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:iolatency_pd_init

Proto:static void iolatency_pd_init(struct blkg_policy_data *pd)

Type:void

Parameter:

TypeParameterName
struct blkg_policy_data *pd
957  iolat = pd_to_lat(pd)
958  blkg = lat_to_blkg(iolat)
959  rqos = blkcg_rq_qos( Pointer to the associated request_queue )
960  blkiolat = BLKIOLATENCY(rqos)
961  now = Convert ktime_t to nanoseconds
964  If blk_queue_nonrot( Pointer to the associated request_queue ) Then ssd = true
966  Else ssd = false
969  for_each_possible_cpu(cpu)
971  stat = per_cpu_ptr(stats, cpu)
972  latency_stat_init(iolat, stat)
975  latency_stat_init(iolat, & cur_stat)
976  rq_wait_init( & rq_wait)
977  Process spin lock initialization( & lock)
978  queue_depth = Max # of requests
979  max_depth = UINT_MAX
980  default_depth = queue_depth
981  blkiolat = blkiolat
982  cur_win_nsec = 100 * NSEC_PER_MSEC
983  atomic64_set( & window_start, now)
989  If all non-root blkcg_gq's are guaranteed to have access to parent && lkg_to_pdata - get policy private data*@blkg: blkg of interest*@pol: policy of interest* Return pointer to private data associated with the @blkg-@pol pair. Then
990  parent = blkg_to_lat( all non-root blkcg_gq's are guaranteed to have access to parent )
991  atomic_set( & scale_cookie, atomic_read( & Cookie to tell if we need to scale up or down. ))
993  Else
994  atomic_set( & scale_cookie, DEFAULT_SCALE_COOKIE)
997  atomic_set( & Cookie to tell if we need to scale up or down. , DEFAULT_SCALE_COOKIE)