x86 system call (using sysenter) perf regression
From: vivek thakkar <hidden>
Date: 2021-07-12 04:18:12
We ran a test to measure the syscall performance on two different
kernels (v4.9.x and v4.0.9). The program is as simple as this:
for (int i =0; i< 100'000'000; i++) {
syscall(SYS_getpid);
}
The program was built for x86 and was using the "vdso" mechanism to
generate the system call and we could confirm that it was
transitioning into the kernel using sysenter.
We find that the time taken by each system call takes 10ns more in
4.9.x as compared to 4.0.9. On deeper analysis, we found that there
are 40 more instructions that get executed in the newer kernel version
- the user space transitioning mechanism based off of vdso remains the
same.
commit 5f310f739b4cc343f3f087681e41bbc2f0ce902d
Author: Andy Lutomirski [off-list ref]
Date: Mon Oct 5 17:48:15 2015 -0700
x86/entry/32: Re-implement SYSENTER using the new C path
Is that something that is already known to the community?
Regards,
Vivek Thakkar