mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King <rmk+lkml@arm.linux.org.uk>
To: John Richard Moser <nigelenki@comcast.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Can context switches be faster?
Date: Thu, 12 Oct 2006 18:19:30 +0100	[thread overview]
Message-ID: <20061012171929.GB24658@flint.arm.linux.org.uk> (raw)
In-Reply-To: <452E62F8.5010402@comcast.net>

On Thu, Oct 12, 2006 at 11:44:56AM -0400, 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).

They can be, but there's a big penalty that you pay for it.  You must
limit the virtual memory space to 32MB for _every_ process in the
system, and if you have many processes running (I forget how many)
you end up running into the same latency problems.

The latency problem comes from the requirement to keep the cache
coherent with the VM mappings, and to this extent on Linux we need to
flush the cache each time we change the VM mapping.

There have been projects in the past which have come and gone to
support the "Fast Context Switch" approach found on these CPUs, but
patches have _never_ been submitted, so I can only conclude that the
projects never got off the ground.

-- 
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 Serial core

  parent reply	other threads:[~2006-10-12 17:19 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-12 15:44 John Richard Moser
2006-10-12 15:53 ` John Richard Moser
2006-10-12 17:19 ` Russell King [this message]
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
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=20061012171929.GB24658@flint.arm.linux.org.uk \
    --to=rmk+lkml@arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nigelenki@comcast.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

all inboxes | Powered by JetHome®