开发者

when the io request was removed from io queue?

开发者 https://www.devze.com 2023-01-30 22:31 出处:网络
Linux RH5.4 OS, ext3 file system In time T1, when i read/write a file, a i/o request will be send to OS(disk?) working queue, suppose the disk spend 10 ms to serve this request, now the time is T2=开发

Linux RH5.4 OS, ext3 file system In time T1, when i read/write a file, a i/o request will be send to OS(disk?) working queue, suppose the disk spend 10 ms to serve this request, now the time is T2=开发者_如何学运维T1+10ms, then the question is: When the request was removed from OS(disk?) working queue? at T1 or T2?

thank you.


Up until about 2.6.31, it was up to each individual device driver to decide when to remove requests from the kernel request queue.

In more recent kernels, requests are always removed from the queue as the driver retrieves them to send to the device.

If the disk has a queue (i.e. ATA NCQ), a request will remain in the disk's queue from the time when the driver places it there until the driver overwrites it with a later request (after the disk has signalled completion of the first request). Disk queues aren't strictly queues as there is no head or tail, it's just a pool of command slots that can be started independently.

0

精彩评论

暂无评论...
验证码 换一张
取 消