计算机应用 ›› 2010, Vol. 30 ›› Issue (1): 104-107.

• 网络与通信 • 上一篇    下一篇

优化Linux网络处理性能的软中断处理机制

熊安萍1,韩松2,蒋溢1   

  1. 1.
    2. 重庆邮电大学
  • 收稿日期:2009-07-23 修回日期:2009-09-06 发布日期:2010-01-01 出版日期:2010-01-01
  • 通讯作者: 韩松
  • 基金资助:
    重庆市信息产业发展专项资金

Soft interruption handling mechanism to optimize handling performance for Linux network

  • Received:2009-07-23 Revised:2009-09-06 Online:2010-01-01 Published:2010-01-01

摘要: 软中断在Linux内核中,作为一种对时间要求最为严格的中断下半部处理机制,在处理网络数据包的过程中发挥着无可替代的作用,而软中断处理函数采用固定的循环检测次数,以至于系统可能在网络负载高的情况下对数据包不能进行及时有效处理。提出了一种最大循环检测次数可动态变化的方法来优化软中断处理机制,实验表明,相比现有的软中断机制而言,在同样的环境下可以处理更多的软中断例程,表现为捕获更多的网络数据包,提升了系统处理软中断的能力,进而在系统级上优化了Linux网络处理性能。

关键词: 软中断, 下半部处理机制, Linux内核, 最大循环检测次数

Abstract: As the most strict bottom half handling mechanism of interruption on time accuracy, soft interrupt mechanism plays an irreplaceable role in the process of handling network packet. However, unalterable circular check times taken by soft interruption handling function causes system unable to handle packets effectively under high traffic load. This paper presented a methodology of adaptive circular checking times to optimize soft interruption handling mechanism. Test shows that compared with the former mechanism, current soft interruption mechanism can handle more soft interruption routines in the same condition, i.e. capturing more network packets. The methodology improves the system′s capacity to handle soft interruptions and optimizes the handling capability of Linux network.

Key words: soft interruption, bottom half handling mechanism, Linux kernel, max circular checking times