>>anyway. даже в пределах данной ссылки я не понимаю одного.. sys/kern для
>>FreeBSD и оптимизация перемещения головок на ATA диске. какая между ними
>>связь?
>
>http://fxr.watson.org/fxr/source/kern/subr_disk.c#L127 если я правильно понимаю ситуацию, это аналог/переработка disksort() из оригинальной BSD:
---cut---
Sorting of Disk I/O Requests
The kernel provides a generic disksort() routine that can be used by all the disk device drivers to sort I/O requests into a drive's request queue using an elevator sorting algorithm. This algorithm sorts requests in a cyclic, ascending, cylinder order, so that requests can be serviced with a minimal number of one-way scans over the drive. This ordering was originally designed to support the normal readahead requested by the filesystem as well as to counteract the filesystem's random placement of data on a drive. With the improved placement algorithms in the current filesystem, the effect of the disksort() routine is less noticeable; disksort() produces the largest effect when there are multiple simultaneous users of a drive.
disksort(dq, bp)
drive queue *dq;
buffer *bp;
{
if (drive queue is empty) {
place the buffer at the front of the drive queue;
return;
}
if (request lies before the first active request) {
locate the beginning of the second request list;
sort bp into the second request list;
} else
sort bp into the current request list;
}
---cut---
(c) "Design and Implementation of the BSD 4.4 Operating System"
вопрос собссно - вы уверены, что это все еще имеет практический смысл с точки зрения оптимизации движения головок на современном ATA диске ? :)
// wbr