From: Nick Piggin <nickpiggin@yahoo.com.au>
To: Ingo Molnar <mingo@elte.hu>
Cc: Andrew Morton <akpm@osdl.org>,
linux-kernel <linux-kernel@vger.kernel.org>,
"Siddha, Suresh B" <suresh.b.siddha@intel.com>
Subject: Re: [patch 5/5] sched: consolidate sbe sbf
Date: Wed, 06 Apr 2005 18:09:32 +1000 [thread overview]
Message-ID: <4253993C.4020505@yahoo.com.au> (raw)
In-Reply-To: <20050406062723.GC5973@elte.hu>
Ingo Molnar wrote:
> * Nick Piggin <nickpiggin@yahoo.com.au> wrote:
>
>
>>5/5
>>
>>Any ideas about what to do with schedstats?
>>Do we really need balance on exec and fork as seperate
>>statistics?
>
>
>>Consolidate balance-on-exec with balance-on-fork. This is made easy
>>by the sched-domains RCU patches.
>>
>>As well as the general goodness of code reduction, this allows
>>the runqueues to be unlocked during balance-on-fork.
>>
>>schedstats is a problem. Maybe just have balance-on-event instead
>>of distinguishing fork and exec?
>>
>>Signed-off-by: Nick Piggin <nickpiggin@yahoo.com.au>
>
>
> looks good.
>
One problem I just noticed, sorry. This is doing set_cpus_allowed
without holding the runqueue lock and without checking the hard
affinity mask either.
We could just do a set_cpus_allowed, or take the lock, set_cpus_allowed,
and take the new lock, but that's probably a bit heavy if we can avoid it.
In the interests of speed in this fast path, do you think we can do this
in sched_fork, before the task has even been put on the tasklist?
That would avoid all locking problems. Passing clone_flags into sched_fork
would not be a problem if we want to distinguish fork() and clone(CLONE_VM).
Yes? I'll cut a new patch to do just that.
> Acked-by: Ingo Molnar <mingo@elte.hu>
>
> while the code is now consolidated, i think we still need the separate
> fork/exec stats for schedstat.
This makes it a bit harder then, to get good stats in the sched-domain
(which is really what we want). It would basically mean doing
if (balance fork)
schedstat_inc(sbf_cnt);
else if (balance exec)
schedstat_inc(sbe_cnt);
etc.
That should all get optimised out by the compiler, but still a bit ugly.
Any ideas?
--
SUSE Labs, Novell Inc.
next prev parent reply other threads:[~2005-04-06 8:09 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-05 23:44 [patch 1/5] sched: remove degenerate domains Nick Piggin
2005-04-05 23:45 ` [patch 2/5] sched: NULL domains Nick Piggin
2005-04-05 23:46 ` [patch 3/5] sched: multilevel sbe and sbf Nick Piggin
2005-04-05 23:47 ` [patch 4/5] sched: RCU sched domains Nick Piggin
2005-04-05 23:49 ` [patch 5/5] sched: consolidate sbe sbf Nick Piggin
2005-04-06 6:27 ` Ingo Molnar
2005-04-06 8:09 ` Nick Piggin [this message]
2005-04-06 8:16 ` Nick Piggin
2005-04-07 7:17 ` Ingo Molnar
2005-04-07 7:15 ` Ingo Molnar
2005-04-06 6:18 ` [patch 4/5] sched: RCU sched domains Ingo Molnar
2005-04-06 8:01 ` Nick Piggin
2005-04-07 7:11 ` Ingo Molnar
2005-04-07 7:58 ` Nick Piggin
2005-04-11 22:15 ` Paul E. McKenney
2005-04-12 0:03 ` Nick Piggin
2005-04-06 5:54 ` [patch 3/5] sched: multilevel sbe and sbf Ingo Molnar
2005-04-06 7:53 ` Nick Piggin
2005-04-06 5:45 ` [patch 2/5] sched: NULL domains Ingo Molnar
2005-04-06 5:48 ` Ingo Molnar
2005-04-06 7:51 ` Nick Piggin
2005-04-06 5:44 ` [patch 1/5] sched: remove degenerate domains Ingo Molnar
2005-04-06 7:10 ` Siddha, Suresh B
2005-04-06 7:13 ` Ingo Molnar
2005-04-06 8:12 ` Nick Piggin
2005-04-06 7:49 ` Nick Piggin
2005-04-07 7:00 ` 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=4253993C.4020505@yahoo.com.au \
--to=nickpiggin@yahoo.com.au \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=suresh.b.siddha@intel.com \
/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