Re: [RFC][PATCH 0/3] swsusp: Do not use page flags (was: Re: Remove page flags for software suspend)

Rafael J. Wysocki
2007-03-08T22:54:45Z

On Thursday, 8 March 2007 23:43, Johannes Berg wrote:
> On Thu, 2007-03-08 at 23:33 +0100, Rafael J. Wysocki wrote:
>
> > > Unfortunately I won't be able to actually try this on hardware until the
> > > 20th or so.
> >
> > OK, it's not an urgent thing. ;-)
>
> True :)
>
> > Well, I don't think so. If I understand the definition of system_state
> > correctly, it is initially equal to SYSTEM_BOOTING. Then, it's changed to
> > SYSTEM_RUNNING in init/main.c after the bootmem has been freed.
>
> No, I think you're confusing bootmem with initmem right now.

Yes, you're right, sorry.

> If you actually look at the code then free_all_bootmem is called as part of
> mem_init() on powerpc, which is called from start_kernel() a long time
> before initcalls are done and system state is set.
>
> Put it this way. By the time initcalls are done, I can no longer use
> bootmem. I tested this and it panics. But if you look at the code in
> init/main.c, system_state is only changed after initcalls are done.

That's true.

In that case your patch seems to be the simplest one and I think it should go
along with some code that will actually use it.

Rafael