Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\softirq.c Create Date:2022-07-28 09:04:22
Last Modify:2022-05-22 11:04:38 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:__do_softirq

Proto:asmlinkage __visible void __softirq_entry __do_softirq(void)

Type:void

Parameter:Nothing

251  end = jiffies + We restart softirq processing for at most MAX_SOFTIRQ_RESTART times,* but break the loop if need_resched() is set or after 2 ms
252  old_flags = flags
253  max_restart = MAX_SOFTIRQ_RESTART
264  flags &= ~Allocating memory
266  pending = local_softirq_pending()
267  account_irq_enter_time(current process)
269  __local_bh_disable_ip(_RET_IP_, SOFTIRQ_OFFSET)
270  in_hardirq = lockdep_softirq_start()
272  restart :
274  set_softirq_pending(0)
276  The local_irq_*() APIs are equal to the raw_local_irq*()* if !TRACE_IRQFLAGS.()
278  h = softirq_raise - called immediately when a softirq is raised*@vec_nr: softirq vector number* When used in combination with the softirq_entry tracepoint* we can determine the softirq raise to run latency.
280  When softirq_bit = find first bit in word cycle
284  h += softirq_bit - 1
286  vec_nr = h - softirq_raise - called immediately when a softirq is raised*@vec_nr: softirq vector number* When used in combination with the softirq_entry tracepoint* we can determine the softirq raise to run latency.
287  prev_count = 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.
289  kstat_incr_softirqs_this_cpu(vec_nr)
291  softirq_entry - called immediately before the softirq handler*@vec_nr: softirq vector number* When used in combination with the softirq_exit tracepoint* we can determine the softirq handler routine.
292  action(h)
293  softirq_exit - called immediately after the softirq handler returns*@vec_nr: softirq vector number* When used in combination with the softirq_entry tracepoint* we can determine the softirq handler routine.
300  h++
301  pending >>= softirq_bit
304  If Operations for contexts that are safe from preemption/interrupts. These* operations verify that preemption is disabled.(ksoftirqd) == current process Then rcu_softirq_qs()
306  local_irq_disable()
308  pending = local_softirq_pending()
309  If pending Then
310  If time_before(jiffies, end) && Not need_resched() && --max_restart Then Go to restart
314  we cannot loop indefinitely here to avoid userspace starvation,* but we also don't want to introduce a worst case 1/HZ latency* to the pending events, so lets the scheduler to balance* the softirq load for us.
317  lockdep_softirq_end(in_hardirq)
318  account_irq_exit_time(current process)
319  This one is for softirq.c-internal use,* where hardirqs are disabled legitimately:
320  WARN_ON_ONCE(in_interrupt())
321  current_restore_flags(old_flags, Allocating memory )
Caller
NameDescribe
run_ksoftirqd