From: Joonsoo Kim <iamjoonsoo.kim@lge.com>
To: Mike Galbraith <efault@gmx.de>
Cc: Preeti U Murthy <preeti@linux.vnet.ibm.com>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
linux-kernel@vger.kernel.org, Paul Turner <pjt@google.com>,
Alex Shi <alex.shi@intel.com>,
Vincent Guittot <vincent.guittot@linaro.org>,
Morten Rasmussen <morten.rasmussen@arm.com>,
Namhyung Kim <namhyung@kernel.org>
Subject: Re: [PATCH 4/5] sched: don't consider upper se in sched_slice()
Date: Tue, 2 Apr 2013 18:35:35 +0900 [thread overview]
Message-ID: <20130402093535.GF16699@lge.com> (raw)
In-Reply-To: <1364870126.9544.5.camel@marge.simpson.net>
Hello, Mike.
On Tue, Apr 02, 2013 at 04:35:26AM +0200, Mike Galbraith wrote:
> On Tue, 2013-04-02 at 11:25 +0900, Joonsoo Kim wrote:
> > Hello, Preeti.
> >
> > On Mon, Apr 01, 2013 at 12:36:52PM +0530, Preeti U Murthy wrote:
> > > Hi Joonsoo,
> > >
> > > On 04/01/2013 09:38 AM, Joonsoo Kim wrote:
> > > > Hello, Preeti.
> > > >
> > >
> > > >>
> > > >> Ideally the children's cpu share must add upto the parent's share.
> > > >>
> > > >
> > > > I don't think so.
> > > >
> > > > We should schedule out the parent tg if 5ms is over. As we do so, we can
> > > > fairly distribute time slice to every tg within short term. If we add
> > > > the children's cpu share upto the parent's, the parent tg may have
> > > > large time slice, so it cannot be preempted easily. There may be a latency
> > > > problem if there are many tgs.
> > >
> > > In the case where the #running < sched_nr_latency, the children's
> > > sched_slices add up to the parent's.
> > >
> > > A rq with two tgs,each with 3 tasks.
> > >
> > > Each of these tasks have a sched slice of
> > > [(sysctl_sched_latency / 3) / 2] as of the present implementation.
> > >
> > > The sum of the above sched_slice of all tasks of a tg will lead to the
> > > sched_slice of its parent: sysctl_sched_latency / 2
> > >
> > > This breaks when the nr_running on each tg > sched_nr_latency. However I
> > > don't know if this is a good thing or a bad thing.
> >
> > Ah.. Now I get your point. Yes, you are right and it may be good thing.
> > With that property, all tasks in the system can be scheduled at least once
> > in sysctl_sched_latency. sysctl_sched_latency is system-wide configuration,
> > so my patch may be wrong. With my patch, all tasks in the system cannot be
> > scheduled at least once in sysctl_sched_latency. Instead, it schedule
> > all tasks in cfs_rq at least once in sysctl_sched_latency if there is
> > no other tgs.
> >
> > I think that it is real problem that sysctl_sched_min_granularity is not
> > guaranteed for each task.
> > Instead of this patch, how about considering low bound?
> >
> > if (slice < sysctl_sched_min_granularity)
> > slice = sysctl_sched_min_granularity;
>
> How many SCHED_IDLE or +nice tasks will fit in that?
It is more related to how many running tasks in cfs_rq and how many tg is
in the system. If we have two tgs which have more than sched_nr_latency
tasks, all these tasks fit in this condition in current implementation.
Thanks.
>
> -Mike
>
> --
> 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/
next prev parent reply other threads:[~2013-04-02 9:35 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-28 7:58 [PATCH 0/5] optimization, clean-up, correctness about fair.c Joonsoo Kim
2013-03-28 7:58 ` [PATCH 1/5] sched: remove one division operation in find_buiest_queue() Joonsoo Kim
2013-03-28 7:58 ` [PATCH 2/5] sched: factor out code to should_we_balance() Joonsoo Kim
2013-03-29 11:45 ` Peter Zijlstra
2013-04-01 5:10 ` Joonsoo Kim
2013-03-29 11:58 ` Peter Zijlstra
2013-04-01 5:16 ` Joonsoo Kim
2013-04-02 8:10 ` Peter Zijlstra
2013-04-02 9:50 ` Joonsoo Kim
2013-04-02 10:00 ` Peter Zijlstra
2013-04-02 10:29 ` Peter Zijlstra
2013-04-04 0:55 ` Joonsoo Kim
2013-03-28 7:58 ` [PATCH 3/5] sched: clean-up struct sd_lb_stat Joonsoo Kim
2013-03-28 7:58 ` [PATCH 4/5] sched: don't consider upper se in sched_slice() Joonsoo Kim
2013-03-29 7:12 ` Preeti U Murthy
2013-04-01 4:08 ` Joonsoo Kim
2013-04-01 7:06 ` Preeti U Murthy
2013-04-02 2:25 ` Joonsoo Kim
2013-04-02 2:35 ` Mike Galbraith
2013-04-02 9:35 ` Joonsoo Kim [this message]
2013-04-02 4:55 ` Preeti U Murthy
2013-04-02 9:26 ` Joonsoo Kim
2013-04-02 17:32 ` Preeti U Murthy
2013-04-04 0:42 ` Joonsoo Kim
2013-04-04 6:48 ` Preeti U Murthy
2013-04-05 2:06 ` Joonsoo Kim
2013-03-28 7:58 ` [PATCH 5/5] sched: limit sched_slice if it is more than sysctl_sched_latency Joonsoo Kim
2013-03-29 11:35 ` Preeti U Murthy
2013-04-01 5:09 ` Joonsoo Kim
2013-04-01 6:45 ` Preeti U Murthy
2013-04-02 2:02 ` Joonsoo Kim
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=20130402093535.GF16699@lge.com \
--to=iamjoonsoo.kim@lge.com \
--cc=alex.shi@intel.com \
--cc=efault@gmx.de \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=morten.rasmussen@arm.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=pjt@google.com \
--cc=preeti@linux.vnet.ibm.com \
--cc=vincent.guittot@linaro.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;
as well as URLs for NNTP newsgroup(s).