On Wed, May 16, 2012 at 3:35 PM, Matthew Wilcox <willy@xxxxxxxxxxxxxxx> wrote:
> On Wed, May 16, 2012 at 03:31:55PM -0400, chetan loke wrote:
>> > + if (list_empty(&ram_device->commands))
>> > + wake_up_process(ram_device->thread);
>>
>> Didn't look in detail but if the queue is empty then why would you
>> want to wake up the kthread? What if you just wake_up after
>> list_add_tail below?
>
> If the list is non-empty, then the kthread has already been woken up
> and doesn't need to be woken again.
Sorry, not able to follow. wait_even_interruptible will put kthread to
sleep. So how will it be already awake?
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
[SCSI Target Devel]
[Linux SCSI Target Infrastructure]
[Kernel Newbies]
[Share Photos]
[IDE]
[Security]
[Git]
[Netfilter]
[Bugtraq]
[Photos]
[Yosemite]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Linux ATA RAID]
[Linux IIO]
[Samba]
[Video 4 Linux]
[Device Mapper]
[Linux Resources]