[Cbe-oss-dev] [CVS sw] * Updated version of the 6 previous affinity patches, with changes related
Benjamin Herrenschmidt
benh at kernel.crashing.org
Sat Mar 24 08:24:59 EST 2007
> Here's a solution that may be more than you want. It provides locking
> around the assignment of the context to the spu structure. It doesn't
> provide a full solution to the NOSCHED - Affinity problem, because there
> is still a race condition in the allocation of NOSCHED context and the
> assignment of the context to an spu for scheduling purposes. It is a
> first step towards a solution. I don't think that you can come up with
> a solution to the larger problem based solely on atomic primitives.
> This patch avoids the immediate problem of taking a data storage
> interrupt for a non-protected reference.
>
> Haven't tested it yet. Wanted to get feedback first.
>
> Arnd, am I supposed to put my signed off here now.
Atomic primitives tend to introduce more problems than they solve
anyway... between barrier issues and tendency to just become a mess,
attempts at synchronizing with atomics rather than locks or mutexes are
often doomed. Thus I agree with your statement, using solely atomics to
fix the larger problem is probably not a good idea in the first place.
Ben.
More information about the cbe-oss-dev
mailing list