login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
August
»
11
Re: [PATCH] cpu hotplug, sched:Introduce cpu_active_map and redoscheddomainmanagment (take 2)
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From:
Max Krasnyansky <maxk@...>
To: Gregory Haskins <ghaskins@...>
Cc: <mingo@...>, Peter Zijlstra <a.p.zijlstra@...>, <dmitry.adamushko@...>, <torvalds@...>, <pj@...>, <linux-kernel@...>
Subject:
Re: [PATCH] cpu hotplug, sched:Introduce cpu_active_map and redoscheddomainmanagment (take 2)
Date: Monday, August 11, 2008 - 5:57 pm
Gregory Haskins wrote:
quoted text
> Hi Ingo, > Here is another patch submitted that has not been acked/nacked yet. If > you get a free moment, please let me know your thoughts. Here is the > full thread for your convenience: > >
http://lkml.org/lkml/2008/7/22/281
> > (and FYI it was ACKed by Peter here:
http://lkml.org/lkml/2008/7/22/286
)
I thought this went in already. It looks good to me too. Max
quoted text
> > Gregory Haskins wrote: >> Max Krasnyansky wrote: >>> Greg, correct me if I'm wrong but we seem to have exact same issue >>> with the >>> rq->rq->online map. Lets take "cpu going down" for example. We're >>> clearing >>> rq->rd->online bit on DYING event, but nothing AFAICS prevents >>> another cpu >>> calling rebuild_sched_domains()->partition_sched_domains() in the >>> middle of >>> the hotplug sequence. >>> partition_sched_domains() will happily reset rd->rq->online mask and >>> things >>> will fail. I'm talking about this path >>> >>> __build_sched_domains() -> cpu_attach_domain() -> rq_attach_root() >>> ... >>> cpu_set(rq->cpu, rd->span); >>> if (cpu_isset(rq->cpu, cpu_online_map)) >>> set_rq_online(rq); >>> ... >>> >>> >> >> I think you are right, but wouldn't s/online/active above fix that as >> well? The active_map didnt exist at the time that code went in >> initially ;) >> >>> -- >>> >>> btw Why didn't we convert sched*.c to use rq->rd->online when it was >>> introduced ? ie Instead of using cpu_online_map directly. >>> >> I think things were converted where they made sense to convert. But >> we also had a different goal at that time, so perhaps something was >> missed. If you think something else should be converted, please point >> it out. >> >> In the meantime, I would suggest we consider this patch on top of >> yours (applies to tip/sched/devel): >> >> ---------------------- >> >> sched: Fully integrate cpus_active_map and root-domain code >> Signed-off-by: Gregory Haskins <ghaskins@novell.com> >> >> diff --git a/kernel/sched.c b/kernel/sched.c >> index 62b1b8e..99ba70d 100644 >> --- a/kernel/sched.c >> +++ b/kernel/sched.c >> @@ -6611,7 +6611,7 @@ static void rq_attach_root(struct rq *rq, struct >> root_domain *rd) >> rq->rd = rd; >> >> cpu_set(rq->cpu, rd->span); >> - if (cpu_isset(rq->cpu, cpu_online_map)) >> + if (cpu_isset(rq->cpu, cpu_active_map)) >> set_rq_online(rq); >> >> spin_unlock_irqrestore(&rq->lock, flags); >> diff --git a/kernel/sched_fair.c b/kernel/sched_fair.c >> index 7f70026..2bae8de 100644 >> --- a/kernel/sched_fair.c >> +++ b/kernel/sched_fair.c >> @@ -1004,7 +1004,7 @@ static void yield_task_fair(struct rq *rq) >> * search starts with cpus closest then further out as needed, >> * so we always favor a closer, idle cpu. >> * Domains may include CPUs that are not usable for migration, >> - * hence we need to mask them out (cpu_active_map) >> + * hence we need to mask them out (rq->rd->online) >> * >> * Returns the CPU we should wake onto. >> */ >> @@ -1032,7 +1032,7 @@ static int wake_idle(int cpu, struct task_struct >> *p) >> || ((sd->flags & SD_WAKE_IDLE_FAR) >> && !task_hot(p, task_rq(p)->clock, sd))) { >> cpus_and(tmp, sd->span, p->cpus_allowed); >> - cpus_and(tmp, tmp, cpu_active_map); >> + cpus_and(tmp, tmp, task_rq(p)->rd->online); >> for_each_cpu_mask(i, tmp) { >> if (idle_cpu(i)) { >> if (i != task_cpu(p)) { >> diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c >> index 24621ce..d93169d 100644 >> --- a/kernel/sched_rt.c >> +++ b/kernel/sched_rt.c >> @@ -936,13 +936,6 @@ static int find_lowest_rq(struct task_struct *task) >> return -1; /* No targets found */ >> >> /* >> - * Only consider CPUs that are usable for migration. >> - * I guess we might want to change cpupri_find() to ignore those >> - * in the first place. >> - */ >> - cpus_and(*lowest_mask, *lowest_mask, cpu_active_map); >> - >> - /* >> * At this point we have built a mask of cpus representing the >> * lowest priority tasks in the system. Now we want to elect >> * the best one based on our affinity and topology. >> >> -------------- >> >> Regards, >> -Greg >> > >
--
unsubscribe notice
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/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
[PATCH] cpu hotplug, sched: Introduce cpu_active_map and red...
, Max Krasnyansky
, (Tue Jul 15, 7:43 am)
Re: [PATCH] cpu hotplug, sched: Introduce cpu_active_map and...
, Ingo Molnar
, (Fri Jul 18, 7:30 am)
Re: [PATCH] cpu hotplug, sched: Introduce cpu_active_map and...
, Gregory Haskins
, (Wed Jul 16, 8:12 am)
Re: [PATCH] cpu hotplug, sched: Introduce cpu_active_map and...
, Max Krasnyansky
, (Wed Jul 16, 5:44 pm)
Re: [PATCH] cpu hotplug, sched: Introduce cpu_active_map and...
, Gregory Haskins
, (Wed Jul 16, 10:51 pm)
Re: [PATCH] cpu hotplug, sched: Introduce cpu_active_map and...
, Max Krasnyansky
, (Thu Jul 17, 3:16 am)
Re: [PATCH] cpu hotplug, sched: Introduce cpu_active_map and...
, Gregory Haskins
, (Thu Jul 17, 7:57 am)
Re: [PATCH] cpu hotplug, sched: Introduce cpu_active_map and...
, Max Krasnyansky
, (Thu Jul 17, 2:52 pm)
Re: [PATCH] cpu hotplug, sched: Introduce cpu_active_map and...
, Gregory Haskins
, (Thu Jul 17, 3:46 pm)
Re: [PATCH] cpu hotplug, sched: Introduce cpu_active_map and...
, Peter Zijlstra
, (Fri Jul 18, 7:53 am)
Re: [PATCH] cpu hotplug, sched:Introduce cpu_active_map and ...
, Gregory Haskins
, (Fri Jul 18, 8:22 am)
Re: [PATCH] cpu hotplug, sched:Introduce cpu_active_map and ...
, Max Krasnyansky
, (Tue Jul 22, 1:10 am)
Re: [PATCH] cpu hotplug, sched:Introduce cpu_active_map and ...
, Gregory Haskins
, (Tue Jul 22, 10:06 am)
Re: [PATCH] cpu hotplug, sched:Introduce cpu_active_map and ...
, Gregory Haskins
, (Mon Aug 11, 9:11 am)
Re: [PATCH] cpu hotplug, sched:Introduce cpu_active_map and ...
, Max Krasnyansky
, (Mon Aug 11, 5:57 pm)
Re: [PATCH] cpu hotplug, sched:Introduce cpu_active_map and ...
, Max Krasnyansky
, (Tue Jul 22, 3:32 pm)
Re: [PATCH] cpu hotplug, sched:Introduce cpu_active_map and ...
, Peter Zijlstra
, (Tue Jul 22, 10:16 am)
Re: [PATCH] cpu hotplug, sched:Introduce cpu_active_map and ...
, Gregory Haskins
, (Tue Jul 22, 10:17 am)
Re: [PATCH] cpu hotplug, sched:Introduce cpu_active_map and ...
, Peter Zijlstra
, (Tue Jul 22, 10:26 am)
Re: [PATCH] cpu hotplug, sched:Introduce cpu_active_map and ...
, Gregory Haskins
, (Tue Jul 22, 10:45 am)
Re: [PATCH] cpu hotplug, sched: Introduce cpu_active_map and...
, Dmitry Adamushko
, (Wed Jul 16, 4:57 am)
Re: [PATCH] cpu hotplug, sched: Introduce cpu_active_map and...
, Max Krasnyansky
, (Wed Jul 16, 4:29 pm)
Re: [PATCH] cpu hotplug, sched: Introduce cpu_active_map and...
, Dmitry Adamushko
, (Wed Jul 16, 5:55 pm)
Re: [PATCH] cpu hotplug, sched: Introduce cpu_active_map and...
, Linus Torvalds
, (Tue Jul 15, 11:22 am)
Re: [PATCH] cpu hotplug, sched: Introduce cpu_active_map and...
, Gregory Haskins
, (Tue Jul 15, 8:45 am)
Re: [PATCH] cpu hotplug, sched: Introduce cpu_active_map and...
, Marcel Holtmann
, (Tue Jul 15, 7:49 am)
Re: [PATCH] cpu hotplug, sched: Introduce cpu_active_map and...
, Peter Zijlstra
, (Tue Jul 15, 7:52 am)
Re: [PATCH] cpu hotplug, sched: Introduce cpu_active_map and...
, Marcel Holtmann
, (Tue Jul 15, 7:57 am)
Re: [PATCH] cpu hotplug, sched: Introduce cpu_active_map and...
, Linus Torvalds
, (Tue Jul 15, 11:24 am)
Re: [PATCH] cpu hotplug, sched: Introduce cpu_active_map and...
, Peter Zijlstra
, (Tue Jul 15, 8:03 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Ingo Molnar
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Greg Kroah-Hartman
[PATCH 001/196] Chinese: Add the known_regression URI to the HOWTO
Roland Dreier
Re: Integration of SCST in the mainstream Linux kernel
git
:
linux-netdev
:
David Miller
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Arjan van de Ven
Re: [GIT]: Networking
Linus Torvalds
Re: iptables very slow after commit 784544739a25c30637397ace5489eeb6e15d7d49
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
13 users
and
863 guests
online.
Online users
winterizingbln
zeekec
carloleedcerti
micralitebabyp
improveyoureye
alaskacruisexc
baseballnewqulm
airfreightchai
fujii
photomugsspnmni
pennsylvanialo
traceacellphon
KenanMoly129
Syndicate