From: trajber@gmail.com (Mauro Romano Trajber)
To: kernelnewbies@lists.kernelnewbies.org
Subject: syscalls performance
Date: Fri, 25 Feb 2011 14:03:24 -0300 [thread overview]
Message-ID: <AANLkTimZac++X4jUsz2-bTTtEJwOR45NHAQ=GR3xCVnG@mail.gmail.com> (raw)
I was doing some performance tests of system calls and I find an interesting
behavior.
Using RDTSC to count the CPU cycles, a single call to the getpid() consumes
about 7k of CPU clock cycles and ten calls consume approximately 9,800
cycles.
The fact is that from the second call, the CPU cycles grows at a rate of
about 350 CPU cycles per call.
Why does this happen? There is some hardware optimization when the syscall
ID is already in EAX register ?
Any ideias ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110225/006d5510/attachment.html
next reply other threads:[~2011-02-25 17:03 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-25 17:03 Mauro Romano Trajber [this message]
2011-02-25 17:15 ` syscalls performance Daniel Baluta
2011-02-25 18:22 ` Mauro Romano Trajber
2011-02-25 20:15 ` Daniel Baluta
2011-02-25 20:30 ` Mauro Romano Trajber
2011-02-25 20:42 ` Enrico Granata
2011-02-25 20:59 ` Jim Kukunas
2011-02-25 21:00 ` Enrico Granata
2011-02-25 22:03 ` Mauro Romano Trajber
2011-02-25 22:06 ` Daniel Baluta
2011-02-25 22:14 ` Enrico Granata
2011-02-26 4:31 ` Mulyadi Santosa
[not found] <D3CBA33B-3809-4AF5-9F66-0F2D256C4A82@cs.ucsd.edu>
2011-02-25 17:14 ` Enrico Granata
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='AANLkTimZac++X4jUsz2-bTTtEJwOR45NHAQ=GR3xCVnG@mail.gmail.com' \
--to=trajber@gmail.com \
--cc=kernelnewbies@lists.kernelnewbies.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).