The IDE implementation used to busy-poll for DMA completion on every operation.
This had a number of bad effects:
Only one disk operation could happen at a time
No other interrupts could be serviced while the disk operation was happening,
because interrupts are always disabled in the kernel.
This commit fixes the latter problem, but not the former problem; now the IDE
driver supports doing one operation at a time, but actually deschedules the
thread while it's happening, and wakes it up once it receives an interrupt.
In practice, writing a single sector is probably pretty fast, but if a disk
seek is involved, this could still free up noticable amount of time. But, in
follow-on commits I'm going to allow multiple concurrent operations at once,
and probable allow users to start larger operations than a single sector as
well.
The IDE implementation used to busy-poll for DMA completion on every operation. This had a number of bad effects:
This commit fixes the latter problem, but not the former problem; now the IDE driver supports doing one operation at a time, but actually deschedules the thread while it's happening, and wakes it up once it receives an interrupt.
In practice, writing a single sector is probably pretty fast, but if a disk seek is involved, this could still free up noticable amount of time. But, in follow-on commits I'm going to allow multiple concurrent operations at once, and probable allow users to start larger operations than a single sector as well.