linux-um archives
 help / color / mirror / Atom feed
From: Young Koh <young.koh@gmail.com>
To: Blaisorblade <blaisorblade@yahoo.it>
Cc: user-mode-linux-devel@lists.sourceforge.net,
	Jeff Dike <jdike@addtoit.com>
Subject: Re: [uml-devel] a question about sigsetjmp() in copy_from/to_user()
Date: Fri, 30 Sep 2005 11:08:04 -0400	[thread overview]
Message-ID: <3524bf1f0509300808scdb25acga0e2bc9f8fd9008c@mail.gmail.com> (raw)
In-Reply-To: <200509291409.28067.blaisorblade@yahoo.it>

> > it seems that sigsetjmp() has
> > relatively large overhead, we could reduce some overhead by not
> > calling it.
>
> How do you measure it? I'm curious myself - I know there's the possibility to
> use gprof, but I've never used that myself.

i usually use pentium rdtsc(read time stamp counter) to measure the
timing and latency. (sometimes by instrumenting kernel or sometimes by
measuring test programs) i ran a test program and measured the
overhead of sigsetjmp() and setjmp(). it showed sigsetjmp() uses
around 1350 cycles (which is around 0.45 us in 3.0GHz machine), and
setjmp() only 21 cycles (< 0.01us). maybe while sigsetjmp() is
implemented as a system call to cope with signal blocking/unblocking,
setjmp() is not a system call? (getpid() itself takes more than 1000
cycles)

thanks,

>
> Surely the "sig" thing is heavy (some syscalls like sigprocmask() for
> blocking/unblocking signals). Or better, it's the only heavy thing - the rest
> consists only of saving a couple of registers (6, IIRC) in memory, there's no
> interest in optimizing it away (I assume).
>


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

  reply	other threads:[~2005-09-30 15:36 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-09-27 14:06 [uml-devel] a question about sigsetjmp() in copy_from/to_user() Young Koh
2005-09-27 17:28 ` Jeff Dike
2005-09-28 11:59   ` Blaisorblade
2005-09-28 13:47     ` Young Koh
2005-09-28 14:50       ` Jeff Dike
2005-09-28 19:25         ` Young Koh
2005-09-29 12:09           ` Blaisorblade
2005-09-30 15:08             ` Young Koh [this message]
2005-09-30 15:44               ` Geert Uytterhoeven
2005-10-02  1:03             ` Jeff Dike
2005-10-02 10:23               ` Blaisorblade
2005-10-02 18:31                 ` Jeff Dike
2005-10-03 18:35                   ` Blaisorblade
2005-10-03 20:38                     ` Jeff Dike
2005-09-28 16:09     ` Jeff Dike
2005-09-28 17:26       ` Blaisorblade
2005-09-28 18:43         ` Jeff Dike
2005-09-28  8:41 ` Blaisorblade
2005-09-28 14:22   ` Young Koh
2005-09-28 16:43     ` Blaisorblade

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=3524bf1f0509300808scdb25acga0e2bc9f8fd9008c@mail.gmail.com \
    --to=young.koh@gmail.com \
    --cc=blaisorblade@yahoo.it \
    --cc=jdike@addtoit.com \
    --cc=user-mode-linux-devel@lists.sourceforge.net \
    /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