Re: Bug#234976: kernel-source-2.6.4: Software Suspend doesn't work

From: Pavel Machek
Date: Mon Apr 26 2004 - 09:09:23 EST


Hi!
On Mon 26-04-04 19:48:34, Herbert Xu wrote:
> > Yes, but as I wrote, only on one of the machines in question.
>
> OK, I've finally found out why agpgart locks up the machine upon
> resuming from swsusp/pmdisk.
>
> The reason is that the gatt table is remapped with ioremap_nocache,
> which on i386 machines capable of PSE will result in 4M pages being
> split.
>
> When swsusp/pmdisk copies the pages back, the top page table is
> written before the entries that it points to are filled in.
> Depending on whether the second-level table lies before or after
> the 4M-page in question, this will result in a page fault.
>
> A simple solution is to copy the pages in reverse. This way the
> top page table is filled in last which should resolve this particular
> issue. The following patch does exactly that and fixes the problem
> for me.

Thanks a lot for figuring this out!

But... I do not like the fix. It does depend on memory layout on
very subtle way.

What about switching to temporary, PSE-enabled pagetables
in nosave area for suspend? Copying pagetables soon after boot
should do the trick.

Pavel

--
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms

-
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/