Re: Main CPU- I/O CPU interaction

From: Valdis . Kletnieks
Date: Mon Jan 03 2005 - 17:37:25 EST


On Mon, 03 Jan 2005 00:44:36 GMT, tony osborne said:

> The I/O devices are equipped with dedicated processor to free the main CPU
> from doing the low level I/O operations.

Even a "smart" RAID/SCS/ATA controller is pretty stupid - at best it can be
trusted to find block number N and either read or write it. If you're *really*
lucky, the controller knows about partitions. Any further intelligence is the
realm of IBM-style big iron (where the 'set extent' and 'search key high/low/
equal' CCW commands can offload a significant amount of work). But even there,
the hardware has no filesystem awareness.

> However, if i am editing and
> updating a big size file and i want to save
> it afterwards, i notice my PC getting blocked while saving the file which
> theoritically should NOT happen as it is up to the I/O device processor and
> not the main CPU to save the data into the disk;

What sort of I/O device processor is (a) supported by Linux *and* (b) filesystem
aware? Unless it meets both criteria, the main CPU(s) will still have to do
all the work of block allocation, inode creation, and all the rest of that
stuff.

So what sort of hardware were you thinking of, where the "I/O processor" is
smart enough to handle saving a file (from within an application, no less)
without CPU interference? (and if you're saving the file from within the
application, what API is used to tell the I/O processor whether to use an
"open and fseek to 0" style overwrite, or "rename, creat, write, close, unlink
old" style - all without CPU interference?)

Attachment: pgp00000.pgp
Description: PGP signature