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