Re: [PATCH -v5][RFC]: mutex: implement adaptive spinning

Steven Rostedt
2009-01-08T14:24:22Z

On Thu, 8 Jan 2009, Andi Kleen wrote:

> > What about memory hotplug as Ingo mentioned?
> >
> > Should that be:
> >
> > #if defined(CONFIG_DEBUG_PAGEALLOC) || defined(CONFIG_MEMORY_HOTPLUG)
>
> We expect memory hotunplug to only really work in movable zones
> (all others should at least have one kernel object somewhere that prevents
> unplug) and you can't have task structs in movable zones obviously
>
> So it's probably a non issue in practice.

Sure, it probably is a non issue, but I'm afraid that non issues of today
might become issues of tomorrow. Where does it say that we can never put a
task struct in a movable zone. Perhaps, we could someday have a CPU with
memory local to it, and pinned tasks to that CPU in that memory. Then
there can be cases where we remove the CPU and memory together.

Because of preemption in the mutex spin part, there's no guarantee that a
the task in that removed memory will not be referenced again. Of course
this thought is purely theoretical, but I like to solve bugs that might
might happen tomorrow too. ;-)

-- Steve