From: Pavel Machek <pavel@ucw.cz>
To: Nigel Cunningham <ncunningham@linuxmail.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] SMP support for drain local pages.
Date: Thu, 27 May 2004 21:25:37 +0200 [thread overview]
Message-ID: <20040527192537.GC509@openzaurus.ucw.cz> (raw)
In-Reply-To: <40B473F7.4000100@linuxmail.org>
Hi!
> This patch adds SMP support for drain_local_pages, so that suspend
> implementations can drain pcp structures on all CPUs and thus
> accurately
> determine which pages are free.
Why do you need it, btw?
1st it might be easier to just on_each_cpu(drain_local_pages)
in suspend2
2nd all but one cpus are stopped, right? That mrans that their local pages can't
mess up suspnd's accounting => no need to drain them.
Pavel
2.6.6-current-bk/mm/page_alloc.c
> smp-drain-local-pages/mm/page_alloc.c
> --- 2.6.6-current-bk/mm/page_alloc.c 2004-05-26 19:47:15.000000000
> +1000
> +++ smp-drain-local-pages/mm/page_alloc.c 2004-05-26
> 19:56:19.000000000 +1000
> @@ -459,6 +459,24 @@
> __drain_pages(smp_processor_id());
> local_irq_restore(flags);
> }
> +
> +#ifdef CONFIG_SMP
> +static void __smp_drain_local_pages(void * data)
> +{
> + drain_local_pages();
> +}
> +
> +void smp_drain_local_pages(void)
> +{
> + smp_call_function(__smp_drain_local_pages, NULL, 0, 1);
> + drain_local_pages();
> +}
> +#else
> +void smp_drain_local_pages(void)
> +{
> + drain_local_pages();
> +}
> +#endif
> #endif /* CONFIG_PM */
>
> static void zone_statistics(struct zonelist *zonelist, struct zone
> *z)
>
>
>
> -
> To unsubscribe from this list: send the line "unsubscribe
> linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
--
64 bytes from 195.113.31.123: icmp_seq=28 ttl=51 time=448769.1 ms
prev parent reply other threads:[~2004-05-27 19:30 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
2004-05-27 19:25 ` Pavel Machek [this message]
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=20040527192537.GC509@openzaurus.ucw.cz \
--to=pavel@ucw.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=ncunningham@linuxmail.org \
/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