Re: 2.3.30pre1 syscall w/6 args support?

Linus Torvalds (torvalds@transmeta.com)
Tue, 7 Dec 1999 21:55:24 -0800 (PST)


On 8 Dec 1999, Andi Kleen wrote:
>
> This just destroyed all registers, so the syscall stub would need to save
> them redundantly (entry.S does it anyways). With multiple magic addresses
> per syscall-with-N-arguments it gets more ugly.

Note that the _fast_ case would be the sysenter case, which is fine.

> The obvious micro optimization of reversing the order of the register loads
> and using magic_address+(6-NARGS)*4 would probably not scale too well to
> IA64 magic.

I don't know what IA64 does, because I haven't signed any NDA's, but as
far as I know the native 64-bit portion will trap on all "int" things in
i32 mode, so we can actually probably just optimize "int 0x80" to do
exactly what we want - essentially make it "sysenter" if we wanted to ;)

> Also it costs you one TLB entry.

Nope. Think global. It actually will probably _save_ you TLB reloads,
because you'll never have to page the thing in, and it will probably end
up being in the TLB pretty much all the time (because it can be shared
with all processes - it's no longer a per-process thing).

That said, obviously we'd always do better from a TLB standpoint if we
could statically link the binary and especially if our linker could do
code-placement. The first one is unrealistic for other reasons, but I
think somebody was thinking about code placement for GNU 'ld'.

Linus

-
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.tux.org/lkml/