Re: SCSI RAM driver ported to 3.3 kernel for file system and I/O testing

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

 



On Wed, May 16, 2012 at 03:54:06PM -0400, chetan loke wrote:
> I thought that 'scsi_ram_device_thread' has a
> 'wait_event_interruptible' call if it sees that the list is empty. I
> don't see that call that's why the confusion. Either queuecmd or
> kthread will get the lock and so why keep the kthread spinning in that
> while loop if there's nothing to do?

It doesn't spin, it sleeps:

+               spin_lock_irqsave(host->host_lock, flags);
+               if (list_empty(&ram_device->commands)) {
+                       set_current_state(TASK_INTERRUPTIBLE);
+                       spin_unlock_irqrestore(host->host_lock, flags);
+                       schedule();
+                       continue;
+               }

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux