From: "M. Vefa Bicakci" <bicave@superonline.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
linux-pm@lists.linux-foundation.org,
Minchan Kim <minchan.kim@gmail.com>
Subject: Re: PATCH: PM / Hibernate: Avoid hitting OOM during preallocationof memory
Date: Sat, 11 Sep 2010 14:12:27 -0400 [thread overview]
Message-ID: <4C8BC68B.8050002@superonline.com> (raw)
In-Reply-To: <201009082334.01255.rjw@sisk.pl>
Hello,
Sorry for the late reply. I have been busy the past few days.
On 08/09/10 05:34 PM, Rafael J. Wysocki wrote:
> On Wednesday, September 08, 2010, M. Vefa Bicakci wrote:
>> [snip]
>>
>> I should note a few things though,
>>
>> 1) I don't think I ever changed /sys/power/image_size, so we can rule out the
>> possibility of that option changing the results.
>
> Can you please check what value is there in this file?
It contains 524288000, so I think it is set to 500 MB. I believe that this is
the default value, but I am not sure.
>> 2) With the patch below, for the *first* hibernation operation, the computer
>> enters a "thoughtful" state without any disk activity for 6-8 (maybe 10)
>> seconds after printing "Preallocating image memory". It works properly after
>> the wait however.
>
> That probably is a result of spending time in the memory allocator trying to
> reduce the size of the image as much as possible.
I am not sure if this is a new thing with the new patch, but the behavior
seems to continue with the later hibernation operations too, not just the
first one. I haven't confirmed if I really didn't realize the problem in
the previous version of the patch, but it is very possible that I didn't
realize it since I used to automate my tests. (I didn't automate my tests
this time.)
However, considering that the kernel needs to worry about compacting 1500 MB
of data when hibernating with my tmpfs-is-full system, I guess these wait
times are normal, even though a bit inconvenient.
>> [snip]
>
>> 4) I made sure that I was not being impatient with the previous snapshot.c
>> patch, so I tested that on its own once again, and I confirmed that hibernation
>> hangs with the older version of the snapshot.c patch.
>>
>> I am very happy that we are getting closer to a solution. Please let me know
>> if there is anything I need to test further.
>
> Below is the patch I'd like to apply. It should work just like the previous
> one (there are a few fixes that shouldn't affect the functionality in it), but
> please test it if you can.
I am happy to report that it works properly by only itself when applied to
a clean 2.6.35.4 tree. I haven't had any problems (aside from the "thoughtful
state" issue I mentioned above) with my 6 consecutive hibernation attempts.
> I think the slowdown you saw in 2) may be eliminated by increasing the
> image_size value, so I'm going to prepare a patch that will compute the
> value automatically during boot so that it's approximately 50% of RAM.
I would be glad to test that patch as well, to see if it brings speed-ups.
Actually, I might test hibernation with a larger value written to
/sys/power/image_size when I have time.
>
> Thanks,
> Rafael
I really appreciate your help. Thanks a lot!
M. Vefa Bicakci
> [patch snipped]
next prev parent reply other threads:[~2010-09-11 18:12 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
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 ` M. Vefa Bicakci [this message]
2010-09-11 19:06 ` PATCH: PM / Hibernate: Avoid hitting OOM during preallocationof memory 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=4C8BC68B.8050002@superonline.com \
--to=bicave@superonline.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=minchan.kim@gmail.com \
--cc=rjw@sisk.pl \
/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