[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1170656058.3073.1230.camel@laptopd505.fenrus.org>
Date: Mon, 05 Feb 2007 07:14:18 +0100
From: Arjan van de Ven <arjan@...radead.org>
To: Bill Davidsen <davidsen@....com>
Cc: Jakub Jelinek <jakub@...hat.com>, linux-kernel@...r.kernel.org
Subject: Re: [ANN] Userspace M-on-N threading model implementation. Alpha
release.
> > 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists