Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\rcu\rcutorture.c Create Date:2022-07-28 10:22:04
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:CPU-stall kthread. It waits as specified by stall_cpu_holdoff, then* induces a CPU stall for the time specified by stall_cpu.

Proto:static int rcu_torture_stall(void *args)

Type:int

Parameter:

TypeParameterName
void *args
1598  VERBOSE_TOROUT_STRING("rcu_torture_stall task started")
1599  If stall_cpu_holdoff > 0 Then
1600  VERBOSE_TOROUT_STRING("rcu_torture_stall begin holdoff")
1601  schedule_timeout_interruptible(stall_cpu_holdoff * HZ)
1602  VERBOSE_TOROUT_STRING("rcu_torture_stall end holdoff")
1604  If Not kthread_should_stop - should this kthread return now?* When someone calls kthread_stop() on your kthread, it will be woken* and this will return true. You should then return, and your return* value will be passed through to kthread_stop(). Then
1605  stop_at = me64_t base interfaces + stall_cpu
1607  _read_lock() - mark the beginning of an RCU read-side critical section* When synchronize_rcu() is invoked on one CPU while other CPUs* are within RCU read-side critical sections, then the* synchronize_rcu() is guaranteed to block until after all the other
1608  If stall_cpu_irqsoff Then local_irq_disable()
1610  Else Even if we don't have any preemption, we need preempt disable/enable* to be barriers, so that we don't have things like get_user/put_user* that can cause faults and scheduling migrate into our preempt-protected* region.()
1612  pr_alert("rcu_torture_stall start on CPU %d.\n", smp_processor_id())
1614  When ULONG_CMP_LT((unsignedlong)me64_t base interfaces, stop_at) cycle
1616  Continue
1617  If stall_cpu_irqsoff Then The local_irq_*() APIs are equal to the raw_local_irq*()* if !TRACE_IRQFLAGS.()
1619  Else preempt_enable()
1621  _read_unlock() - marks the end of an RCU read-side critical section.* In most situations, rcu_read_unlock() is immune from deadlock.* However, in kernels built with CONFIG_RCU_BOOST, rcu_read_unlock()
1622  pr_alert("rcu_torture_stall end.\n")
1624  Test auto-shutdown handling.
1625  When Not kthread_should_stop - should this kthread return now?* When someone calls kthread_stop() on your kthread, it will be woken* and this will return true. You should then return, and your return* value will be passed through to kthread_stop(). cycle
1626  schedule_timeout_interruptible(10 * HZ)
1627  Return 0