public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nigel Cunningham <ncunningham@linuxmail.org>
To: Pavel Machek <pavel@ucw.cz>
Cc: Andrew Morton <akpm@osdl.org>,
	davej@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] SMP support for drain local pages v2.
Date: Fri, 28 May 2004 07:22:28 +1000	[thread overview]
Message-ID: <40B65C14.6070705@linuxmail.org> (raw)
In-Reply-To: <20040527192956.GD509@openzaurus.ucw.cz>

Hi.

Andrew, Dave: do you want to be cc'd still?

Pavel Machek wrote:
> drain_local_pages was there so that accounting is not
> screwed by local pages. That should be non-issue for stopped cpus.

You're probably right that it's not absolutely necessary. That said, I have three reasons for 
wanting to do it: each cpu has say 200 pages in its pcp structs (this varies with zone size). If we 
don't drain them, we're saving 200 extra pages (because they're not marked as free). That's fine for 
a dual CPU system, but it's not very scalable. (I admit I wouldn't want to suspend to disk a 4GB 
machine now, but in the future?).

More than that, though, my real motivation is to be able to account for every page in the system and 
ensure that suspend is doing the right thing with all of them. If I drain the PCP page lists, I can 
be more certain that allocations do come from the right place.

Thirdly, after suspending hot pages aren't really hot anymore. We may as well start with clean lists.

> 
> OTOH you are right that my swsusp with smp does not work
> on my smp machine, and I do not yet know why.

I found that I needed to:
- save context for other CPUs.
- ensure they're completely idle during copyback even running the idle thread messed things up (use 
a smp function)
- ensure suspend is always running on CPU0 (at the start of suspending and resuming)

You might also consider how you're restoring highmem pages and how that interacts with SMP esp in 
flushing tlbs.

Nigel
-- 
Nigel & Michelle Cunningham
C/- Westminster Presbyterian Church Belconnen
61 Templeton Street, Cook, ACT 2614.
+61 (2) 6251 7727(wk); +61 (2) 6254 0216 (home)

Evolution (n): A hypothetical process whereby infinitely improbable events occur
with alarming frequency, order arises from chaos, and no one is given credit.

  reply	other threads:[~2004-05-27 21:29 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-26 10:39 [PATCH] SMP support for drain local pages Nigel Cunningham
2004-05-26 22:32 ` Dave Jones
2004-05-26 22:56   ` [PATCH] SMP support for drain local pages v2 Nigel Cunningham
2004-05-26 23:26     ` Andrew Morton
2004-05-26 23:38       ` Nigel Cunningham
2004-05-26 23:56         ` Andrew Morton
2004-05-26 23:56           ` Nigel Cunningham
2004-05-27 19:29         ` Pavel Machek
2004-05-27 21:22           ` Nigel Cunningham [this message]
2004-05-27 19:25 ` [PATCH] SMP support for drain local pages Pavel Machek

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=40B65C14.6070705@linuxmail.org \
    --to=ncunningham@linuxmail.org \
    --cc=akpm@osdl.org \
    --cc=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.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