设计相似的例子

  1. Anticipatory I/O Scheduler 和 NAPI Poll Mode

    Linux Kernel Developement 3ed Chapter 14 The Block I/O Layer:

    The Anticipatory I/O scheduler attempts to minimize the seek storm that accompanies read requests issued during other disk I/O activity.When a read request is issued, it is handled as usual, within its usual expiration period.After the request is submitted, however, the Anticipatory I/O scheduler does not immediately seek back and return to handling other requests. Instead, it does absolutely nothing for a few milliseconds. (The actual value is configurable; by default it is six milliseconds.) In those few milliseconds, there is a good chance that the application will submit another read request.Any requests issued to an adjacent area of the disk are immediately handled.After the waiting period elapses, the Anticipatory I/O scheduler seeks back to where it left off and continues handling the previous requests.


    Linux Kernel Networking Implementation and Theory Chapter 1 Introduction

     New API (NAPI) in Network Devices
    The old network device drivers worked in interrupt-driven mode, which means that for every received packet, there was an interrupt. This proved to be inefficient in terms of performance under high load traffic. A new software technique was developed, called New API (NAPI), which is now supported on almost all Linux network device drivers. NAPI was first introduced in the 2.5/2.6 kernel and was backported to the 2.4.20 kernel. With NAPI, under high load, the network device driver works in polling mode and not in interrupt-driven mode. This means that each received packet does not trigger an interrupt. Instead the packets are buffered in the driver, and the kernel polls the driver from time to time to fetch the packets. Using NAPI improves performance under high load. For sockets applications that need the lowest possible latency and are willing to pay a cost of higher CPU utilization, Linux has added a capability for Busy Polling on Sockets from kernel 3.11 and later. This technology is discussed in Chapter 14, in the “Busy Poll Sockets” section.

posted @ 2017-07-08 15:01  AlbumCover  阅读(160)  评论(0编辑  收藏  举报