Re: Linux-2.5.17

Dave McCracken (dmccr@us.ibm.com)
Wed, 22 May 2002 09:14:53 -0500


--On Tuesday, May 21, 2002 08:21:56 PM -0700 Linus Torvalds
<torvalds@transmeta.com> wrote:

> The problem is just finding a _good_ context to switch to. We can do this
> two different ways:
>
> (...)
>
> - my preferred solution: speculatively find _some_ process (preferably
> one that we are likely to schedule next), and use that process's
> "active_mm" to do a "switch_mm()" into (and set that to "current->mm")
>
> The speculative thing has the problem of finding a good process, but I
> would suggest something along the lines of:
>
> - take the first process in the run-queue on the current CPU.
> - if there is no process on th erun-queue, take our parent

What would be the incremental cost of just switching to init_mm? Granted,
it's likely to require switching again when you schedule, but this is the
exit path. It could be a fallback if nothing else looks good.

Dave McCracken

======================================================================
Dave McCracken IBM Linux Base Kernel Team 1-512-838-3059
dmccr@us.ibm.com T/L 678-3059

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/