Re: possible race condition for usb_stor_port_reset and usb_reset_and_verify_device

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

 



hi Alan:

2015-05-27 22:40 GMT+08:00 Alan Stern <stern@xxxxxxxxxxxxxxxxxxx>:
> On Wed, 27 May 2015, yoma sophian wrote:
>
>> After reading the kernel power document, freezing-of-tasks.txt , can I
>> get the below conclusion:
>> if I put my thread in freezable, it will get frozen automatically
>> whenever the system goes in to suspend or hibernate.
>
> It's not entirely automatic.  Your thread has to call try_to_freeze()
> at appropriate spots.  Of course, if your thread is a work queue then
> the workqueue core will do that for you.
after tracing more kernel based your guide, may I get below conclusion:
if I try to create a thread that will do the IO
1. create the thread, with set_freezable, and call try_to_freeze() at
appropriate spots.
2. hook my thread on system_freezable_wq
     such as calling queue_delayed_work(system_freezable_wq, &mythread, intv)
     or mod_delayed_work((system_freezable_wq, &mythread, intv)

is hub_thread the 1st kind?
if Yes, where it try_to_freeze?
And why not make hub_thread as above #2 kind?

appreciate your kind help,
--
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



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux