From: Matthew Dobson <colpatch@us.ibm.com>
To: Christoph Hellwig <hch@infradead.org>
Cc: Michael Hohnbaum <hohnbaum@us.ibm.com>,
Ingo Molnar <mingo@elte.hu>,
linux-kernel@vger.kernel.org, Erich Focht <efocht@ess.nec.de>
Subject: Re: [RFC] Simple NUMA scheduler patch
Date: Wed, 02 Oct 2002 11:56:54 -0700 [thread overview]
Message-ID: <3D9B4176.5020100@us.ibm.com> (raw)
In-Reply-To: 20021002141121.C2141@infradead.org
Christoph Hellwig wrote:
> On Tue, Oct 01, 2002 at 04:55:35PM -0700, Michael Hohnbaum wrote:
>>--- clean-2.5.40/kernel/sched.c Tue Oct 1 13:48:34 2002
>>+++ linux-2.5.40/kernel/sched.c Tue Oct 1 13:27:46 2002
>>@@ -30,6 +30,9 @@
>> #include <linux/notifier.h>
>> #include <linux/delay.h>
>> #include <linux/timer.h>
>>+#if CONFIG_NUMA
>>+#include <asm/topology.h>
>>+#endif
>
> Please make this inlcude unconditional, okay?
Agreed... The topology macros are designed to work for *any*
architecture, so there's no need to selectively include them.
>>+/*
>>+ * find_busiest_queue - find the busiest runqueue.
>>+ */
>>+static inline runqueue_t *find_busiest_queue(runqueue_t *this_rq, int this_cpu, int idle, int *imbalance)
>>+{
>>+ int nr_running, load, max_load_on_node, max_load_off_node, i;
>>+ runqueue_t *busiest, *busiest_on_node, *busiest_off_node, *rq_src;
>
> You're new find_busiest_queue is to 80 or 90% the same as the non-NUMA one.
> At least add the #ifdefs only where needed, but as cpu_to_node() optimizes
> away for the non-NUMA case I think you could just make it unconditional.
Looking over the code... I think I agree with Christoph here. I think
that most of the new code won't even get touched in the non-NUMA case.
Of course, let me know if I'm wrong! ;)
>>+ if (__cpu_to_node(i) == __cpu_to_node(this_cpu)) {
>
> I think it should be cpu_to_node, not __cpu_to_node.
Actually, the non-double-underbar versions are not in the kernel... I
have a patch for them, though... They just do some simple bound/error
checking as wrappers around the double-underbar versions. As long as
you aren't calling the macros with bizarre values (ie 0<=i<=NR_CPUS),
the double-underbar versions will work just fine, and will be mildly
quicker.
Other than that, it looks good to me!
Cheers!
-Matt
next prev parent reply other threads:[~2002-10-02 18:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <Pine.LNX.4.44.0209050905180.8086-100000@localhost.localdomain>
2002-10-01 23:55 ` [RFC] Simple NUMA scheduler patch Michael Hohnbaum
2002-10-02 13:11 ` Christoph Hellwig
2002-10-02 18:56 ` Matthew Dobson [this message]
2002-10-02 22:08 ` Michael Hohnbaum
2002-10-02 17:54 ` Erich Focht
2002-10-02 18:26 ` Michael Hohnbaum
2002-10-02 18:30 ` Michael Hohnbaum
2002-10-02 20:25 ` Martin J. Bligh
2002-10-05 22:32 ` Erich Focht
2002-10-07 23:37 ` Michael Hohnbaum
2002-10-14 17:19 ` Erich Focht
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=3D9B4176.5020100@us.ibm.com \
--to=colpatch@us.ibm.com \
--cc=efocht@ess.nec.de \
--cc=hch@infradead.org \
--cc=hohnbaum@us.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/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;
as well as URLs for NNTP newsgroup(s).