--- zzzz-none-000/linux-4.9.279/kernel/softirq.c 2021-08-08 06:38:54.000000000 +0000 +++ puma7-arm-6591-750/linux-4.9.279/kernel/softirq.c 2023-02-08 10:58:16.000000000 +0000 @@ -7,6 +7,10 @@ * * Rewritten. Old one was good in 2.2, but in 2.3 it was immoral. --ANK (990903) */ +/* + * Includes Intel Corporation's changes/modifications dated: 2019. + * Changed/modified portions - Copyright (c) 2019, Intel Corporation. + */ #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt @@ -26,7 +30,7 @@ #include #include #include - +#include #define CREATE_TRACE_POINTS #include @@ -77,6 +81,7 @@ wake_up_process(tsk); } +#if 0 /* * If ksoftirqd is scheduled, we do not want to process pending softirqs * right now. Let ksoftirqd handle this at its own rate, to get fairness, @@ -91,6 +96,7 @@ return false; return tsk && (tsk->state == TASK_RUNNING); } +#endif /* * preempt_count and SOFTIRQ_OFFSET usage: @@ -285,7 +291,9 @@ kstat_incr_softirqs_this_cpu(vec_nr); trace_softirq_entry(vec_nr); + avm_simple_profiling_log(avm_profile_data_type_sw_irq_begin, (unsigned int)(h->action), (unsigned int)h); h->action(h); + avm_simple_profiling_log(avm_profile_data_type_sw_irq_end, (unsigned int)(h->action), (unsigned int)h); trace_softirq_exit(vec_nr); if (unlikely(prev_count != preempt_count())) { pr_err("huh, entered softirq %u %s %p with preempt_count %08x, exited with %08x?\n", @@ -328,7 +336,7 @@ pending = local_softirq_pending(); - if (pending && !ksoftirqd_running(pending)) + if (pending) do_softirq_own_stack(); local_irq_restore(flags); @@ -355,9 +363,6 @@ static inline void invoke_softirq(void) { - if (ksoftirqd_running(local_softirq_pending())) - return; - if (!force_irqthreads) { #ifdef CONFIG_HAVE_IRQ_EXIT_ON_IRQ_STACK /* @@ -520,7 +525,11 @@ if (!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state)) BUG(); + avm_simple_profiling_log(avm_profile_data_type_tasklet_begin, (unsigned int)(t->func), + (unsigned int)(t->data)); t->func(t->data); + avm_simple_profiling_log(avm_profile_data_type_tasklet_end, (unsigned int)(t->func), + (unsigned int)(t->data)); tasklet_unlock(t); continue; } @@ -556,7 +565,11 @@ if (!test_and_clear_bit(TASKLET_STATE_SCHED, &t->state)) BUG(); + avm_simple_profiling_log(avm_profile_data_type_hi_tasklet_begin, (unsigned int)(t->func), + (unsigned int)(t->data)); t->func(t->data); + avm_simple_profiling_log(avm_profile_data_type_hi_tasklet_end, (unsigned int)(t->func), + (unsigned int)(t->data)); tasklet_unlock(t); continue; }