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.
-
: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html