Re: CONFIG_NUMA breaks hibernation on x86-32 with PAE

From: Rafael J. Wysocki
Date: Tue Nov 11 2008 - 09:13:14 EST


On Tuesday, 11 of November 2008, Pavel Machek wrote:
> On Mon 2008-11-10 19:28:03, Rafael J. Wysocki wrote:
> > On Monday, 10 of November 2008, Andi Kleen wrote:
> > > Ingo Molnar <mingo@xxxxxxx> writes:
> > > >
> > > > No good ideas - the bug description gives me the impression of memory
> > > > maps save/restore hickup in the hibernation code - and memory maps are
> > > > pretty much the only thing that are significantly different on NUMA.
> > >
> > > I assume the problem happened on a single node system.
> > > On single node the memory map should be actually quite similar
> > > to the UMA case.
> >
> > It is. However, the problem is 100% reproducible on any 32-bit single-node
> > system with CONFIG_NUMA set, from what I can tell.
> >
> > It doesn't happen if the kernel is booted with highmem=0, so it looks like
> > the code that saves highmem causes the problem to happen. However, this
> > same code works well for all of the !CONFIG_NUMA cases and practically only
> > the only non-open-coded it uses is kmap_atomic().
>
> kmap_atomic() and kernel_map_pages(), AFAICT.
>
> Can kmap_atomic() modify pages in highmem, too?
>
> Wait... are we putting kernel pagetables in the high memory?
>
> What about this cleanup (warning: untested)

Yes, I have this queued up and actually tested.

Thanks,
Rafael


> diff --git a/kernel/power/snapshot.c b/kernel/power/snapshot.c
> index 5d2ab83..f1d8336 100644
> --- a/kernel/power/snapshot.c
> +++ b/kernel/power/snapshot.c
> @@ -966,7 +966,7 @@ static void copy_data_page(unsigned long
> * data modified by kmap_atomic()
> */
> safe_copy_page(buffer, s_page);
> - dst = kmap_atomic(pfn_to_page(dst_pfn), KM_USER0);
> + dst = kmap_atomic(d_page, KM_USER0);
> memcpy(dst, buffer, PAGE_SIZE);
> kunmap_atomic(dst, KM_USER0);
> } else {
>
> Pavel



--
Everyone knows that debugging is twice as hard as writing a program
in the first place. So if you're as clever as you can be when you write it,
how will you ever debug it? --- Brian Kernighan
--
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/