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

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

 



Tejun Heo wrote:
Jeff Garzik wrote:
Tejun Heo wrote:
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.

Well, the purpose is to _wait, and so schedule_timeout() is more appropriate than schedule(). I also that an unconditional schedule() is a bit unfriendly if there is nothing useful to schedule at the moment.

Hmmm... I'm not very sure whether using schedule_timeout() inside wait_on_bit() is allowed or not. I think it should work but I don't think it's supposed to be used that way.

If schedule() can work, so can schedule_timeout()


Actually, I'm thinking about dropping the wait_on_bit() and implement generic helper to wait for EH completion as it's done in more than one places (during boot probing and unload unplugging and suspend/resume in future). It probably will use completion. Would that be better?

Sure, that's what completions are for :)

	Jeff


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