From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Miles Lane <miles.lane@gmail.com>
Cc: Daniel Walker <dwalker@mvista.com>,
LKML <linux-kernel@vger.kernel.org>, Pavel Machek <pavel@suse.cz>,
Andrew Morton <akpm@linux-foundation.org>,
linux-pm@lists.linux-foundation.org,
Christoph Lameter <clameter@sgi.com>
Subject: Re: 2.6.24-rc5-mm1 -- inconsistent {in-hardirq-W} -> {hardirq-on-W} usage -- pm-hibernate/9940 [HC0[0]:SC0[0]:HE1:SE1]
Date: Thu, 20 Dec 2007 16:45:11 +0100 [thread overview]
Message-ID: <200712201645.12346.rjw@sisk.pl> (raw)
In-Reply-To: <a44ae5cd0712192034m4745e78av9ebdc6da5cbfb60d@mail.gmail.com>
On Thursday, 20 of December 2007, Miles Lane wrote:
> On Dec 19, 2007 8:31 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> >
> > On Thursday, 20 of December 2007, Miles Lane wrote:
> > > On Dec 19, 2007 7:09 PM, Rafael J. Wysocki <rjw@sisk.pl> wrote:
> > >
> > > > On Thursday, 20 of December 2007, Christoph Lameter wrote:
> > > > > On Thu, 20 Dec 2007, Rafael J. Wysocki wrote:
> > > > >
> > > > > > > We could reexport drain_local_pages() again but then I do not
> > > > understand
> > > > > > > why we would only drain the pages of this processor and not of all
> > > > other
> > > > > > > processors as well. It seems that software suspend intend was to
> > > > flush
> > > > > > > them all right?
> > > > > >
> > > > > > Well, not exactly. We are on one CPU at this point, the others have
> > > > been
> > > > > > disabled.
> > > > >
> > > > > Ok so the others are flush. Here is a patch to re-export
> > > > > drain_local_pages() again and use it for software suspend:
> > > > >
> > > > > Signed-off-by: Christoph Lameter <clameter@sgi.com>
> > > > >
> > > > > ---
> > > > > include/linux/gfp.h | 1 +
> > > > > kernel/power/snapshot.c | 2 +-
> > > > > mm/page_alloc.c | 2 +-
> > > > > 3 files changed, 3 insertions(+), 2 deletions(-)
> > > > >
> > > > > Index: linux-2.6.24-rc5-mm1/kernel/power/snapshot.c
> > > > > ===================================================================
> > > > > --- linux-2.6.24-rc5-mm1.orig/kernel/power/snapshot.c 2007-12-19 11:59:
> > > > 25.233961700 -0800
> > > > > +++ linux-2.6.24-rc5-mm1/kernel/power/snapshot.c 2007-12-19 15:16:
> > > > 34.179661929 -0800
> > > > > @@ -1203,7 +1203,7 @@ asmlinkage int swsusp_save(void)
> > > > >
> > > > > printk(KERN_INFO "PM: Creating hibernation image: \n");
> > > > >
> > > > > - drain_all_pages();
> > > > > + drain_local_pages(NULL);
> > > > > nr_pages = count_data_pages();
> > > > > nr_highmem = count_highmem_pages();
> > > > > printk(KERN_INFO "PM: Need to copy %u pages\n", nr_pages +
> > > > nr_highmem);
> > > >
> > > > You've omitted the second instance, right before the copy_data_pages()
> > > > call.
> > > >
> > >
> > > I guess I will wait for a revised patch.
> >
> > There's an Andrew's fix on top of this one in -mm:
> > http://marc.info/?l=linux-mm-commits&m=119810866812965&w=2
> >
> >
> >
> > > > > Index: linux-2.6.24-rc5-mm1/mm/page_alloc.c
> > > > > ===================================================================
> > > > > --- linux-2.6.24-rc5-mm1.orig/mm/page_alloc.c 2007-12-19 12:01:
> > > > 00.630421258 -0800
> > > > > +++ linux-2.6.24-rc5-mm1/mm/page_alloc.c 2007-12-19 15:12:
> > > > 19.850545818 -0800
> > > > > @@ -930,7 +930,7 @@ static void drain_pages(unsigned int cpu
> > > > > /*
> > > > > * Spill all of this CPU's per-cpu pages back into the buddy allocator.
> > > > > */
> > > > > -static void drain_local_pages(void *arg)
> > > > > +void drain_local_pages(void *arg)
> > > > > {
> > > > > drain_pages(smp_processor_id());
> > > > > }
> > > > > Index: linux-2.6.24-rc5-mm1/include/linux/gfp.h
> > > > > ===================================================================
> > > > > --- linux-2.6.24-rc5-mm1.orig/include/linux/gfp.h 2007-12-19 15:13:
> > > > 51.926950065 -0800
> > > > > +++ linux-2.6.24-rc5-mm1/include/linux/gfp.h 2007-12-19 15:16:
> > > > 11.951564369 -0800
> > > > > @@ -229,5 +229,6 @@ extern void FASTCALL(free_cold_page(stru
> > > > > void page_alloc_init(void);
> > > > > void drain_zone_pages(struct zone *zone, struct per_cpu_pages *pcp);
> > > > > void drain_all_pages(void);
> > > > > +void drain_local_pages(void *dummy);
> > > > >
> > > > > #endif /* __LINUX_GFP_H */
> > > >
> >
>
> I applied Christoph and Andrew's patches and recompiled. I suspended
> to disk and to ram several times and all looks good.
OK, thanks for testing!
Rafael
next prev parent reply other threads:[~2007-12-20 15:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-19 13:17 2.6.24-rc5-mm1 -- WARNING: at arch/x86/kernel/smp_32.c:561 native_smp_call_function_mask() Miles Lane
2007-12-19 15:06 ` 2.6.24-rc5-mm1 -- inconsistent {in-hardirq-W} -> {hardirq-on-W} usage -- pm-hibernate/9940 [HC0[0]:SC0[0]:HE1:SE1] Miles Lane
[not found] ` <47693385.1010901@gmail.com>
2007-12-19 18:42 ` Daniel Walker
[not found] ` <1198089729.2716.45.camel@imap.mvista.com>
2007-12-19 19:23 ` Daniel Walker
[not found] ` <1198092200.2716.49.camel@imap.mvista.com>
2007-12-19 20:02 ` Christoph Lameter
[not found] ` <Pine.LNX.4.64.0712191158140.28180@schroedinger.engr.sgi.com>
[not found] ` <200712200029.31709.rjw@sisk.pl>
2007-12-19 23:22 ` Christoph Lameter
[not found] ` <Pine.LNX.4.64.0712191511310.2001@schroedinger.engr.sgi.com>
2007-12-20 0:09 ` Rafael J. Wysocki
[not found] ` <200712200109.20452.rjw@sisk.pl>
2007-12-20 1:09 ` Miles Lane
2007-12-20 1:31 ` Rafael J. Wysocki
[not found] ` <200712200231.56128.rjw@sisk.pl>
2007-12-20 4:34 ` Miles Lane
[not found] ` <a44ae5cd0712192034m4745e78av9ebdc6da5cbfb60d@mail.gmail.com>
2007-12-20 15:45 ` Rafael J. Wysocki [this message]
2007-12-20 1:11 ` Miles Lane
2007-12-19 23:29 ` 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=200712201645.12346.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=dwalker@mvista.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=miles.lane@gmail.com \
--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