RE: [PATCH] SN2 user-MMIO CPU migration

From: Brent Casavant <>
Date: 2006-01-24 12:23:50
On Mon, 23 Jan 2006, Luck, Tony wrote:

> Thinking about this a bit more, wouldn't it be better to do this
> work in the rebalance code that is making the decision to move
> the process.  The earlier argument that this would sometimes
> waste time because the process might not actually move doesn't
> sound so strong ... we context switch frequently, we move processes
> rarely.  Doing some work that may be wasted in the rare path sounds
> better than always doing work in the common path.

That's my opinion too, and what the original patch implemented, but
met with a little resistance from Ingo (Ingo: sorry, I forgot to CC 
you on the new patch to linux-ia64, let me know if you want a copy).
I agree with him that it's not wonderful to hook into mainline
scheduler code to solve this, but the alternative is what I presented
here: check if old CPU == new CPU at each context switch-in, entirely
within IA64 code.

An even better solution might be to have a hook in the main scheduler
which sets a "task has migrated" flag in the IA64 thread_info.flags and
add that flag to the IA64_HAS_EXTRA_STATE() macro.  ia64_load_extra()
and a machvec can then do the heavy lifting.  This way the migration
code would never do anything more than flip a bit, and we'd only make
the function call and wait on the Shub register at switch-in time on
the new CPU.  A side-effect of this would be laying most of the
necessary groundwork for what Jack Steiner referred to regarding
a future platform.

Does that, at least on the surface, sound palatable to each of you?
(I'm obviously not asking for a commitment to accept it, just "the
idea doesn't make me wretch").


Brent Casavant                          All music is folk music.  I ain't                        never heard a horse sing a song.
Silicon Graphics, Inc.                    -- Louis Armstrong
To unsubscribe from this list: send the line "unsubscribe linux-ia64" in
the body of a message to
More majordomo info at
Received on Tue Jan 24 12:25:26 2006

This archive was generated by hypermail 2.1.8 : 2006-01-24 12:25:35 EST