函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\softirq.c Create Date:2022-07-27 10:04:06
Last Modify:2022-05-22 11:04:38 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__do_softirq

函数原型:asmlinkage __visible void __softirq_entry __do_softirq(void)

返回类型:void

参数:

251  end等于jiffiesWe 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(当前进程)
269  __local_bh_disable_ip(_RET_IP_, SOFTIRQ_OFFSET)
270  in_hardirq等于lockdep_softirq_start()
272  restart :
274  set_softirq_pending(0)
276  开中断()
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 softirq_bit等于在字中找到第一个指定位循环
284  h加等于softirq_bit减1
286  vec_nr等于hsoftirq_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等于抢占计数值
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.
295  打印错误信息("huh, entered softirq %u %s %p with preempt_count %08x, exited with %08x?\n", vec_nr, softirq_to_name[vec_nr], action, prev_count, 抢占计数值)
300  h自加
301  pending右移等于softirq_bit
304  如果Operations for contexts that are safe from preemption/interrupts. These* operations verify that preemption is disabled.(ksoftirqd)恒等于当前进程rcu_softirq_qs()
306  禁止中断()
308  pending等于local_softirq_pending()
309  如果pending
310  如果time_before(jiffies, end)且非need_resched()且max_restart先自减则转到: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(当前进程)
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 )
调用者
名称描述
run_ksoftirqd