mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Pavel Machek <pavel@suse.cz>
Cc: Andi Kleen <andi@firstfloor.org>, Ingo Molnar <mingo@elte.hu>,
	kernel list <linux-kernel@vger.kernel.org>,
	"H. Peter Anvin" <hpa@zytor.com>
Subject: Re: CONFIG_NUMA breaks hibernation on x86-32 with PAE
Date: Tue, 11 Nov 2008 15:17:53 +0100	[thread overview]
Message-ID: <200811111517.54470.rjw@sisk.pl> (raw)
In-Reply-To: <20081111103043.GD5464@elf.ucw.cz>

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@elte.hu> 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

  reply	other threads:[~2008-11-11 14:13 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-09 14:07 Pavel Machek
2008-11-10  7:52 ` Ingo Molnar
2008-11-10  7:55   ` Pavel Machek
2008-11-10  8:04     ` Ingo Molnar
2008-11-10  8:28       ` Pavel Machek
2008-11-10 12:53         ` Ingo Molnar
2008-11-10 18:05           ` Andi Kleen
2008-11-10 18:33             ` Rafael J. Wysocki
2008-11-10 19:07               ` Andi Kleen
2008-11-10 12:55       ` Andi Kleen
2008-11-10 18:28         ` Rafael J. Wysocki
2008-11-11 10:30           ` Pavel Machek
2008-11-11 14:17             ` Rafael J. Wysocki [this message]
2008-11-11 10:45           ` Pavel Machek
2008-11-11 14:20             ` Rafael J. Wysocki
2008-11-11 15:03               ` Pavel Machek
2008-11-11 16:47                 ` Rafael J. Wysocki
2008-11-12 10:49                   ` Pavel Machek
2008-11-12 21:57                     ` Rafael J. Wysocki
2008-11-12 22:22                       ` [PATCH] x86: Hibernate: Fix breakage on x86_32 with CONFIG_NUMA set (was: Re: CONFIG_NUMA breaks hibernation on x86-32 with PAE) Rafael J. Wysocki
2008-11-12 22:26                         ` [PATCH] x86: Make NUMA on 32-bit depend on EXPERIMENTAL again Rafael J. Wysocki
2008-11-12 22:29                           ` Ingo Molnar
2008-11-12 22:29                         ` [PATCH] x86: Hibernate: Fix breakage on x86_32 with CONFIG_NUMA set (was: Re: CONFIG_NUMA breaks hibernation on x86-32 with PAE) Ingo Molnar
2008-11-10  8:24     ` CONFIG_NUMA breaks hibernation on x86-32 with PAE KAMEZAWA Hiroyuki
2008-11-10  8:27       ` Pavel Machek
2008-11-10  8:28       ` Ingo Molnar
2008-11-10 18:23         ` 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=200811111517.54470.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=andi@firstfloor.org \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=pavel@suse.cz \
    /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

all inboxes | Powered by JetHome®