On Tuesday, 2 November 1999 at 17:10:41 -0500, Zhihui Zhang wrote:
>
> It is said that the granularity of disk I/O is a sector. I read a little
> bit of the source code isa/wd.c, which I think is the driver of IDE disks.
> I find out that the disk can perform multi-block I/O sometimes. Does this
> mean the granularity of disk I/O can be multi-sector?
I think you're getting bogged down in terminology. I understand
"granularity" to imply the steps in which a quantity can be increased.
In this case, a disk transfer is a whole number of sectors between 1
and 256 (though there's an artificial limit which makes it difficult
to transfer more than 60 at a time). Using my definition, it would be
correct to say that the granularity is 1 sector.
> If the disk can perform DMA, what is the usual DMA size?
It's normally the size of the transfer, but in the case of IDE drives
it can be limited to a maximum value by the the disk flags.
> If a buffer cache is larger than one sector, it should be split into
> sectors before I/O.
No, that would give lousy performance. Buffer cache is also allocated
in blocks corresponding to the transfer size.
> If an I/O on a buffer fails, can we tell which sector within that
> buffer fails?
I don't think we do that. The way to recover would be to retry the
I/O a sector at a time. That way, you waste time in the exceptional
case only.
Greg
--
Finger [EMAIL PROTECTED] for PGP public key
See complete headers for address and phone numbers
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message