From: Jeff Garzik <jgarzik@pobox.com>
To: Tejun Heo <htejun@gmail.com>
Cc: linux-ide@vger.kernel.org
Subject: Re: [PATCH 02/02] libata: implement ata_eh_wait()
Date: Thu, 08 Jun 2006 16:49:29 -0400 [thread overview]
Message-ID: <44888D59.9010000@pobox.com> (raw)
In-Reply-To: <20060531102005.GB8106@htj.dyndns.org>
Tejun Heo wrote:
> + spin_lock_irqsave(&ap->host_set->lock, flags);
> +
> + while (ap->flags & (ATA_FLAG_EH_PENDING | ATA_FLAG_EH_IN_PROGRESS)) {
> + prepare_to_wait(&ap->eh_wait_q, &wait, TASK_UNINTERRUPTIBLE);
> + spin_unlock_irqrestore(&ap->host_set->lock, flags);
> + schedule();
> + spin_lock_irqsave(&ap->host_set->lock, flags);
> + }
Two comments:
* why not use completions?
* don't use schedule(). If there's nothing to schedule, it IMO chews up
too much CPU busy-waiting. schedule_timeout(1) will at least wait for
the next timer tick.
next prev parent reply other threads:[~2006-06-08 20:49 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-31 10:19 [PATCH 01/02] libata: shift host flag constants Tejun Heo
2006-05-31 10:20 ` [PATCH 02/02] libata: implement ata_eh_wait() Tejun Heo
2006-06-08 20:49 ` Jeff Garzik [this message]
2006-06-09 3:53 ` Tejun Heo
2006-06-09 3:58 ` Jeff Garzik
2006-06-08 20:48 ` [PATCH 01/02] libata: shift host flag constants Jeff Garzik
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=44888D59.9010000@pobox.com \
--to=jgarzik@pobox.com \
--cc=htejun@gmail.com \
--cc=linux-ide@vger.kernel.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 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.