Questions tagged [interrupt]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
40 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
30 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 ...
2
votes
1answer
258 views

Is “top” accounting for Kernel Interrupts?

I have a simple interrupt that is triggered by a GPIO-input. The IRQ only increments a variable and returns. When I turn the frequency of the interrupts up to somewhere around 10-20 kHz, the system ...
1
vote
1answer
933 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 ...
1
vote
1answer
167 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)...
0
votes
1answer
31 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-; ...
0
votes
1answer
1k views

Cannot compile device tree blob due to missing node/label

I'm trying to create a petalinux image using the petalinux SDK. After I start a build I get an error when the process tries to build the system.dtb The error is "(phandle references): Reference to ...
-1
votes
1answer
51 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 ...
3
votes
1answer
63 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
1answer
41 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 ...
0
votes
1answer
757 views

Stack pointer of the interrupt stack

Linux kernel has separate stacks for user mode and kernel mode process and also some special stacks. One of this special stacks is interrupt stack with the size 16 kilobytes placed in the ...
3
votes
1answer
3k views

When is `irqbalance` needed in a Linux VM under VMware?

I have a Linux farm in VMware Enterprise 5.5. The VMs are (mostly) 64-bit amd64 Debian Jessie servers with SysVinit and not systemd. The VMs have open-vm-tools installed. I paravirtualized their ...
4
votes
1answer
246 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 ...
1
vote
0answers
23 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 ...
1
vote
2answers
1k 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
300 views

Why I am not able to bind the interrupts with code LOC, IWI, RES when irqbalance is disabled?

On Ubuntu 14.04, I am trying to bind all the interrupts to core 0 and 1 out of 4 cores. I have disabled the irqbalance daemon via file /etc/init/irqbalance.override. Then I went to every interrupt in /...
1
vote
2answers
1k views

Halt the execution when something is written to stderr

I have trouble with error handling in bash scripts. None of the solutions I have seen for error handling in bash seem to work so far for this example script: #!/usr/bin/env bash set -euo pipefail ...
1
vote
0answers
87 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
268 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
0answers
79 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
41 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
0answers
57 views

Interrupt handling with separate thread

The Situation A kernel driver handles interrupts coming from a CPU pin. The interrupt handler function wakes up a thread function which reads data from an interface. There is one interrupt per data ...
14
votes
3answers
21k views

How does the Linux kernel handle shared IRQs?

According to what I've read so far, "when the kernel receives an interrupt, all the registered handlers are invoked." I understand that the registered handlers for each IRQ can be viewed via /proc/...
5
votes
4answers
6k views

Is there a utility that interprets /proc/interrupts data in time?

is there something out there ? Like top is for ps
0
votes
2answers
45 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
148 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 '...
3
votes
1answer
133 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 -...
4
votes
2answers
1k views

How to programmatically detect when a device raises an interrupt?

How to programmatically detect when a device raises an interrupt? This can be when a device is connected or disconnected. And also this case: for example: when a finger is held over a fingerprint ...
2
votes
1answer
112 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 ...
4
votes
1answer
324 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) ...
1
vote
0answers
268 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 ...
15
votes
3answers
9k views

What is the relationship between system calls, message passing, and interrupts?

I am reading the Wikipedia article for process management. My focus is on Linux. I cannot figure out the relation and differences between system call, message passing and interrupt, in their concepts ...
1
vote
1answer
290 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 ...
1
vote
2answers
467 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
77 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
79 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 ...
19
votes
4answers
13k views

Why can't ed be exited with C-c?

The program ed, a minimal text editor, cannot be exited by sending it an interrupt through using Ctrl-C, instead printing the error message "?" to the console. Why doesn't ed just exit when it ...
0
votes
1answer
76 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-...
2
votes
0answers
300 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
725 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 ...
0
votes
1answer
536 views

What happens when there is a context switch while the process is in Kernel mode?

This is my understanding: When in user mode and a trap/system call occurs, registers are saved on to the kernel stack, switch is made to kernel mode, and trap is handled and returned to user mode. ...
0
votes
1answer
278 views

Identify devices like virtio2 and virtio3 in QEmu

I'm running a virtual machine in QEmu. The following command in the guest VM cat /proc/interrupts | egrep 'virtio.*(input|output)' gives me the following output: 26: 0 3376 0 ...
4
votes
1answer
1k views

What does `/proc/irq/…/spurious` contain?

Here is the output from cat /proc/irq/79/spurious: count 28 unhandled 0 last_unhandled 0 ms What are these parameters indicating here — count, last_unhandled? Is this count indicating the number of ...
33
votes
4answers
76k views

How is an Interrupt handled in Linux?

I just know that Interrupt is a hardware signal assertion caused in a processor pin. But I would like to know how Linux OS handles it. What all are the things that happen when an interrupt occurs?
2
votes
1answer
713 views

Unusual high load average (due to peak I/O wait? irqs?)

I have a problem with high load average (~2) on my (personal laptop) computer for a long time now. I am running Arch Linux. If I remember correctly, the problem started with a certain kernel update, ...
2
votes
2answers
133 views

What happens when a new hardware is connected for first time in Linux?

Suppose, I have connected a device to a PC. Question: How does the Linux OS (Ubuntu) realizes that a new hardware device is connected? Answer: The newly connected device raises an Interrupt (and ...
1
vote
1answer
2k views

How to test linux NAPI feature?

I am trying to test the NAPI functionalities on embedded linux environment. I used 'pktgen' to generate the large number of packets and tried to verify the interrupt count of my network interface at /...
41
votes
1answer
79k views

What are software and hardware interrupts, and how are they processed?

I am not sure if I understand the concept of hardware and software interrupts. If I understand correctly, the purpose of a hardware interrupt is to get some attention of the CPU, part of implementing ...
2
votes
0answers
159 views

Wifi card causing High interrupts on Fedora 24

I am running Fedora 24 on my MSI cx61 2QC laptop. Occasionally, one of the processor's core becomes monopolized by high irqs from the rtl_pci(wifi) card. The model of the wifi card is RTL8723AE. $ ...
2
votes
1answer
3k views

How does keyboard interrupt ends up as process signal

I'm studying the linux kernel right know with O'Reilly's Understanding Linux Kernel and lately covered the signal and interrupt handling chapter sticking to some basic 2.4 linux version and diving ...