Eliminating receive livelock in an interrupt driven kernel
This presentation is the property of its rightful owner.
Sponsored Links
1 / 10

Eliminating Receive Livelock in an Interrupt-driven Kernel PowerPoint PPT Presentation


  • 59 Views
  • Uploaded on
  • Presentation posted in: General

Eliminating Receive Livelock in an Interrupt-driven Kernel. Jeffrey C. Mogul [email protected] K. K. Ramakrishnan AT&T Bell Laboratories [email protected] 1996 USENIX. Problem: receive livelock the system spends all its time processing interrupts, to the exclusion of other necessary tasks

Download Presentation

Eliminating Receive Livelock in an Interrupt-driven Kernel

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Eliminating receive livelock in an interrupt driven kernel

Eliminating Receive Livelockin an Interrupt-driven Kernel

Jeffrey C. [email protected] K. RamakrishnanAT&T Bell [email protected] USENIX


Eliminating receive livelock in an interrupt driven kernel

  • Problem: receive livelock

    • the system spends all its time processing interrupts, to the exclusion of othernecessary tasks

  • Solution: load dependant scheduling

    • The OS lowers the priority of network interrupt handling as load increases


Os scheduling techniques

OS Scheduling Techniques

  • Interrupts

    • When a task requires service, it generates an interrupt. The interrupt handler provides some service immediately.

  • Polling

    • When a task requires service, it turns on a flag. The OS polls the flags periodically, and provides some service to the tasks with flags turned on.


Benefits of scheduling techniques

Benefits of Scheduling Techniques

  • Interrupts

    • Much lower overhead

    • Rapid response

  • Polling

    • Perform better under heavy load


How interrupt driven scheduling causes excess latency under overload

How interrupt-driven scheduling causes excess latency under overload

  • Timeline of Ethernet packet processing

  • link-level processing at device IPL, which includes copying the packet into kernel buffers

  • further processing following a software interrupt, which includes locating the appropriate user process, and and queueing the packet for delivery to this process

  • finally, awakening the user process, which then (in kernel mode) copies the received packet into its own buffer.


Eliminating receive livelock in an interrupt driven kernel

  • Under Load, Avoid Livelock

    • Use interrupts only to initiate polling.

    • Use round-robin polling to fairly allocate resources among event sources.

    • Temporarily disable input when feedback from a full queue, or a limit on CPU usage, indicates that other important tasks are pending.

    • Drop packets early, rather than late, to avoid wasted work. Try to process packets that are received to completion.

  • Unloaded, Maintain High Performance

    • Re-enable interrupts when no work is pending, to avoid polling overhead and to keep latency low.

    • Let the receiving interface buffer bursts, to avoid dropping packets.

    • Eliminate the IP input queue, and associated overhead.


Eliminating receive livelock in an interrupt driven kernel

  • Livelock in a Unix router

  • filled circles: kernel-based forwarding performance

  • open squares: the screend program, a firewall application


Why livelock occurs in the 4 2bsd router

Why livelock occurs in the 4.2BSD Router


Eliminating receive livelock in an interrupt driven kernel

  • Fixing the livelock problem

  • Do as much work as possible in a kernel thread

  • Eliminate the IP input queue and its associated queue manipulations and software interrupt


Guaranteeing progress for user level processes

Guaranteeing progress for user-level processes


  • Login