From: Preeti U Murthy <preeti@linux.vnet.ibm.com>
To: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
linux-kernel@vger.kernel.org, Mike Galbraith <efault@gmx.de>,
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: Fri, 29 Mar 2013 12:42:53 +0530 [thread overview]
Message-ID: <51553EF5.90702@linux.vnet.ibm.com> (raw)
In-Reply-To: <1364457537-15114-5-git-send-email-iamjoonsoo.kim@lge.com>
Hi Joonsoo,
On 03/28/2013 01:28 PM, Joonsoo Kim wrote:
> Following-up upper se in sched_slice() should not be done,
> because sched_slice() is used for checking that resched is needed
> whithin *this* cfs_rq and there is one problem related to this
> in current implementation.
>
> The problem is that if we follow-up upper se in sched_slice(), it is
> possible that we get a ideal slice which is lower than
> sysctl_sched_min_granularity.
>
> For example, we assume that we have 4 tg which is attached to root tg
> with same share and each one have 20 runnable tasks on cpu0, respectivly.
> In this case, __sched_period() return sysctl_sched_min_granularity * 20
> and then go into loop. At first iteration, we compute a portion of slice
> for this task on this cfs_rq, so get a slice, sysctl_sched_min_granularity.
> Afterward, we enter second iteration and get a slice which is a quarter of
> sysctl_sched_min_granularity, because there is 4 tgs with same share
> in that cfs_rq.
>
> Ensuring slice larger than min_granularity is important for performance
> and there is no lower bound about this, except timer tick, we should
> fix it not to consider upper se when calculating sched_slice.
>
I am assuming the sysctl_sched_latency = 20ms and
sysctl_sched_min_granularity = 4ms.
In that case:
With your patch, the sum of the sched_slice(runnable_task) on each_tg is
40ms = sched_min_granularity * 10, while the parent tg has a
sched_slice of sysctl_sched_latency / 4 = (20 / 4) = 5ms.
Ideally the children's cpu share must add upto the parent's share.
Thank you
Regards
Preeti U Murthy
next prev parent reply other threads:[~2013-03-29 7:14 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 [this message]
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
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=51553EF5.90702@linux.vnet.ibm.com \
--to=preeti@linux.vnet.ibm.com \
--cc=alex.shi@intel.com \
--cc=efault@gmx.de \
--cc=iamjoonsoo.kim@lge.com \
--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=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).