FYI: My current suspend bigdiff
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Hi!
Quoted 6 lines
Quoted 2 lines
Well... it could work with scsi. You can try it, but be carefull. [If it goes wrong it might eat your data.]
Thats why I use xfs on my main system to test... And I tried with libata and it won't work as it complains that the "katad" process cannot be stopped, so swsusp immediatly comes back.
I do not know how much more support is needed to allow powermanagment for libata, but this one should be easy...
[Hmm, I hope it compiles, I certainly do not use libata for now.]
Pavel
drivers/scsi/libata-core.c +3 -0
@@ -34,6 +34,7 @@#include <linux/delay.h> #include <linux/timer.h> #include <linux/interrupt.h> +#include <linux/suspend.h> #include <scsi/scsi.h> #include "scsi.h" #include "hosts.h"
@@ -2564,6 +2565,8 @@while (1 ) {cond_resched (); +if (current->flags &PF_FREEZE ) +refrigerator (PF_IOTHREAD ); timeout =ata_thread_iter (ap);
Signature · 2 lines
When do you have a heart between your knees? [Johanka's followup: and *two* hearts?]
Quoted 26 lines · Pavel Machek
Hi!
Quoted 6 lines
Quoted 2 lines
Well... it could work with scsi. You can try it, but be carefull. [If it goes wrong it might eat your data.]
Thats why I use xfs on my main system to test... And I tried with libata and it won't work as it complains that the "katad" process cannot be stopped, so swsusp immediatly comes back.
I do not know how much more support is needed to allow powermanagment for libata, but this one should be easy...
[Hmm, I hope it compiles, I certainly do not use libata for now.]
Paveldrivers/scsi/libata-core.c +1
-0@@ -34,6 +34,7 @@#include <linux/delay.h> #include <linux/timer.h> #include <linux/interrupt.h> +#include <linux/suspend.h> #include <scsi/scsi.h> #include "scsi.h" #include "hosts.h"
drivers/scsi/libata-core.c line 2569
Quoted 5 lines
drivers/scsi/libata-core.c +2
-0@@ -2564,6 +2565,8 @@while (1 ) {cond_resched (); +if (current->flags &PF_FREEZE ) +refrigerator (PF_IOTHREAD );
Curious - can't this be put some place a bit smarter, so we don't have to update every single "driver" with a kernel thread out there (like in the scheduler)? Seems pretty fragile to rely on this. Plus, when you change this in the future there'll be N drivers to update again.
Signature · 1 line
Jens Axboe
Quoted 4 lines · Jens Axboe
Curious - can't this be put some place a bit smarter, so we don't have to update every single "driver" with a kernel thread out there (like in the scheduler)? Seems pretty fragile to rely on this. Plus, when you change this in the future there'll be N drivers to update again.
Agreed. I had to do this simple and obvious (and template-able) patch for 8139too and another driver whose name I forget ATM...
Jeff
Quoted 11 lines · Pavel Machek
Hi!
Quoted 4 lines
Quoted 2 lines
Well... it could work with scsi. You can try it, but be carefull. [If it goes wrong it might eat your data.]
Thats why I use xfs on my main system to test... And I tried with libata and it won't work as it complains that the "katad" process cannot be stopped, so swsusp immediatly comes back.
I do not know how much more support is needed to allow powermanagment for libata, but this one should be easy...
Uhm, Jeff already fixed it in libata using the same call. Can both fixes "hurt" each other or are the safe?
Quoted 2 lines
drivers/scsi/libata-core.c +2
-0+if (current->flags &PF_FREEZE ) +refrigerator (PF_IOTHREAD );
Quoted 13 lines · Prakash K. Cheemplavam
Quoted 11 lines · Pavel Machek
Hi!
Quoted 5 lines
Quoted 2 lines
Well... it could work with scsi. You can try it, but be carefull. [If it goes wrong it might eat your data.]
Thats why I use xfs on my main system to test... And I tried with libata and it won't work as it complains that the "katad" process cannot be stopped, so swsusp immediatly comes back.
Quoted 5 lines
Quoted 2 lines
I do not know how much more support is needed to allow powermanagment for libata, but this one should be easy...
Uhm, Jeff already fixed it in libata using the same call. Can both fixes "hurt" each other or are the safe?
As you suspect, you want only one of the fixes.
I would probably prefer Pavel's patch over mine, as he knows the suspend subsystem better than me :)
Jeff
Hi!
Quoted 14 lines
Quoted 14 lines
Quoted 12 lines
Quoted 7 lines
Quoted 2 lines
Well... it could work with scsi. You can try it, but be carefull. [If it goes wrong it might eat your data.]
Thats why I use xfs on my main system to test... And I tried with libata and it won't work as it complains that the "katad" process cannot be stopped, so swsusp immediatly comes back.
I do not know how much more support is needed to allow powermanagment for libata, but this one should be easy...
Quoted 8 lines
Quoted 2 lines
Uhm, Jeff already fixed it in libata using the same call. Can both fixes "hurt" each other or are the safe?
As you suspect, you want only one of the fixes.
I would probably prefer Pavel's patch over mine, as he knows the suspend subsystem better than me :)
Well, as I did not even try to compile it, take Jeff's patch.
Pavel
Signature · 2 lines
When do you have a heart between your knees? [Johanka's followup: and *two* hearts?]
Quoted 5 lines
As you suspect, you want only one of the fixes.
I would probably prefer Pavel's patch over mine, as he knows the suspend subsystem better than me :)
Actually, you want more than that...
You want something similar to what I did for IDE, that is pipe the suspend/resume requests down the request queue & block the queue, though with additional crap to deal with the libata probe thread and the scsi error mgmnt.
I didn't yet have time for it, but basically, what is needed is to make a scsi version of the suspend/resume code that is in the IDE code, and then hook that on sd, sg, etc...
Then, libata would have to get in the loop as HW driver, and also by properly translating the flush cache / standby requests
Ben.