36 questions
0
votes
1
answer
188
views
Linux FTRACE function_graph process context
I've a question related to the use of ftrace on Linux kernel 4.15. ftrace is configured as follows:
mount -t debugfs nodev /sys/kernel/debug
echo funcgraph-proc > /sys/kernel/debug/tracing/...
0
votes
0
answers
210
views
Linux softirq and SMP
I have read that multiple instances of a softirq can be run on different cores in a multi-core system. Based on above statement, I have deduced below understanding with a example.
The system received ...
1
vote
0
answers
301
views
Reducing Timer Softirq and local interrupts
I would like to know what exactly are the TIMER softirqs in /proc/softirqs are doing, so I can reduce their frequency. I believe the local timer interrupts generated by the local APIC give rise to ...
0
votes
1
answer
322
views
Stack overflow if softirq preempt by hardware interrupt many times
Recently I've been looking into one NIC driver implemented by NAPI which uses softirq to handle tx&rx packets, and lots of docs say softirq can be triggered when hardware interrupt return, then I ...
8
votes
0
answers
2k
views
Containers: high cpu usage in %soft (soft IRQ) for network-intensive workloads
I'm trying to debug some performance issues on a RHEL8.3 server.
The server is actually a Kubernetes worker nodes and hosts several Redis containers (PODs).
These containers are doing a lot of network ...
0
votes
1
answer
147
views
Failed to trace the trace point of softirq_raise in Linux-5.11.4
I am writing a kernel module to hook to the trace point of softirq_raise. I found it could be shown in
/sys/kernel/debug/tracing/available_events:irq:softirq_raise
/sys/kernel/debug/tracing/...
-1
votes
1
answer
744
views
Is there a way to debug softirq?
my purpose :
log debug info(ratio , address, else)of softirq generation in specific situation.
any information can be helpful.
I suppose some suspicious device driver but has no clue which generated ...
4
votes
2
answers
8k
views
RISC-V - Software Interrupts
I'm trying to implement a simple interrupt controller for my RV32I core. I believe I understand how an interrupt should be handled in RISC-V, and the role of the CSR registers in the process.
RISC-V ...
1
vote
0
answers
1k
views
hardirq and softirq run on the same core/processor?
Assume I have RSS and interrupt affinity correctly set up.
Is it guaranteed by the Linux kernel that a softirq is executed on the same CPU/core where hardware interrupt handler has been triggered? I ...
0
votes
1
answer
843
views
softirq -- how far in network stack does it last?
I've been studying about interrupts in Linux and softirq in particular (I'm interested in networking subsystem of the kernel). I understand the concept of top-half and bottom-half, but what's not ...
0
votes
1
answer
182
views
The reasons why rps procedure use spinlock with local_irq_disable
These days, I'm studying kernel internal network code, especially RPS code. You know, there are a lot of functions about that. But I am focusing on some functions about SMP queue processing such as ...
0
votes
0
answers
182
views
Is it safe to call send_sig_info() inside URB completion routine?
As we know that USB URB completion callback will execute in softIRQ context.
Let me explain the background in which I am trying to use send_sig_info().
So I'm currently working on Data Acquisition ...
0
votes
1
answer
506
views
Pausing a kthread in Linux
here https://blog.packagecloud.io/eng/2017/02/06/monitoring-tuning-linux-networking-stack-sending-data/#queuing-disciplines
it is written:
As you’ll see from the previous post, the NET_TX_SOFTIRQ ...
1
vote
2
answers
2k
views
Why is time servicing softirqs increased on kernel 4.1 in compare with kernel 3.4?
We found a performance degradation issue when doing linux uplift from kernel 3.4 to 4.1 version. Seems, it is caused by that the new kernel spends much more time to service softirqs.
We did a test ...
1
vote
1
answer
1k
views
How to stop/disable IPI(inter process interrupts) in linux?
I am trying to disable irq calls from kernel while executing some application, i am calling local_irq_disable() before executing my application is that sufficient to disable the IRQ flags.
Is any ...
1
vote
1
answer
2k
views
ksoftirqd behaviour on high network traffic
I am running Windriver Linux on a MIPS (octeon) based hardware.
Linux runs on 16 cores and we have koftirqd/0 to ksoftirq/15 running.
I observe the following behavior of load balancing on high ...
2
votes
1
answer
8k
views
The linux softirq cpu usage looks strange
I am running a simple program in a client, it continue sending udp packet to a server. The interface of server is a multi-queue netcard, but I set its rx-flow-hash of udp4 to sd. So all packet will be ...
0
votes
1
answer
909
views
PID in case of irq context
what does "current->pid" prints in below 2 case
1) Hard IRQ context
2) Soft IRQ context
I know IRQ context and process context are different, and PID must be invalid in case of IRQ context. But ...
3
votes
1
answer
536
views
Can the SoftIRQ prempt currently running the same SoftIRQ with Linux kernel?
I am working on a performance improvement of a driver and should consider the possibility of deadlock. In a SoftIRQ context, spin_lock will be held and protect some variable. In this case, should I ...
1
vote
1
answer
1k
views
Is there a linux header for hashtable with spinlock-protected buckets?
I write a code which rarely creates/removes objects (up to several thousands) but very frequently modifies them in soft IRQ context. These objects are also rarely read (and probably will also be ...
9
votes
1
answer
722
views
Is there any way to make a call to linux kernel with my own softirq
Similar to how system call works on int 0x80, is it possible to implement my own ISR inside kernel so that on softirq assume int 0x120 or with any other softirq Program Counter can jump from user ...
3
votes
1
answer
3k
views
How to pin a interrupt to a CPU in driver
Is it possible to pin a softirq, or any other bottom half to a processor. I have a doubt that this could be done from within a softirq code.
But then inside a driver is it possible to pin a ...
2
votes
0
answers
94
views
why can you not enable bottom halves when irqs are disabled?
In __local_bh_enable, we have a
WARN_ON_ONCE(!irqs_disabled());
I'm wondering what the purpose of this warning is -- I would imagine you would want to be able to renable bottomhalves when in say ...
0
votes
1
answer
184
views
why do a atomic read to count variable in tasklet structure?
in tasklet_action routine - while handling an entry from tasklet_vec list of
core , we are atomically reading atomic_read(&t->count), i dont see
any of its uses through out the routine, what ...
0
votes
2
answers
2k
views
why same TASKLET can't execute on two core simultaneously?
In linux Kernel implementation for ARM platform, deferred work in tasklet is added to percpu vec|vec_hi list.
now while returning from ISR execution it goes to address deferred work in softirq and ...
0
votes
1
answer
2k
views
How kernel disable the softirq in the local processor when softirq handler runs
Recently I study the Linux-Kernel-Development by Robert Love.
There is a paragraph describes mechanism of softirq.
The softirq handlers run with interrupts enabled and cannot sleep.
While a ...
0
votes
1
answer
119
views
Running multiple processes doesn't scale
There are two C++ processes, one thread in each process. The thread handles network traffic (Diameter) from 32 incoming TCP connections, parses it and forwards split messages via 32 outgoing TCP ...
5
votes
2
answers
5k
views
local_bh_disable, preempt_disable, local_irq_disable
local_bh_disable disables the processing of bottom halves (softirqs). Softirqs are processed on either, interrupt return path, or by the ksoftirqd-(per cpu)-thread that will be woken up if the system ...
1
vote
1
answer
2k
views
ksoftirq is NOT using CPU and should be, why?
Both Linux 2.6 and 3.8.
Linux setup as a router passing a 3 gig file
Doing a top, %SI is high at 30%, but ksoftirqd is doing 0% CPU. So the question is "What thread is handling the softirq???" I've ...
0
votes
0
answers
204
views
amd radeon r9 series smp_affinity
Using taskset -c 1 with opencl program,it runs at the same speed that without use of it in four core machine. But the load with taskset is 13% without it 50%.
I am using AMD drivers 13.12 in fedora ...
17
votes
1
answer
32k
views
Why softirq is used for highly threaded and high frequency uses?
What makes the softirq so special that we use it for high frequency uses., like in network drivers and block drivers.
5
votes
1
answer
900
views
Sharing data between softirq and process context
I am developing a kernel module that shares data structures between a softirq (netfilter pre-routing hook) and a user context (within an ioctl call).
After reading this link, I know I need to disable ...
7
votes
2
answers
3k
views
How to define and trigger my own new softirq in linux kernel?
I would like to create my own softirq in linux kernel. Is it the right way to do that:
In the init of the module I would like to trigger the softirq from I'll add a call to:
394 void open_softirq(...
0
votes
1
answer
886
views
Linux IRQ: unmasking IRQ within ISR
I have an IRQ which is using handle_level_irq(). Most of the time, the ISR requires that a bottom half be scheduled, but occasionally, it is able to determine it is spurious, and does not want to ...
27
votes
4
answers
40k
views
Difference between SoftIRQs and Tasklets
While studying Linux interrupt handling I found that Tasklets and SoftIRQs are two different methods of performing "bottom half" (lesser priority work). I understand this (quite genuine need).
...
17
votes
3
answers
16k
views
Which context are softirq and tasklet in?
I know that there are process context and interrupt context but I don't understand when executing softirq or tasklet, which context is it run under.
I have seen some people use the term "bottom-...