Messages in this thread | | | From | (Larry McVoy) | Subject | Re: OFFTOPIC: Regarding NT vs Linux | Date | Tue, 23 Sep 1997 18:43:10 -0700 |
| |
: : > the network adapter. It would be nice if the SCSI adapter (we are not : > talking about something else, do we?) could write the data directly to the : > network interface card. This is what I expect to happen in a workstation. : : Not likely. On a big SGI yes, otherwise no
SGI's don't do it either. The apps do stuff like
disk = open("foo", O_RDONLY|O_DIRECT); net = socket(...); buf = valloc(big size);
while (n = read(disk, buf, sizeof(buf)) write(net, buf, n);
The file system, when in O_DIRECT mode, does DMA from the disk to the user buffer. The network, when in page aligned (note the valloc) does copy on write on transmit (and page flips on receive). The networking hardware does the checksum. In both cases, the processor never sees the data.
So the read/write paradigm is preserved. Alan is right in saying:
: It isnt. Its hellish to implement. In fact you'd implement it in the kernel : by faking calls to sys_mmap anyway ..
SGI is looking at a copy_file() like interface that I designed before I left. It's called "splice(from, to, length)" and I have a few notes I can post if the list is interested.
| |