All of lore.kernel.org
 help / color / mirror / Atom feed
From: vivek thakkar <vthakkar.systems@gmail.com>
To: x86@kernel.org
Cc: linux-arch@vger.kernel.org
Subject: x86 system call (using sysenter) perf regression
Date: Mon, 12 Jul 2021 09:47:55 +0530	[thread overview]
Message-ID: <CAFOO9hwU3oS9Z2v-uqK5U_B+Sdy-whU3rd_BcecO3ogPHmoFXA@mail.gmail.com> (raw)

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@kernel.org>
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

             reply	other threads:[~2021-07-12  4:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-12  4:17 vivek thakkar [this message]
2021-07-12 20:50 ` x86 system call (using sysenter) perf regression Andy Lutomirski
2021-07-13  2:36   ` vivek thakkar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFOO9hwU3oS9Z2v-uqK5U_B+Sdy-whU3rd_BcecO3ogPHmoFXA@mail.gmail.com \
    --to=vthakkar.systems@gmail.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.