From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: linux-pm@lists.linux-foundation.org,
"M. Vefa Bicakci" <bicave@superonline.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [Bisected Regression in 2.6.35] A full tmpfs filesystem causeshibernation to hang
Date: Fri, 3 Sep 2010 03:07:33 +0200 [thread overview]
Message-ID: <201009030307.34057.rjw@sisk.pl> (raw)
In-Reply-To: <20100903085756.B657.A69D9226@jp.fujitsu.com>
On Friday, September 03, 2010, KOSAKI Motohiro wrote:
> Hello,
>
> > > > > Like in the patch below, perhaps?
> > > >
> > > > Looks like fine. but I have one question. hibernate_preallocate_memory() call
> > > > preallocate_image_memory() two times. Why do you only care latter one?
> > > > former one seems similar risk.
> > >
> > > The first one is mandatory, ie. if we can't allocate the requested number of
> > > pages at this point, we fail the entire hibernation. In that case the
> > > performance hit doesn't matter.
> >
> > IOW, your patch at http://lkml.org/lkml/2010/9/2/262 is still necessary to
> > protect against the infinite loop in that case.
>
> As far as I understand, we need distinguish two allocation failure.
> 1) failure because no enough memory
> -> yes, hibernation should fail
> 2) failure because already allocated enough lower zone memory
> -> why should we fail?
>
> If the system has a lot of memory, scenario (2) is happen frequently than (1).
> I think we need check alloc_highmem and alloc_normal variable and call
> preallocate_image_highmem() again instead preallocate_image_memory()
> if we've alread allocated enough lots normal memory.
>
> nit?
Actually I thought about that, but we don't really see hibernation fail for
this reason. In all of the tests I carried out the requested 50% of highmem
had been allocated before allocations from the normal zone started to be
made, even if highmem was 100% full at that point. So this appears to be
a theoretical issue and covering it would require us to change the algorithm
entirely (eg. it doesn't make sense to call preallocate_highmem_fraction() down
the road if that happens).
Thanks,
Rafael
next prev parent reply other threads:[~2010-09-03 1:07 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20100830083704.5231.A69D9226@jp.fujitsu.com>
[not found] ` <4C7BE25B.1020504@superonline.com>
2010-09-01 0:48 ` [Bisected Regression in 2.6.35] A full tmpfs filesystem causeshibernation to hang KOSAKI Motohiro
[not found] ` <20100901093219.9744.A69D9226@jp.fujitsu.com>
2010-09-01 22:02 ` Rafael J. Wysocki
[not found] ` <201009020002.25113.rjw@sisk.pl>
2010-09-02 0:31 ` KOSAKI Motohiro
[not found] ` <20100902091010.D050.A69D9226@jp.fujitsu.com>
2010-09-02 19:57 ` Rafael J. Wysocki
[not found] ` <201009022157.18561.rjw@sisk.pl>
2010-09-02 20:24 ` Rafael J. Wysocki
2010-09-03 0:13 ` KOSAKI Motohiro
[not found] ` <20100903085756.B657.A69D9226@jp.fujitsu.com>
2010-09-03 1:07 ` Rafael J. Wysocki [this message]
2010-09-03 1:53 ` KOSAKI Motohiro
[not found] ` <20100903105216.B65C.A69D9226@jp.fujitsu.com>
2010-09-04 1:44 ` Rafael J. Wysocki
[not found] ` <201009040344.42342.rjw@sisk.pl>
2010-09-06 2:08 ` KOSAKI Motohiro
[not found] ` <20100906090528.C8A9.A69D9226@jp.fujitsu.com>
2010-09-06 11:27 ` Important news regarding the two different patches M. Vefa Bicakci
[not found] ` <4C84D02A.7070508@superonline.com>
2010-09-06 18:43 ` Rafael J. Wysocki
[not found] ` <201009062043.37819.rjw@sisk.pl>
2010-09-07 1:34 ` M. Vefa Bicakci
[not found] ` <4C8596B1.6010005@superonline.com>
2010-09-07 1:58 ` KOSAKI Motohiro
[not found] ` <20100907104218.C8EF.A69D9226@jp.fujitsu.com>
2010-09-07 21:44 ` Rafael J. Wysocki
[not found] ` <201009072344.53905.rjw@sisk.pl>
2010-09-08 12:56 ` M. Vefa Bicakci
[not found] ` <4C878818.1070705@superonline.com>
2010-09-08 21:34 ` [PATCH] PM / Hibernate: Avoid hitting OOM during preallocation of memory (was: Re: Important news ...) Rafael J. Wysocki
[not found] ` <201009082334.01255.rjw@sisk.pl>
2010-09-11 18:12 ` PATCH: PM / Hibernate: Avoid hitting OOM during preallocationof memory M. Vefa Bicakci
[not found] ` <4C8BC68B.8050002@superonline.com>
2010-09-11 19:06 ` Rafael J. Wysocki
[not found] ` <201009112106.07687.rjw@sisk.pl>
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
[not found] ` <201009120027.06470.rjw@sisk.pl>
2010-09-13 15:40 ` [PATCH] PM / Hibernate: Make default image size depend on totalRAM size M. Vefa Bicakci
[not found] ` <4C8E45EB.8030408@superonline.com>
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
[not found] ` <201009062046.43513.rjw@sisk.pl>
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=201009030307.34057.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=bicave@superonline.com \
--cc=kosaki.motohiro@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.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