Re: S4 resume broken since 2.6.39 (3.1, too)

From: Linus Torvalds
Date: Mon Sep 26 2011 - 18:47:34 EST


On Mon, Sep 26, 2011 at 3:24 PM, Rafael J. Wysocki <rjw@xxxxxxx> wrote:
>
> So, in my opinion we should simply apply the Takashi's patch at this
> point and revisit the kdump issue later, when we actually know how to do
> the right thing.

Applying that trivial patch certainly looks fine, especially since it
also avoids some arbitrary differences between x86-64 and x86-32.

That said, the whole code looks *very* confusing, and I have to say
that the commit logs there are also totally unreadable and not very
explanatory at all.

It does seem like the code is simply buggy: it "allocates" the page
tables from the end of memory, but it seems to want to do that before
they have been mapped. Which makes perfect sense, since the whole
point of allocating them is to be *able* to map all the memory.

So using that

good_end = max_pfn_mapped << PAGE_SHIFT;

would seem to be a good idea regardless. I'm not sure how the old code
is even supposed to work. That said - why is this a problem only for
S4 resume?

Yinghai?

Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/