* RE: [PATCH] [swsusp] print error message when swapping is disabled
@ 2004-10-26 10:16 Li, Shaohua
2004-10-29 7:07 ` Zhu, Yi
0 siblings, 1 reply; 8+ messages in thread
From: Li, Shaohua @ 2004-10-26 10:16 UTC (permalink / raw)
To: Pavel Machek, Zhu, Yi; +Cc: linux-kernel
>
>Hi!
>
>> swsusp exits silently when swapping is disabled. This patch gives
some
>> clues to
>> the user in this case. Please apply.
>
>Did you mean "swapon -a"? Otherwise approved, please send it to akpm
>directly.
Another case is PSE disabled. Should notify this to user also.
Thanks,
Shaohua
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] [swsusp] print error message when swapping is disabled
2004-10-26 10:16 [PATCH] [swsusp] print error message when swapping is disabled Li, Shaohua
@ 2004-10-29 7:07 ` Zhu, Yi
2004-10-29 9:10 ` Pavel Machek
0 siblings, 1 reply; 8+ messages in thread
From: Zhu, Yi @ 2004-10-29 7:07 UTC (permalink / raw)
To: Andrew Morton; +Cc: Pavel Machek, Shaohua Li, Linux Kernel Mailing List
On Tue, 26 Oct 2004, Li, Shaohua wrote:
> Another case is PSE disabled. Should notify this to user also.
Here is a patch to address it.
Thanks,
-yi
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
diff -urp linux-2.6.10-rc1-orig/include/asm-i386/suspend.h linux-2.6.10-rc1/include/asm-i386/suspend.h
--- linux-2.6.10-rc1-orig/include/asm-i386/suspend.h 2004-10-29 14:11:44.000000000 +0800
+++ linux-2.6.10-rc1/include/asm-i386/suspend.h 2004-10-29 14:14:41.000000000 +0800
@@ -12,8 +12,11 @@ arch_prepare_suspend(void)
/* If you want to make non-PSE machine work, turn off paging
in do_magic. swsusp_pg_dir should have identity mapping, so
it could work... */
- if (!cpu_has_pse)
+ if (!cpu_has_pse) {
+ printk(KERN_ERR "swsusp: FATAL: PSE is not availiable or "
+ "disabled on your system!\n");
return -EPERM;
+ }
return 0;
}
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] [swsusp] print error message when swapping is disabled
2004-10-29 7:07 ` Zhu, Yi
@ 2004-10-29 9:10 ` Pavel Machek
0 siblings, 0 replies; 8+ messages in thread
From: Pavel Machek @ 2004-10-29 9:10 UTC (permalink / raw)
To: Zhu, Yi; +Cc: Andrew Morton, Shaohua Li, Linux Kernel Mailing List
Hi!
> > Another case is PSE disabled. Should notify this to user also.
>
> Here is a patch to address it.
Patch is okay (but I rararely see this kind of failure in
wild). Please submit via akpm.
Anyway, the most common problem these days is that one of devices
vetoes the suspend. In such case code does the right thing, but
without any message to the user... and that is kind of confusing.
Patch printing "swsusp failed because device XXXX vetoed it" would be
very welcome.
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] [swsusp] print error message when swapping is disabled
@ 2004-10-29 9:54 Li, Shaohua
2004-10-29 9:59 ` Pavel Machek
2004-10-29 19:30 ` Nigel Cunningham
0 siblings, 2 replies; 8+ messages in thread
From: Li, Shaohua @ 2004-10-29 9:54 UTC (permalink / raw)
To: Pavel Machek, Zhu, Yi; +Cc: Andrew Morton, Linux Kernel Mailing List
>
>> > Another case is PSE disabled. Should notify this to user also.
>>
>> Here is a patch to address it.
>
>Patch is okay (but I rararely see this kind of failure in
>wild). Please submit via akpm.
>
Enable DEBUG_PAGEALLOC will disable PSE.
Possibly a stupid question, why swsusp need PSE? I didn't see any
relationship between the two.
Thanks,
Shaohua
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] [swsusp] print error message when swapping is disabled
2004-10-29 9:54 Li, Shaohua
@ 2004-10-29 9:59 ` Pavel Machek
2004-10-29 19:30 ` Nigel Cunningham
1 sibling, 0 replies; 8+ messages in thread
From: Pavel Machek @ 2004-10-29 9:59 UTC (permalink / raw)
To: Li, Shaohua; +Cc: Zhu, Yi, Andrew Morton, Linux Kernel Mailing List
Hi!
> >> > Another case is PSE disabled. Should notify this to user also.
> >>
> >> Here is a patch to address it.
> >
> >Patch is okay (but I rararely see this kind of failure in
> >wild). Please submit via akpm.
> >
> Enable DEBUG_PAGEALLOC will disable PSE.
> Possibly a stupid question, why swsusp need PSE? I didn't see any
> relationship between the two.
swsusp relies on fact that kernel 1:1 mapping is self-contained in
top-level pagedir. That is not true without PSE, right?
[Hmm, probably bigger comment explaining this would be nice...]
Pavel
--
People were complaining that M$ turns users into beta-testers...
...jr ghea gurz vagb qrirybcref, naq gurl frrz gb yvxr vg gung jnl!
^ permalink raw reply [flat|nested] 8+ messages in thread
* RE: [PATCH] [swsusp] print error message when swapping is disabled
2004-10-29 9:54 Li, Shaohua
2004-10-29 9:59 ` Pavel Machek
@ 2004-10-29 19:30 ` Nigel Cunningham
1 sibling, 0 replies; 8+ messages in thread
From: Nigel Cunningham @ 2004-10-29 19:30 UTC (permalink / raw)
To: Li, Shaohua
Cc: Pavel Machek, Zhu, Yi, Andrew Morton, Linux Kernel Mailing List
Hi.
On Fri, 2004-10-29 at 19:54, Li, Shaohua wrote:
> Enable DEBUG_PAGEALLOC will disable PSE.
> Possibly a stupid question, why swsusp need PSE? I didn't see any
> relationship between the two.
I have suspend2 working with DEBUG_PAGEALLOC. I just had to add code to
map the original pages before making the atomic copy, so that resume
will work (and unmap them afterwards, of course).
Regards,
Nigel
--
Nigel Cunningham
Pastoral Worker
Christian Reformed Church of Tuggeranong
PO Box 1004, Tuggeranong, ACT 2901
Everyone lives by faith. Some people just don't believe it.
Want proof? Try to prove that the theory of evolution is true.
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] [swsusp] print error message when swapping is disabled
@ 2004-10-25 2:56 Zhu, Yi
2004-10-25 10:27 ` Pavel Machek
0 siblings, 1 reply; 8+ messages in thread
From: Zhu, Yi @ 2004-10-25 2:56 UTC (permalink / raw)
To: Pavel Machek; +Cc: linux-kernel
Hi,
swsusp exits silently when swapping is disabled. This patch gives some
clues to
the user in this case. Please apply.
Thanks,
-yi
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
--- linux-2.6.9-orig/kernel/power/swsusp.c 2004-10-24
16:16:41.000000000 +0800
+++ linux-2.6.9/kernel/power/swsusp.c 2004-10-24 16:15:06.000000000
+0800
@@ -843,8 +843,11 @@ asmlinkage int swsusp_save(void)
{
int error = 0;
- if ((error = swsusp_swap_check()))
+ if ((error = swsusp_swap_check())) {
+ printk(KERN_ERR "swsusp: FATAL: cannot find swap device,
try "
+ "swap -a!\n");
return error;
+ }
return suspend_prepare_image();
}
^ permalink raw reply [flat|nested] 8+ messages in thread* Re: [PATCH] [swsusp] print error message when swapping is disabled
2004-10-25 2:56 Zhu, Yi
@ 2004-10-25 10:27 ` Pavel Machek
0 siblings, 0 replies; 8+ messages in thread
From: Pavel Machek @ 2004-10-25 10:27 UTC (permalink / raw)
To: Zhu, Yi; +Cc: linux-kernel
Hi!
> swsusp exits silently when swapping is disabled. This patch gives some
> clues to
> the user in this case. Please apply.
Did you mean "swapon -a"? Otherwise approved, please send it to akpm
directly.
Pavel
> --- linux-2.6.9-orig/kernel/power/swsusp.c 2004-10-24
> 16:16:41.000000000 +0800
> +++ linux-2.6.9/kernel/power/swsusp.c 2004-10-24 16:15:06.000000000
> +0800
> @@ -843,8 +843,11 @@ asmlinkage int swsusp_save(void)
> {
> int error = 0;
>
> - if ((error = swsusp_swap_check()))
> + if ((error = swsusp_swap_check())) {
> + printk(KERN_ERR "swsusp: FATAL: cannot find swap device,
> try "
> + "swap -a!\n");
> return error;
> + }
> return suspend_prepare_image();
> }
>
--
Boycott Kodak -- for their patent abuse against Java.
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2004-10-29 19:57 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-26 10:16 [PATCH] [swsusp] print error message when swapping is disabled Li, Shaohua
2004-10-29 7:07 ` Zhu, Yi
2004-10-29 9:10 ` Pavel Machek
-- strict thread matches above, loose matches on Subject: below --
2004-10-29 9:54 Li, Shaohua
2004-10-29 9:59 ` Pavel Machek
2004-10-29 19:30 ` Nigel Cunningham
2004-10-25 2:56 Zhu, Yi
2004-10-25 10:27 ` Pavel Machek
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox