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

From: Steven Rostedt
Date: Thu Jan 08 2009 - 09:24:22 EST



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

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