LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Arjan van de Ven <arjan@infradead.org>
To: Bill Davidsen <davidsen@tmr.com>
Cc: Jakub Jelinek <jakub@redhat.com>, linux-kernel@vger.kernel.org
Subject: Re: [ANN] Userspace M-on-N threading model implementation. Alpha release.
Date: Mon, 05 Feb 2007 07:14:18 +0100	[thread overview]
Message-ID: <1170656058.3073.1230.camel@laptopd505.fenrus.org> (raw)
In-Reply-To: <45C65353.5000602@tmr.com>


> > On the other side, the overhead you need to add for every single syscall
> > that might block for the M:N threads and the associated complications
> > which make it far harder to conform to POSIX IMHO far outweight the costs
> > of going into the kernel for a context switch.
> 
> That really wasn't my question, Arjan said that switching real threads 
> wasn't a context switch in the hardware sense, and I was asking if I 
> missed something.

a hardware context switch is basically a CR3 change with associated tlb
flush. That is the part that is the most expensive of a context switch.
Just going into the kernel and getting out with a different EIP/ESP is
really cheap, in the order of "a few hundred cycles"; not a heck of a
lot more expensive than a simple getpid or other simple system call.


>  It may be cheap, but it would seem to be a context 
> switch none-the-less.

it includes a privilege level switch, not so much a full context
switch...

-- 
if you want to mail me at work (you don't), use arjan (at) linux.intel.com
Test the interaction between Linux and your BIOS via http://www.linuxfirmwarekit.org


  reply	other threads:[~2007-02-05  6:14 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-30 21:16 Kaz Kylheku
2007-01-31  8:47 ` Evgeniy Polyakov
2007-02-02 16:12 ` Bill Davidsen
2007-02-03 15:26   ` Arjan van de Ven
2007-02-04 20:12     ` Bill Davidsen
2007-02-04 20:20       ` Jakub Jelinek
2007-02-04 21:42         ` Bill Davidsen
2007-02-05  6:14           ` Arjan van de Ven [this message]
2007-02-14 12:17           ` Pavel Machek
2007-02-04 22:52         ` Davide Libenzi
  -- strict thread matches above, loose matches on Subject: below --
2007-01-29 14:52 Evgeniy Polyakov
2007-01-29 14:57 ` Evgeniy Polyakov
2007-01-29 16:40 ` Chris Friesen
2007-01-30  9:46   ` Evgeniy Polyakov
     [not found] ` <40f323d00701290747y68c8e27ege824694bfa378f58@mail.gmail.com>
2007-01-30  1:18   ` Samuel Thibault
2007-01-30  9:53     ` Evgeniy Polyakov
2007-01-30 10:24       ` Samuel Thibault
2007-01-30 10:43         ` Evgeniy Polyakov
2007-02-01  4:28 ` Lee Revell
2007-02-01  7:09   ` Evgeniy Polyakov

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=1170656058.3073.1230.camel@laptopd505.fenrus.org \
    --to=arjan@infradead.org \
    --cc=davidsen@tmr.com \
    --cc=jakub@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: [ANN] Userspace M-on-N threading model implementation. Alpha release.' \
    /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

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).