]> git.kaiwu.me - haproxy.git/commit
[OPTIM] linux: add support for bypassing libc to force using vsyscalls
authorWilly Tarreau <w@1wt.eu>
Sun, 14 Nov 2010 16:09:33 +0000 (17:09 +0100)
committerWilly Tarreau <w@1wt.eu>
Sun, 14 Nov 2010 16:09:33 +0000 (17:09 +0100)
commit48d84c10b5552470e171d4146bfe82c2209d0a50
tree5e27e1f6faeb6bdc6ad95543d5e9107fbcd41cd9
parentb695a6e5fad47a485d63642f98c86ad758e48002
[OPTIM] linux: add support for bypassing libc to force using vsyscalls

Some distros' libc are built for CPUs earlier than i686 and as such do
not offer support for Linux kernel's faster vsyscalls. This code adds
a new build option USE_VSYSCALLS to bypass libc for most commonly used
system calls. A net gain of about 10% can be observed with this change
alone.

It only works when /proc/sys/abi/vsyscall32 equals exactly 2. When it's
set to 1, the VDSO is randomized and cannot be used.
Makefile
src/i386-linux-vsys.c [new file with mode: 0644]
src/stream_sock.c