Re: x86 system call (using sysenter) perf regression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Sun, Jul 11, 2021, at 9:17 PM, vivek thakkar wrote:
> 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 <luto@xxxxxxxxxx>
> 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?
> 

Yes. We made a conscious decision to trade a bit of performance for a lot of maintainability, especially for a legacy-ish path. The old SYSENTER code was a mess.

> Regards,
> Vivek Thakkar
> 



[Index of Archives]     [Linux Kernel]     [Kernel Newbies]     [x86 Platform Driver]     [Netdev]     [Linux Wireless]     [Netfilter]     [Bugtraq]     [Linux Filesystems]     [Yosemite Discussion]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux