From: Dimitri Sivanich <sivanich@sgi.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Ingo Molnar <mingo@elte.hu>, linux-kernel@vger.kernel.org
Subject: [PATCH] Fix relax_domain_level interface
Date: Tue, 5 Jun 2012 13:44:36 -0500 [thread overview]
Message-ID: <20120605184436.GA15668@sgi.com> (raw)
In-Reply-To: <1338921419.2749.31.camel@twins>
On Tue, Jun 05, 2012 at 08:36:59PM +0200, Peter Zijlstra wrote:
> On Tue, 2012-06-05 at 13:34 -0500, Dimitri Sivanich wrote:
> >
> > I'll submit a patch shortly that should return these back to what appears to
> > be their intended functionality.
>
> I guess removing the max check in the paramater parsing is the easiest
> thing.
My thoughts exactly.
Fix the relax_domain_level boot parameter. It does not get processed because
sched_domain_level_max is 0 at the time that setup_relax_domain_level()
is run. Simply accept the value as it is, as we don't know the value
of sched_domain_level_max until sched domain construction is completed.
Fix sched_relax_domain_level in cpuset. The build_sched_domain() routine calls
the set_domain_attribute() routine prior to setting the sd->level, however,
the set_domain_attribute() routine relies on the sd->level to decide whether
idle load balancing will be off/on.
Signed-off-by: Dimitri Sivanich <sivanich@sgi.com>
---
kernel/sched/core.c | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
Index: linux/kernel/sched/core.c
===================================================================
--- linux.orig/kernel/sched/core.c
+++ linux/kernel/sched/core.c
@@ -6165,11 +6165,8 @@ int sched_domain_level_max;
static int __init setup_relax_domain_level(char *str)
{
- unsigned long val;
-
- val = simple_strtoul(str, NULL, 0);
- if (val < sched_domain_level_max)
- default_relax_domain_level = val;
+ if (kstrtoint(str, 0, &default_relax_domain_level))
+ pr_warn("Unable to set relax_domain_level\n");
return 1;
}
@@ -6543,7 +6540,6 @@ struct sched_domain *build_sched_domain(
if (!sd)
return child;
- set_domain_attribute(sd, attr);
cpumask_and(sched_domain_span(sd), cpu_map, tl->mask(cpu));
if (child) {
sd->level = child->level + 1;
@@ -6551,6 +6547,7 @@ struct sched_domain *build_sched_domain(
child->parent = sd;
}
sd->child = child;
+ set_domain_attribute(sd, attr);
return sd;
}
next prev parent reply other threads:[~2012-06-05 18:44 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-01 21:03 relax_domain_level boot parameter has no effect Dimitri Sivanich
2012-06-04 15:37 ` Peter Zijlstra
2012-06-04 18:16 ` Dimitri Sivanich
2012-06-05 18:34 ` Dimitri Sivanich
2012-06-05 18:36 ` Peter Zijlstra
2012-06-05 18:44 ` Dimitri Sivanich [this message]
2012-06-06 16:01 ` [tip:sched/urgent] sched: Fix the relax_domain_level boot parameter tip-bot for Dimitri Sivanich
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=20120605184436.GA15668@sgi.com \
--to=sivanich@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=peterz@infradead.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