linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: James Bottomley <James.Bottomley@SteelEye.com>
Cc: tglx@linutronix.de, Andrew Morton <akpm@osdl.org>,
	LKML <linux-kernel@vger.kernel.org>,
	SCSI Mailing List <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH] SCSI: Replace semaphores with wait_even
Date: Mon, 25 Oct 2004 01:06:01 +0200	[thread overview]
Message-ID: <20041024230601.GA14956@elte.hu> (raw)
In-Reply-To: <1098658889.10906.361.camel@mulgrave>


* James Bottomley <James.Bottomley@SteelEye.com> wrote:

> On Sun, 2004-10-24 at 16:06, Thomas Gleixner wrote:
> > Hmm, strange. It works on two systems here and others using this
> > modification had no problem either. 
> > I will check again.
> 
> Yes, very strange given what the mistake is:
> 
> -               down_interruptible(&sem);
> +               wait_event_interruptible(eh_wait, shost->eh_kill ||
> +                               (shost->host_busy ==
> shost->host_failed));
> 
> This condition is always true when the eh thread first starts because
> the default quiescent state of a scsi host is
> 
> shost->host_busy = shost->host_failed = 0
> 
> so your change makes the eh_thread spin forever locking everything
> else off the CPU.  On a UP system, this is a complete hang.

i think i fixed this in my PREEMPT_REALTIME tree (having seen spinning
eh_threads) - maybe Thomas forgot to merge those fixes back?

(in a PREEMPT_REALTIME kernel a spinning thread is just a thread eating
up CPU power, it doesnt cause a hang.)

	Ingo

  reply	other threads:[~2004-10-24 23:04 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-20 19:29 [PATCH] SCSI: Replace semaphores with wait_even Thomas Gleixner
2004-10-24 19:57 ` James Bottomley
2004-10-24 20:06   ` Thomas Gleixner
2004-10-24 23:01     ` James Bottomley
2004-10-24 23:06       ` Ingo Molnar [this message]
2004-10-25  0:02         ` James Bottomley

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=20041024230601.GA14956@elte.hu \
    --to=mingo@elte.hu \
    --cc=James.Bottomley@SteelEye.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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;
as well as URLs for NNTP newsgroup(s).