From: Max Krasnyansky <maxk@qualcomm.com>
To: Gregory Haskins <ghaskins@novell.com>
Cc: a.p.zijlstra@chello.nl, mingo@elte.hu,
dmitry.adamushko@gmail.com, torvalds@linux-foundation.org,
pj@sgi.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] cpu hotplug, sched: Introduce cpu_active_map and redo sched domain managment (take 2)
Date: Wed, 16 Jul 2008 14:44:55 -0700 [thread overview]
Message-ID: <487E6BD7.3020006@qualcomm.com> (raw)
In-Reply-To: <487DAD86.BA47.005A.0@novell.com>
Gregory Haskins wrote:
>>>> On Tue, Jul 15, 2008 at 7:43 AM, in message
> <1216122229-4865-1-git-send-email-maxk@qualcomm.com>, Max Krasnyansky
> <maxk@qualcomm.com> wrote:
>
>> diff --git a/kernel/sched_rt.c b/kernel/sched_rt.c
>> index 47ceac9..5166080 100644
>> --- a/kernel/sched_rt.c
>> +++ b/kernel/sched_rt.c
>> @@ -922,6 +922,13 @@ 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.
>
> Hi Max,
> Its still early in the morning, and I havent had my coffee yet, so what I am about to
> say may be totally bogus ;)
>
> ..but, I am not sure we need to do this mask here. If the hotcpu_notifiier is still
> running (and it appears that it is) the runqueue that is taken offline will be removed
> from cpupri as well.
>
> Or perhaps I am misunderstanding the intention of "active" verses "online". If I
> understand correctly, active and online mean more or less the same thing, but
> splitting it out like this allows us to skip rebuilding the domains on every hotplug.
> Is that correct?
Basically with the cpu_active_map we're saying that sched domain masks may
contain cpus that are going down, and the scheduler is supposed to ignore
those (by checking cpu_active_map). ie The idea was to simplify cpu hotplug
handling. My impression was that cpupri updates are similar to the sched
domains in that respect.
> Assuming that the above is true, and assuming that the hotcpu_notifier is
> still invoked when the online status changes, cpupri will be properly updated
> to exclude the offline core. That will save an extra cpus_and (which the big-iron
> guys will be happy about ;)
Ah, now I see what you mean by the hotplug handler is still running. You're
talking about set_rq_online()/set_rq_offline() calls from migration_call().
Yes did not know what they were for and did not touch that path.
btw I'm definitely with you on the cpus_and() thing. When I added it in both
balancers I thought that it quite an overhead on bigger boxes.
So I'm not sure what the best way to handle this. If we say we're relying on
hotplug event sequence to ensure that rt balancer state is consistent then we
kind of back to square one. ie Might as do the same for the sched domains.
I guess we could update cpupri state when we update cpu_active_map. That way
the two will be synced up and we do not have to "and" them in the fast path.
Any other thoughts ?
Max
next prev parent reply other threads:[~2008-07-16 21:45 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-15 11:43 [PATCH] cpu hotplug, sched: Introduce cpu_active_map and redo sched domain managment (take 2) Max Krasnyansky
2008-07-15 11:49 ` Marcel Holtmann
2008-07-15 11:52 ` Peter Zijlstra
2008-07-15 11:57 ` Marcel Holtmann
2008-07-15 12:03 ` Peter Zijlstra
2008-07-15 15:24 ` Linus Torvalds
2008-07-15 12:45 ` Gregory Haskins
2008-07-15 15:22 ` Linus Torvalds
2008-07-16 8:57 ` Dmitry Adamushko
2008-07-16 20:29 ` Max Krasnyansky
2008-07-16 21:55 ` Dmitry Adamushko
2008-07-16 12:12 ` Gregory Haskins
2008-07-16 21:44 ` Max Krasnyansky [this message]
2008-07-17 2:51 ` [PATCH] cpu hotplug, sched: Introduce cpu_active_map and redosched " Gregory Haskins
2008-07-17 7:16 ` Max Krasnyansky
2008-07-17 11:57 ` [PATCH] cpu hotplug, sched: Introduce cpu_active_map and redoscheddomain " Gregory Haskins
2008-07-17 18:52 ` Max Krasnyansky
2008-07-17 19:46 ` [PATCH] cpu hotplug, sched: Introduce cpu_active_map and redoscheddomainmanagment " Gregory Haskins
2008-07-18 11:53 ` Peter Zijlstra
2008-07-18 12:22 ` [PATCH] cpu hotplug, sched:Introduce " Gregory Haskins
2008-07-22 5:10 ` Max Krasnyansky
2008-07-22 14:06 ` Gregory Haskins
2008-07-22 14:16 ` Peter Zijlstra
2008-07-22 14:17 ` Gregory Haskins
2008-07-22 14:26 ` Peter Zijlstra
2008-07-22 14:45 ` Gregory Haskins
2008-07-22 19:32 ` Max Krasnyansky
2008-08-11 13:11 ` Gregory Haskins
2008-08-11 21:57 ` Max Krasnyansky
2008-07-18 11:30 ` [PATCH] cpu hotplug, sched: Introduce cpu_active_map and redo sched domain managment " Ingo Molnar
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=487E6BD7.3020006@qualcomm.com \
--to=maxk@qualcomm.com \
--cc=a.p.zijlstra@chello.nl \
--cc=dmitry.adamushko@gmail.com \
--cc=ghaskins@novell.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=pj@sgi.com \
--cc=torvalds@linux-foundation.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