Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6769481
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T15:11:55+00:00 2026-05-26T15:11:55+00:00

In older versions of the Linux kernel, the interrupt service routines (ISRs) for hardware

  • 0

In older versions of the Linux kernel, the interrupt service routines (ISRs) for hardware IRQs in an SMP system were executed on the CPU where they started, from the beginning to the end. If preempted by some other code, an ISR would resume afterwards on the same CPU.

But in recent kernels, most of the ISRs should be executed in the context of special kernel threads by default (http://lwn.net/Articles/433854/). The “ordinary” kernel threads can migrate to another CPU when preempted. So the question is, can ISRs also do such things now, for whatever reason?

Note that I am not talking about CPU affinity of the IRQs and IRQ balancing between the processors. I am curious about the situation when an interrupt handler is already running but is preempted.

That is, assume an ISR has already started executing on CPU #1. Now it is preempted by some higher priority code. When the latter has done its work, the ISR resumes execution – but on CPU #2. Are such situations possible?

The pointers to the relevant docs, discussions, etc., are always welcome.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T15:11:55+00:00Added an answer on May 26, 2026 at 3:11 pm

    The ISR threads get the same affinity as the ISR routines, so in the case of preemption, the ISR thread will not reschedule to an arbitrary CPU.

    Also, the behavior of forcing ISRs to become threads is not enabled by default according to the information in the link you provided. It is conditioned by the threadirqs command line option. The handling of the command line options takes care of ISR threads in a way that traditional ISRs would not need to care about the rescheduling. According to the following code in kernel/irq/manage.c, preemption is disabled for these threads:

    /*
     * Interrupts which are not explicitely requested as threaded
     * interrupts rely on the implicit bh/preempt disable of the hard irq
     * context. So we need to disable bh here to avoid deadlocks and other
     * side effects.
     */
    static void
    irq_forced_thread_fn(struct irq_desc *desc, struct irqaction *action)
    {
            local_bh_disable();
            action->thread_fn(action->irq, action->dev_id);
            irq_finalize_oneshot(desc, action, false);
            local_bh_enable();
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In older versions of linux kernel (e.g. 2.6.11) struct sk_buff contains a pointer to
In older versions of the kernel (2.6.25.8), it was in drivers/scsi/scsi_error.c in the functions
I found many examples for older versions of CherryPy but they each referenced importing
I have a linux VPS that uses an older version of python (2.4.3). This
I have a toolbar developed under older versions of Windows that is largely cut
When you pressed CMD F on older versions of Xcode you got the find/replace
Version Dependent Some of the answers to this question deal with older versions of
OLE Variants, as used by older versions of Visual Basic and pervasively in COM
I'm trying to hide some unused journals. It seems in older versions, journals had
I have to develop a patch for the linux kernel (2.6) for an university

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.