Re: Intel P6 vs P7 system call performance

H. Peter Anvin (hpa@transmeta.com)
Tue, 17 Dec 2002 20:36:38 -0800


Linus Torvalds wrote:
>>
>>Destroying %ecx is a lot less destructive than destroying %eip and %esp...
>
> Actually, as far as the kernel is concerned, they are about equally bad.
>

Right, but from a user-mode point of view it means at least one extra
instruction.

> Destroying %eip is the _least_ bad register to destroy, since the kernel
> can control that part, and it is trivial to just have a single call site.

Trivial, perhaps, but it requires a call/ret pair in userspace, which is
a fairly expensive form of push/pop.

> The good news is that since both of them suck, it's easier to make the
> six-argument decision. Since six arguments are problematic for all major
> "fast" system calls, my executive decision is to just say that
> six-argument system calls will just have to continue using the old and
> slower system call interface. It's kind of a crock, but it's simply due to
> silly CPU designers.

Oh, so you're not going to do the "read from stack" thing? (Agreed, by
the way, on the CPU design -- both SYSENTER and SYSCALL suck. SYSCALL
was changed rather substantially in x86-64 for that reason.)

-hpa

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