From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
To: "M. Vefa Bicakci" <bicave@superonline.com>
Cc: kosaki.motohiro@jp.fujitsu.com,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [Bisected Regression in 2.6.35] A full tmpfs filesystem causeshibernationto hang
Date: Mon, 30 Aug 2010 11:28:05 +0900 (JST) [thread overview]
Message-ID: <20100830083704.5231.A69D9226@jp.fujitsu.com> (raw)
In-Reply-To: <4C7643C7.4010904@superonline.com>
[-- Attachment #1: Type: text/plain, Size: 2491 bytes --]
> On 26/08/10 11:09 AM, KOSAKI Motohiro wrote:
> >> If there is anything I can do to debug this problem please let me
> >> know.
> >
> > Vefa, your above log is very useful. really thanks.
> > So, I'm convinced two things.
> > - my patch is purely unrelated.
> > - how to fix your issue.
> >
> > Can you please try attached patch? I bet this can solve your issue.
> >
> > Thanks for your patience.
>
> Hello!
>
> First of all, thanks a lot for your help - I really appreciate it.
>
> I applied your new patches on top of your old patches. Hopefully that
> was okay.
>
> Unfortunately, it didn't work this time. Here's a sample output from the
> new patch.
>
> === 8< ===
> [58.050208] PM: Preallocating image memory...
> [58.159881] shrink_all_memory start
> [58.232411] PM: shrink memory: pass=1, req:312373 reclaimed:15864 free:358420
> [58.342041] PM: shrink memory: pass=2, req:296509 reclaimed:21837 free:362167
> [60.690035] PM: shrink memory: pass=3, req:274672 reclaimed:25982 free:348006
> [61.754931] PM: shrink memory: pass=4, req:248690 reclaimed:49623 free:371589
> [64.361714] PM: shrink memory: pass=5, req:199067 reclaimed:74683 free:396695
> [64.361769] shrink_all_memory: req:124384 reclaimed:74683 free:396695
> === >8 ===
>
> The interesting thing is that even though there is a lot of free memory at the
> end, it still hangs.
Grr. I'm surprised this result ;-)
shrink_all_memory() finish to shrink memory successfully. but your
system still hang immediately after. I have no idea why this mysterious
occur.
I prepared next debugging patch. It added prenty debug printk. I hope
it enlighten up which path makes system hang-up.
1. apply my new patch
2. Enable following PM debug option in Kconfig
[*] Power Management support
[*] Power Management Debug Support
[*] Extra PM attributes in sysfs for low-level debugging/testing
[*] Verbose Power Management debugging
3. append following kernel boot option into grub configration file
no_console_suspend=1
3. kernel build and reboot
4. some prepare
# echo 8 > /proc/sysrq-trigger
# cd /sys/power
# echo 1 > pm_trace
# echo 0 > pm_async
5. run your test program
> I also included the timestamps; note the one and two second
> delays between the passes.
This is expected result because tmpfs shrink need swap-out. then
we need i/o time.
>
> Please let me know if there is anything I can do.
Please send me your .config and full dmesg.
Thanks many and many help us!
[-- Attachment #2: 0001-debug-messages.patch --]
[-- Type: application/octet-stream, Size: 2837 bytes --]
From 1b071d7958cb933cf99fbbe565fd33dbdd626a4d Mon Sep 17 00:00:00 2001
From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Date: Mon, 15 Feb 2044 10:34:37 +0900
Subject: [PATCH] debug messages
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
---
kernel/power/snapshot.c | 25 +++++++++++++++++++++----
1 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
index 5e7edfb..c864806 100644
--- a/kernel/power/snapshot.c
+++ b/kernel/power/snapshot.c
@@ -1263,7 +1263,7 @@ int hibernate_preallocate_memory(void)
struct timeval start, stop;
int error;
- printk(KERN_INFO "PM: Preallocating image memory... ");
+ printk(KERN_INFO "PM: Preallocating image memory... \n");
do_gettimeofday(&start);
error = memory_bm_create(&orig_bm, GFP_IMAGE, PG_ANY);
@@ -1309,6 +1309,7 @@ int hibernate_preallocate_memory(void)
* in memory, allocate page frames for the image and we're done.
*/
if (size >= saveable) {
+ printk(KERN_INFO "PM: size >= saveable. skip \n");
pages = preallocate_image_highmem(save_highmem);
pages += preallocate_image_memory(saveable - pages);
goto out;
@@ -1335,16 +1336,30 @@ int hibernate_preallocate_memory(void)
* highmem and non-highmem zones separately.
*/
pages_highmem = preallocate_image_highmem(highmem / 2);
+ printk(KERN_INFO "PM: preallocate_image_highmem %lu %lu\n",
+ highmem, pages_highmem);
+
alloc = (count - max_size) - pages_highmem;
pages = preallocate_image_memory(alloc);
- if (pages < alloc)
+ printk(KERN_INFO "PM: preallocate_image_memory %lu %lu\n",
+ alloc, pages);
+
+ if (pages < alloc) {
+ printk(KERN_INFO "PM: pages(%lu) < alloc(%lu). error. \n",
+ pages, alloc);
goto err_out;
+ }
size = max_size - size;
alloc = size;
size = preallocate_highmem_fraction(size, highmem, count);
+ printk(KERN_INFO "PM: preallocate_highmem_fraction %lu %lu %lu -> %lu\n",
+ size, highmem, count, size);
+
pages_highmem += size;
alloc -= size;
pages += preallocate_image_memory(alloc);
+ printk(KERN_INFO "PM: preallocate_image_memory %lu %lu\n",
+ alloc, pages);
pages += pages_highmem;
/*
@@ -1352,18 +1367,20 @@ int hibernate_preallocate_memory(void)
* pages in memory, but we have allocated more. Release the excessive
* ones now.
*/
+ printk(KERN_INFO "PM: free_unnecessary_pages() \n");
free_unnecessary_pages();
out:
do_gettimeofday(&stop);
- printk(KERN_CONT "done (allocated %lu pages)\n", pages);
+ printk(KERN_INFO "done (allocated %lu pages)\n", pages);
swsusp_show_speed(&start, &stop, pages, "Allocated");
return 0;
err_out:
- printk(KERN_CONT "\n");
+ printk(KERN_INFO "PM: err_out \n");
swsusp_free();
+ printk(KERN_INFO "PM: swsusp_free() end \n");
return -ENOMEM;
}
--
1.6.5.2
next prev parent reply other threads:[~2010-08-30 2:28 UTC|newest]
Thread overview: 42+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-15 5:25 [Bisected Regression in 2.6.35] A full tmpfs filesystem causes hibernationto hang M. Vefa Bicakci
2010-08-17 2:37 ` KOSAKI Motohiro
2010-08-22 11:06 ` KOSAKI Motohiro
2010-08-22 16:28 ` [Bisected Regression in 2.6.35] A full tmpfs filesystem causeshibernation to hang M. Vefa Bicakci
2010-08-25 8:55 ` KOSAKI Motohiro
2010-08-25 10:11 ` [Bisected Regression in 2.6.35] A full tmpfs filesystem causeshibernationto hang M. Vefa Bicakci
2010-08-25 17:31 ` [Bisected Regression in 2.6.35] A full tmpfs filesystem causeshibernation to hang Rafael J. Wysocki
2010-08-23 0:22 ` [Bisected Regression in 2.6.35] A full tmpfs filesystem causes hibernationto hang KOSAKI Motohiro
2010-08-23 6:27 ` [Bisected Regression in 2.6.35] A full tmpfs filesystem causeshibernation to hang M. Vefa Bicakci
2010-08-25 0:48 ` KOSAKI Motohiro
2010-08-25 8:39 ` KOSAKI Motohiro
2010-08-25 10:10 ` [Bisected Regression in 2.6.35] A full tmpfs filesystem causeshibernationto hang M. Vefa Bicakci
[not found] ` <4C74EB70.3080406@superonline.com>
[not found] ` <20100826134506.F676.A69D9226@jp.fujitsu.com>
2010-08-26 10:36 ` M. Vefa Bicakci
2010-08-30 2:28 ` KOSAKI Motohiro [this message]
2010-08-30 16:54 ` [Bisected Regression in 2.6.35] A full tmpfs filesystem causeshibernation to hang M. Vefa Bicakci
2010-08-31 6:35 ` KOSAKI Motohiro
2010-08-31 6:54 ` KOSAKI Motohiro
2010-08-31 11:25 ` [Bisected Regression in 2.6.35] A full tmpfs filesystem causeshibernationto hang M. Vefa Bicakci
2010-09-01 0:48 ` [Bisected Regression in 2.6.35] A full tmpfs filesystem causeshibernation to hang KOSAKI Motohiro
2010-09-01 22:02 ` Rafael J. Wysocki
2010-09-02 0:31 ` KOSAKI Motohiro
2010-09-02 19:57 ` Rafael J. Wysocki
2010-09-02 20:24 ` Rafael J. Wysocki
2010-09-03 0:13 ` KOSAKI Motohiro
2010-09-03 1:07 ` Rafael J. Wysocki
2010-09-03 1:53 ` KOSAKI Motohiro
2010-09-04 1:44 ` Rafael J. Wysocki
2010-09-06 2:08 ` KOSAKI Motohiro
2010-09-06 11:27 ` Important news regarding the two different patches M. Vefa Bicakci
2010-09-06 18:43 ` Rafael J. Wysocki
2010-09-07 1:34 ` M. Vefa Bicakci
2010-09-07 1:58 ` KOSAKI Motohiro
2010-09-07 21:44 ` Rafael J. Wysocki
2010-09-08 12:56 ` M. Vefa Bicakci
2010-09-08 21:34 ` [PATCH] PM / Hibernate: Avoid hitting OOM during preallocation of memory (was: Re: Important news ...) Rafael J. Wysocki
2010-09-11 18:12 ` PATCH: PM / Hibernate: Avoid hitting OOM during preallocationof memory M. Vefa Bicakci
2010-09-11 19:06 ` Rafael J. Wysocki
2010-09-11 22:27 ` [PATCH] PM / Hibernate: Make default image size depend on total RAM size (was: Re: PATCH: PM / Hibernate: Avoid hitting OOM ...) Rafael J. Wysocki
2010-09-13 15:40 ` [PATCH] PM / Hibernate: Make default image size depend on totalRAM size M. Vefa Bicakci
2010-09-13 17:52 ` Rafael J. Wysocki
2010-09-06 18:46 ` [Bisected Regression in 2.6.35] A full tmpfs filesystem causeshibernation to hang Rafael J. Wysocki
2010-09-06 19:54 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100830083704.5231.A69D9226@jp.fujitsu.com \
--to=kosaki.motohiro@jp.fujitsu.com \
--cc=bicave@superonline.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®