Hi folks, with CONFIG_PREEMPT=y the spin_lock/read_lock/write_lock functions are defined in kernel/spinlock.c with a loop over _raw_##op##_trylock. If the lock could not be taken cpu_relax is called. The architecture can't choose to do something else instead of cpu_relax. To implement a directed yield that gives up the timeslice of a virtual cpu in favour of a specific cpu, the cpu_relax needs to be replaced with something new: _raw_spin_relax, _raw_read_relax or _raw_write_relax.
Patch #01 introduces the new primitives and patch #02 has the s390 implementation for directed yield as example for the use of the primitives. -- blue skies, Martin. Martin Schwidefsky Linux for zSeries Development & Services IBM Deutschland Entwicklung GmbH "Reality continues to ruin my life." - Calvin. - To unsubscribe from this list: send the line "unsubscribe linux-arch" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
