Re: [PATCH] SMP support for drain local pages v2.

From: Nigel Cunningham
Date: Thu May 27 2004 - 16:29:59 EST


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