eliminating receive livelock in an interrupt-driven kernel j. c. mogul and k. k. ramakrishnana...

14
Eliminating Receive Li velock in an Interrupt -Driven Kernel J. C. Mogul and K. K. Ram akrishnana Presented by I. Kim, 01/0 4/13

Upload: natalie-britney-carroll

Post on 03-Jan-2016

219 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Eliminating Receive Livelock in an Interrupt-Driven Kernel J. C. Mogul and K. K. Ramakrishnana Presented by I. Kim, 01/04/13

Eliminating Receive Livelock in an Interrupt-Driven Kernel

J. C. Mogul and K. K. Ramakrishnana

Presented by I. Kim, 01/04/13

Page 2: Eliminating Receive Livelock in an Interrupt-Driven Kernel J. C. Mogul and K. K. Ramakrishnana Presented by I. Kim, 01/04/13

Introduction

• Interrupt vs. Polling– Interrupts are designed for relatively slow I/O devices

• Target applications– Host-based routing, Passive network monitoring, Network file

system– High event rates and protocols without flow control mechanis

m

• Receive Livelock– Interrupt handlers eats up all system resources to handle inp

ut events– Starvation of normal kernel/user threads

Page 3: Eliminating Receive Livelock in an Interrupt-Driven Kernel J. C. Mogul and K. K. Ramakrishnana Presented by I. Kim, 01/04/13

Requirements

• High throughput– Maximum Loss Free Receive Rate

(MLFRR)• Low latency and jitter• Fair allocation of resources

– Packet reception, protocol processing, transmission, and other tasks

• Overall Stability

Page 4: Eliminating Receive Livelock in an Interrupt-Driven Kernel J. C. Mogul and K. K. Ramakrishnana Presented by I. Kim, 01/04/13

Traditional Interrupt-Driven System (4.2 BSD)

• Packet arrival -> interrupt -> device driver (buffer mgmt + DL) -> S/W interrupt

• Several queues among steps– Overload => queue overflow => drop

• Batch processing of burst traffics• Receive livelock, longer latency, and star

vation of transmission processing

Page 5: Eliminating Receive Livelock in an Interrupt-Driven Kernel J. C. Mogul and K. K. Ramakrishnana Presented by I. Kim, 01/04/13

Latency induced by interrupt and batch

processing

Page 6: Eliminating Receive Livelock in an Interrupt-Driven Kernel J. C. Mogul and K. K. Ramakrishnana Presented by I. Kim, 01/04/13

Avoiding Livelock• Limiting interrupt (adaptation bt. poll)

– Packet drop upon reception• Disable interrupt temporarily and re-enable later

– High/low watermark on CPU occupancy• Polling

– Round-robin through registered devices• No preemption while processing a packet already rece

ived– Ensure work conservation– Do nothing in receiving interrupt handler– Removing almost queues in IP processing chain

Page 7: Eliminating Receive Livelock in an Interrupt-Driven Kernel J. C. Mogul and K. K. Ramakrishnana Presented by I. Kim, 01/04/13

Measurements

• Methodology– IP packet router configuration– DEC 3000/300 Alpha based Digital UNIX 3.2 (OSF

/1) : rather slow– 3000/400 as a packet generator– 10,000 UDP packets with 4 bytes payload– Count netstat output (Opkts)– With and without screend (user level PF)

Page 8: Eliminating Receive Livelock in an Interrupt-Driven Kernel J. C. Mogul and K. K. Ramakrishnana Presented by I. Kim, 01/04/13

Receive Livelock Example

Page 9: Eliminating Receive Livelock in an Interrupt-Driven Kernel J. C. Mogul and K. K. Ramakrishnana Presented by I. Kim, 01/04/13
Page 10: Eliminating Receive Livelock in an Interrupt-Driven Kernel J. C. Mogul and K. K. Ramakrishnana Presented by I. Kim, 01/04/13
Page 11: Eliminating Receive Livelock in an Interrupt-Driven Kernel J. C. Mogul and K. K. Ramakrishnana Presented by I. Kim, 01/04/13
Page 12: Eliminating Receive Livelock in an Interrupt-Driven Kernel J. C. Mogul and K. K. Ramakrishnana Presented by I. Kim, 01/04/13

Other Scheduling Heuristics

• Quota on packet burst• Feedback from full queue• Cycle-limit on device driver

Page 13: Eliminating Receive Livelock in an Interrupt-Driven Kernel J. C. Mogul and K. K. Ramakrishnana Presented by I. Kim, 01/04/13

Other performance results

• End-system transport protocols– Benefits user level delivery performance

• Promiscuous network monitor

Page 14: Eliminating Receive Livelock in an Interrupt-Driven Kernel J. C. Mogul and K. K. Ramakrishnana Presented by I. Kim, 01/04/13

Concluding Remarks

• Related and future works– Clocked interrupts– 4.3 BSD terminal I/O– Lazy Receiver Processing– Feedback-based scheduling algorithm– Early packet drop– Extension to Multiprocessor Kernels

• This research provided improved performance in Click project