Re: A simpler variant on sys_indirect?

From: Linus Torvalds
Date: Sat Jun 30 2007 - 17:51:40 EST




On Sat, 30 Jun 2007, linux@xxxxxxxxxxx wrote:
>
> The downsides are that you need to save and restore the prefix flags
> across signal delivery, and you have a second user/kernel/user transition.

Both of these are basically horrible mistakes.

The first one will almost certainly break things that get clever, like
strace, and just make things really hard to debug.

The second one means that you are guaranteed to be basically twice as slow
on any fast system call, since the system call overhead itself is usually
quite a noticeable cost, often dominating everything else.

> And if the kernel entry overhead IS a problem, wouldn't you want to
> batch together the non-prefix system calls as well, using something like
> the syslet ideas that were kicked around recently? That would
> allow less than 1 kernel entry per system call, even with prefixes.

The batching has serious problems, not the least of which is that it's a
fundamentally more complex interface, and introduces issues like "how do
we pass values from one system call to the next".

That's why I shot it down for syslets too.

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/