lkml.org 
[lkml]   [1997]   [Sep]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: OFFTOPIC: Regarding NT vs Linux
Date
: 
: > 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.

\
 
 \ /
  Last update: 2005-03-22 13:40    [W:1.925 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site