public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Martin Schwidefsky <schwidefsky@de.ibm.com>
To: linux-arch@vger.kernel.org, mingo@elte.hu
Subject: [patch 0/2] Directed yield.
Date: Fri, 15 Sep 2006 13:30:24 +0200	[thread overview]
Message-ID: <20060915113024.GD23134@skybase> (raw)

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.


                 reply	other threads:[~2006-09-15 11:30 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060915113024.GD23134@skybase \
    --to=schwidefsky@de.ibm.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=mingo@elte.hu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox