All of lore.kernel.org
 help / color / mirror / Atom feed
* [patch 0/2] Directed yield.
@ 2006-09-15 11:30 Martin Schwidefsky
  0 siblings, 0 replies; only message in thread
From: Martin Schwidefsky @ 2006-09-15 11:30 UTC (permalink / raw)
  To: linux-arch, mingo

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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-09-15 11:30 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-09-15 11:30 [patch 0/2] Directed yield Martin Schwidefsky

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.