From: Rusty Russell <rusty@rustcorp.com.au>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Remove More Unneccessary CPU Notifiers
Date: Sun, 25 Jan 2004 13:23:22 +1100 [thread overview]
Message-ID: <20040125023641.1CB592C29E@lists.samba.org> (raw)
In-Reply-To: Your message of "Sat, 24 Jan 2004 10:10:39 -0800." <20040124101039.296c34fd.akpm@osdl.org>
In message <20040124101039.296c34fd.akpm@osdl.org> you write:
> Or are you saying that we should just leave the per-cpu accounting in a
> non-zero state when its CPU has gone away, and rely upon the stats
> gathering code iterating across all cpu_possible cpus?
In general, yes! In general, if you cared about performance you
wouldn't be doing such iteration.
> That's a bit lame in the case of __get_page_state() at least. We've had
> problems with excess CPU consumption in there at times and it would be good
> to be able to change that function to iterate across all online CPUs, not
> all possible ones. We can do that if we have a notifier which spills the
> numbers from the gone-away CPU into the local CPU's slot.
Well, that's what's happening at the moment if you look at the code:
while (cpu < NR_CPUS) {
unsigned long *in, *out, off;
if (!cpu_possible(cpu)) {
cpu++;
continue;
}
Spilling the stats is a fine optimization, sure, but that can come
later.
Especially since it need only be done at CPU_DEAD time: the hotplug
CPU patch adds a convenient macro for such things.
"hotcpu_notifier()" compiles out when !CONFIG_HOTPLUG_CPU.
What's there at the moment really is just wasted code.
RUsty.
--
Anyone who quotes me in their sig is an idiot. -- Rusty Russell.
prev parent reply other threads:[~2004-01-25 2:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-24 12:16 [PATCH] Remove More Unneccessary CPU Notifiers Rusty Russell
2004-01-24 18:10 ` Andrew Morton
2004-01-25 2:23 ` Rusty Russell [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=20040125023641.1CB592C29E@lists.samba.org \
--to=rusty@rustcorp.com.au \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.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