Everything Penguin

Focusing on Linux-based Operating Systems
htDig Search:

Operating Systems
  • /pub/OS/Linux

  • Storage
  • File Systems
  • HPC
  • /pub/Storage

  • Networking
  • /pub/Networking

  • Network Services
  • /pub/NetworkServices

  • Security
  • /pub/Security
  • Keytool/OpenSSL

  • Clustering
  • HA
  • DRM

  • Development
  • Design
  • C/C++
  • Java
  • Perl
  • Python
  • Shell
  • Web / J2EE

  • Not Linux ?
  • BSD
  • HP-UX
  • Mac
  • Solaris
  • VM
  • Windows
  • /pub/OS

  • Other
  • /pub
  • /pub/3rdParty
  •  Parent Directory

    Linux - Assign IRQs to certain cores
    Brett Lee
    IRQ Overview
      Two types of IRQs
       - Deferrable functions (softirqs and tasklets)
         - aka. Bottom halves
       - Those executed by some sort of work queue
         - Top halves
         cat /proc/interrupts
    Assigning interrupts to selected CPU core(s)
      From:  http://download.intel.com/design/network/applnots/319935.pdf
      Until version 2.6, Linux had been non-preemptive, meaning that when a
      process is running in kernel mode, if any higher-priority process arrives
      in the ready-to-run queue, the lower-priority process cannot be preempted
      until it returns to user mode.  But, an interrupt *is* allowed to divert CPU
      attention even though it is executing a process in kernel mode.  This helps
      to improve the throughput of a system.  When an interrupt occurs, the CPU
      suspends the current task and executes some other code, which responds to
      whatever event caused the interrupt.
    In addition, an interrupt can be interrupted by another interrupt, and
    so on and on.  Then there are bottom halves, ways to run a little bit of
    code piggy backed on the IRQ.  Nothing is wasted, no chance to steal CPU time
    is overlooked.  To fight back and keep high priority jobs on the CPU, often
    it is best to direct IRQs to a CPU that is not running a high priority jobs.
    But how?
    In short, assign certain interrupts to a specific CPU using:
      `echo  CPU_NUM  > /proc/irq/<IRQ_NUM>/smp_affinity`
      ** Note that CPU_NUM 1 is actually CPU0.
      ** Note also that CPU_NUM should be specified in HEX, and has a range
         of 1-16 (or 1 through F).
    The result can be verified by looking at /proc/interrupts:
      `cat /proc/interrupts`
      This will show the number of interrupts received at each CPU.
      It will also show what interrupts are being sent to the CPUs.
    To assign them all, write a short script and set it to run at boot time.
    For more, see:
      Linux doc:  SMP-affinity.txt

    Other Sites

  • FAQ's
  • IETF
  • RFC Sourcebook

  • Linux
  • Linux - Intro
  • Linux Kernel
  • Linux Kernel (LKML)
  • Bash - Intro
  • Bash - Advanced
  • Command Line
  • System Administration
  • Network Administration
  • Man Pages (& more)
  • More Guides
  • Red Hat Manuals
  • HOWTO's

  • Reference/Tutorials
  • C++ @ cppreference
  • C++ @ cplusplus
  • CSS @ echoecho
  • DNS @ Zytrax
  • HTML @ W3 Schools
  • Java @ Sun
  • LDAP @ Zytrax
  • Linux @ YoLinux
  • MySQL
  • NetFilter
  • Network Protocols
  • OpenLDAP
  • Quagga
  • Samba
  • Unix Programming

  • This site contains many of my notes from research into different aspects of the Linux kernel as well as some of the software provided by GNU and others. Thouugh these notes are not fully comprehensive or even completetly accurate, they are part of my on-going attempt to better understand this complex field. And, they are your to use.

    Should you wish to report any errors or suggestions, please let me know.

    Should you wish to make a donation for anything you may have learned here, please direct that donation to the ASPCA, with my sincere thanks.

    Brett Lee
    Everything Penguin

    The code for this site, which is just a few CGI scripts, may be found on GitHub (https://github.com/userbrett/cgindex).

    For both data encryption and password protection, try Personal Data Security (https://www.trustpds.com).

    "We left all that stuff out. If there's an error, we have this routine called 'panic', and when its called, the machine crashes, and you holler down the hall, 'Hey, reboot it.'"

        - Dennis Ritchie on Unix (vs Multics)

    [ Powered by Red Hat Linux ] [ Powered by Apache Server] [ Powered by MySQL ]

    [ Statistics by AWStats ]