Abstract:Linux is widely adopted in routers nowadays, and traffic control is one of the most important functions for this kind of network-oriented operating systems. This paper studies the traffic control mechanism of Linux system and shows that the packet scheduling based traffic control mechanism adopted by current Linux kernel lacks a global view of system bandwidth, and is also short of efficient ingress scheduling. This can result in unnecessary CPU time wasting. To address this problem, a novel traffic control scheme is proposed, which is based on the CPU scheduling of the network protocol processing. By transplanting packet scheduling from the egress point of network interfaces to the soft interrupt handler that processes incoming packets, the new method can eliminate disadvantages of the old traffic control scheme without introducing any additional demerits. An implementation of the new traffic control scheme is given, and comparative experimental results show that the new mechanism has fewer overload than the old traffic control scheme in Linux, and can maintain the efficiency of traffic isolation and traffic policing while avoiding the CPU time wasting.