Messages in this thread | | | From | Malcolm Beattie <> | Subject | Re: Idea to make a kickass TCP read | Date | Fri, 7 Aug 1998 10:00:31 +0100 (BST) |
| |
Perry Harrington writes: > This idea was prompted by some talk on the Beowulf list. Here goes: > > We can avoid a NIC -> kernel -> user copy sequence if we make a read > call that taked a SHM segment handle as the buffer pointer, and a pointer > to an int which we store the offset within the segment to the data. > It still returns the data size. > > What do you guys think of this idea? Would we be able to implement > something like this (NIC -> userspaceable memory)?
On the "SHM segment handle" side of things, I often feel that making vma descriptors available at user level like file descriptors would be a nice idea. Currently, file descriptors are "first class objects" at user level and can be passed between processes via Unix domain sockets. However, for some things it would be nice to have "mmap" granularity where you map a region of memory (visible kernel-side as a vma) and get a descriptor for it. Then you could set protections on it (say) and "send" it to another process. That process could map it via the descriptor. Note that SysV shm handles aren't quite the same: they're equivalent to sending a filename to another process since the other process has to "reopen" it and the permissions check happens at that point. A first class vma descriptor would be the sort of thing you'd want to pass to your pseudo-read call. Whether or not the networking side could make use of it with its hardware, the semantics would mean that the kernel would be allowed to optimise any transfers however it liked because it knows the entire object it's working on. For passing vma descriptors to other processes, an analogue of SCM_RIGHTS would do the trick.
--Malcolm
-- Malcolm Beattie <mbeattie@sable.ox.ac.uk> Unix Systems Programmer Oxford University Computing Services
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html
| |