Re: [PATCH 06/13] libata-hp: implement bootplug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jeff Garzik wrote:
Tejun Heo wrote:
+static int ata_boot_probe_wait(void *dummy)
+{
+    schedule();

schedule_timeout(1) is preferred

Can you elaborate? AFAICS, the function is entered in TASK_UNINTERRUPTIBLE state. No busy looping there. It's called from wait_on_bit() which takes care of sleep/wakeup conditions.

+            spin_unlock_irqrestore(&ap->host_set->lock, flags);
+
+            wait_on_bit(&ap->flags, bit, ata_boot_probe_wait,
+                    TASK_UNINTERRUPTIBLE);
+
+            while (scsi_host_in_recovery(ap->host))
+                msleep(10);

Is this seemingly infinite loop _guaranteed_ to stop eventually?

Yeap. Main thread is woken up after EH completes and EH is guaranteed to complete.

--
tejun
-
: 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

[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux