From: John Richard Moser <nigelenki@comcast.net>
To: Phillip Susi <psusi@cfl.rr.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Can context switches be faster?
Date: Thu, 12 Oct 2006 14:29:20 -0400 [thread overview]
Message-ID: <452E8980.5040504@comcast.net> (raw)
In-Reply-To: <452E876F.1000604@cfl.rr.com>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Phillip Susi wrote:
> John Richard Moser wrote:
>> Can context switches be made faster? This is a simple question, mainly
>> because I don't really understand what happens during a context switch
>> that the kernel has control over (besides storing registers).
>>
>
> Besides saving the registers, the expensive operation in a context
> switch involves flushing caches and switching page tables. This can be
> avoided if the new and old processes both share the same address space.
>
i.e. this can be avoided when switching to threads in the same process.
How does a page table switch work? As I understand there are PTE chains
which are pretty much linked lists the MMU follows; I can't imagine this
being a harder problem than replacing the head. I'd imagine the head
PTE would be something like a no-access page that's not really mapped to
anything so exchanging it is pretty much exchanging its "next" pointer?
>
>
- --
We will enslave their women, eat their children and rape their
cattle!
-- Bosc, Evil alien overlord from the fifth dimension
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iQIVAwUBRS6JfQs1xW0HCTEFAQL9NQ//Qs7SGrlE0fGDj0HFssed/cVDrjR9GUFL
RzjJFNyB0DmDKLEcIfcYjWnvvyvFX1ggCPYflOcUXo57jz6GCsSBs0p+nXAheZiH
B301nk4ZKj6B18UOqv3NDY7r5wV0L2x54TM98Ty4CxgvKw5Jglno4fLZQs9Tefmk
2woLmyJkiDG2xlRijmfEbSXQPo/wNIfYaDrJlvRPgEJiDa1j7cCHP+o2wZEnJCr9
UMpEooaZ8n8cO5CVP7YiG/sG52GG3cbW9j5FbueQOAjxySNX2X8JVT3wLGHixvB4
z6BpvnCpgNVoe1LQFDleUjP3Lb0rO9ap3HMlLJ/lbs7LeegLgtUDW2uaa4PXcc9C
uEiwA1BNEZMIYhSsiek+acojmmGh9zOsI2nfjBmZoj6UJOjSyYz7srZTWKLILVi+
0hffeQs2FWHQ7sMSRhjM8ITMjZGvK85AnBwdsf2jEIGGOMixq2BAkYu+Ljq5FLOJ
VKdaqmLq60vzMqLeb7pdWJgDXNvxU5RLvnktkuPBSlftPLwNvGf1GVSEXEKkJ9/Y
VhTfX9gFKHC59N9qn01KpkhG9cVXfUPU5nDlfYdCrgkf7QX4aTEg6kt9ALg4fDlN
W2cFr4bfjGLBmqsI9FP/Zxq42N1F9bXIym3HcSmTn/fsoiTQdUcuxUKkdKA7cXiE
xMyKfw/+y0Q=
=NEcB
-----END PGP SIGNATURE-----
next prev parent reply other threads:[~2006-10-12 18:29 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-10-12 15:44 Can context switches be faster? John Richard Moser
2006-10-12 15:53 ` John Richard Moser
2006-10-12 17:19 ` Russell King
2006-10-12 18:25 ` John Richard Moser
2006-10-12 18:37 ` Arjan van de Ven
2006-10-12 18:56 ` John Richard Moser
2006-10-12 19:02 ` Arjan van de Ven
2006-10-13 11:05 ` James Courtier-Dutton
2006-10-13 14:51 ` Chase Venters
2006-10-12 18:20 ` Phillip Susi
2006-10-12 18:29 ` John Richard Moser [this message]
2006-10-13 2:53 ` Andrew James Wade
2006-10-13 5:29 ` John Richard Moser
2006-10-13 16:56 ` Andrew James Wade
2006-10-13 17:24 ` John Richard Moser
2006-10-12 19:57 ` Chris Friesen
2006-10-12 20:23 ` John Richard Moser
2006-10-12 20:29 ` Arjan van de Ven
2006-10-12 20:36 ` John Richard Moser
2006-10-12 20:35 ` Jeremy Fitzhardinge
2006-10-13 23:32 ` Andreas Mohr
2006-10-13 23:47 ` David Lang
2006-10-14 0:14 ` Jeremy Fitzhardinge
2006-10-14 0:30 ` Alan Cox
2006-10-14 0:14 ` Jeremy Fitzhardinge
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=452E8980.5040504@comcast.net \
--to=nigelenki@comcast.net \
--cc=linux-kernel@vger.kernel.org \
--cc=psusi@cfl.rr.com \
/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.