Messages in this thread | | | Date | Sun, 1 Apr 2012 08:50:19 +0200 | From | Willy Tarreau <> | Subject | Re: [PATCH] x86-32: A better system call mechanism |
| |
Hi Peter,
On Sun, Apr 01, 2012 at 12:00:00AM +0000, H. Peter Anvin wrote: > On x86-32, we currently use int $0x80 as the primary system call > mechanism. Although there are some recent variants available on > certain hardware (sysenter, syscall) via the vdso, the primary system > call vector is still way up the interrupt vector table, which is > inefficient. > > This patch adds a very small amount of code which permits the very > first vector to be used for system call. That vector is #DE, divide > error, generally known as division by zero.
Looks like a clever trick, but beyond the beauty, what does it really save ? Code size is the same as aam 0 / div edx are both 2-byte long, just like int 0x80. Is the call less expensive ? And if so, how does it compare to vdso ?
Thanks, Willy
| |