Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:This is called when we want to actually walk up the hierarchy and check to* see if we need to throttle, and then actually throttle if there is some* accumulated delay. This should only be called upon return to user space so

Proto:static void blkcg_maybe_throttle_blkg(struct blkcg_gq *blkg, bool use_memdelay)

Type:void

Parameter:

TypeParameterName
struct blkcg_gq *blkg
booluse_memdelay
1569  now = Convert ktime_t to nanoseconds
1571  delay_nsec = 0
1574  When all non-root blkcg_gq's are guaranteed to have access to parent cycle
1575  If atomic_read( & use_delay) Then
1580  blkg = all non-root blkcg_gq's are guaranteed to have access to parent
1583  If Not delay_nsec Then Return
1593  delay_nsec = min_t - return minimum of two values, using the specified type*@type: data type to use*@x: first value*@y: second value(u64, delay_nsec, 250 * NSEC_PER_MSEC)
1595  If use_memdelay Then psi_memstall_enter - mark the beginning of a memory stall section*@flags: flags to handle nested sections* Marks the calling task as being stalled due to a lack of memory,* such as waiting for a refault or performing reclaim.
1598  exp = Add a ktime_t variable and a scalar nanosecond value.* res = kt + nsval:(now, delay_nsec)
1599  tok = io_schedule_prepare()
1600  Do
1601  set_current_state() includes a barrier so that the write of current->state* is correctly serialised wrt the caller's subsequent test of whether to* actually sleep:* for (;;) {* set_current_state(TASK_UNINTERRUPTIBLE);* if (!need_sleep)* break;* (Convenience macros for the sake of set_current_state: )
1602  If Not schedule_hrtimeout - sleep until timeout*@expires: timeout value (ktime_t)*@mode: timer mode* Make the current task sleep until the given expiry time has* elapsed. The routine will return immediately unless Then Break
1604  When Not fatal_signal_pending(current process) cycle
1605  io_schedule_finish(tok)
1607  If use_memdelay Then psi_memstall_leave - mark the end of an memory stall section*@flags: flags to handle nested memdelay sections* Marks the calling task as no longer stalled due to lack of memory.
Caller
NameDescribe
blkcg_maybe_throttle_currentlkcg_maybe_throttle_current - throttle the current task if it has been marked* This is only called if we've been marked with set_notify_resume()