Proposal: merged system calls

Pedro Roque Marques (roque@di.fc.ul.pt)
Sun, 19 May 1996 22:57:16 +0100


>>>>> "Ingo" == Ingo Molnar <mingo@kaliban.csoma.elte.hu> writes:

Hi Ingo,

Ingo> these are 2.1 thoughts (but i cant wait :)

Ingo> [ yes master, going back betatesting soon :) ]

Ingo> one argument against kernel features is the overhead of the
Ingo> kernel-user space transitions. what about making it possible
Ingo> to call several syscalls at once ...

I've an alternative view

what we should have for performance in terms of networking is an API
that would allow the buffers used for send/recv to be remapped into
kernel space

say:
buf_ptr = alloc_buff(npages);
put data into buf.
send(buf_ptr); <- buf_ptr is now invalid for the application and as
been remapped into kernel space.

we could then redefine sk_buff to have a small header area and a
pointer to the remapped pages. This would make Linux networking really
fly.

this way, only one copy would be done in to send a datagram,
directly to the device driver, and it would work for both TCP and UDP.
If we extend this model to read and write syscalls for normal files it
should be possible to receive a page from the kernel and give it back
to the network without copies involved.

We would still have the price of two protection domain transversals
but i believe that this is an area where Linux behaves well... at
least the null syscall times where considered to be good last time
i've seen benchmark reports.

Ingo> does this "merging" stuff make sense?

sense ?! well for the cases where such syscalls were defined it could
boost performance but it is very very uggly IMHO and not generic enhought
i believe.

The kind of API i'm proposing is all but a new idea and it has been
implemented already (at least i've read a paper about it). Maybe Larry
McVoy can give us more info on this issues ... we've read some articles
written by him about high speed networking on comp.protocols.tcp-ip
that touch this subject.

regards,
Pedro.