Generic Linux architectural discussions
 help / color / mirror / Atom feed
From: Valdis.Kletnieks@vt.edu
To: Nick Piggin <npiggin@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Andi Kleen <ak@suse.de>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>,
	linux-arch@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [patch 2/2] x86_64: ticket lock spinlock
Date: Wed, 08 Aug 2007 13:31:58 -0400	[thread overview]
Message-ID: <20906.1186594318@turing-police.cc.vt.edu> (raw)
In-Reply-To: Your message of "Wed, 08 Aug 2007 06:24:44 +0200." <20070808042444.GF11018@wotan.suse.de>

[-- Attachment #1: Type: text/plain, Size: 861 bytes --]

On Wed, 08 Aug 2007 06:24:44 +0200, Nick Piggin said:

> After this, we can no longer spin on any locks with preempt enabled,
> and cannot reenable interrupts when spinning on an irq safe lock, because
> at that point we have already taken a ticket and the would deadlock if
> the same CPU tries to take the lock again.  These are hackish anyway: if
> the lock happens to be called under a preempt or interrupt disabled section,
> then it will just have the same latency problems. The real fix is to keep
> critical sections short, and ensure locks are reasonably fair (which this
> patch does).

Any guesstimates how often we do that sort of hackish thing currently, and
how hard it will be to debug each one?  "Deadlock if the same CPU tries to
take the lock again" is pretty easy to notice - are there more subtle failure
modes (larger loops of locks, etc)?

[-- Attachment #2: Type: application/pgp-signature, Size: 226 bytes --]

  parent reply	other threads:[~2007-08-08 17:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-08  4:22 [patch 1/2] spinlock: lockbreak cleanup Nick Piggin
2007-08-08  4:24 ` [patch 2/2] x86_64: ticket lock spinlock Nick Piggin
2007-08-08 10:26   ` Andi Kleen
2007-08-09  1:42     ` Nick Piggin
2007-08-09  9:54       ` Andi Kleen
2007-08-08 17:31   ` Valdis.Kletnieks [this message]
2007-08-09  1:40     ` Nick Piggin

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=20906.1186594318@turing-police.cc.vt.edu \
    --to=valdis.kletnieks@vt.edu \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=npiggin@suse.de \
    --cc=torvalds@linux-foundation.org \
    /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