Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\kvm.c Create Date:2022-07-28 08:44:35
Last Modify:2020-03-16 21:33:46 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:@interrupt_kernel: Is this called from a routine which interrupts the kernel* (other than user space)?

Proto:void kvm_async_pf_task_wait(unsigned int token, int interrupt_kernel)

Type:void

Parameter:

TypeParameterName
unsigned inttoken
intinterrupt_kernel
105  key = hash_32(token, KVM_TASK_SLEEP_HASHBITS)
106  b = async_pf_sleepers[key]
108  DECLARE_SWAITQUEUE(wait)
110  _irq_enter - inform RCU that current CPU is entering irq away from idle* Enter an interrupt handler, which might possibly result in exiting* idle mode, in other words, entering the mode in which read-side critical* sections can occur
112  raw_spin_lock( & lock)
113  e = _find_apf_task(b, token)
114  If e Then
116  hlist_del( & link)
117  free previously allocated memory
118  raw_spin_unlock( & lock)
120  _irq_exit - inform RCU that current CPU is exiting irq towards idle* Exit from an interrupt handler, which might possibly result in entering* idle mode, in other words, leaving the mode in which read-side critical* sections can occur
121  Return
124  token = token
125  cpu = smp_processor_id()
126  halted = s_idle_task - is the specified task an idle task?*@p: the task in question.* Return: 1 if @p is an idle task. 0 otherwise. || If IS_ENABLED(CONFIG_FOO) evaluates to 1 if CONFIG_FOO is set to 'y' or 'm',* 0 otherwise.(CONFIG_PREEMPT_COUNT) Then We mask the PREEMPT_NEED_RESCHED bit so as not to confuse all current users* that think a non-zero value indicates we cannot preempt. > 1 || rcu_preempt_depth() Else interrupt_kernel
130  init_swait_queue_head( & wq)
131  hlist_add_head( & link, & list)
132  raw_spin_unlock( & lock)
134  cycle
135  If Not halted Then prepare_to_swait_exclusive( & wq, & wait, TASK_UNINTERRUPTIBLE)
137  If hlist_unhashed( & link) Then Break
140  _irq_exit - inform RCU that current CPU is exiting irq towards idle* Exit from an interrupt handler, which might possibly result in entering* idle mode, in other words, leaving the mode in which read-side critical* sections can occur
142  If Not halted Then
144  schedule()
146  Else
154  _irq_enter - inform RCU that current CPU is entering irq away from idle* Enter an interrupt handler, which might possibly result in exiting* idle mode, in other words, entering the mode in which read-side critical* sections can occur
156  If Not halted Then finish_swait( & wq, & wait)
159  _irq_exit - inform RCU that current CPU is exiting irq towards idle* Exit from an interrupt handler, which might possibly result in entering* idle mode, in other words, leaving the mode in which read-side critical* sections can occur
160  Return