From: Preeti U Murthy <preeti@linux.vnet.ibm.com>
To: Peter Zijlstra <peterz@infradead.org>, Ben Segall <bsegall@google.com>
Cc: Preeti Murthy <preeti.lkml@gmail.com>,
Ingo Molnar <mingo@redhat.com>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] sched: fix exec_start/task_hot on migrated tasks
Date: Mon, 19 May 2014 13:43:32 +0530 [thread overview]
Message-ID: <5379BD2C.6080106@linux.vnet.ibm.com> (raw)
In-Reply-To: <20140516141745.GU11096@twins.programming.kicks-ass.net>
On 05/16/2014 07:47 PM, Peter Zijlstra wrote:
> On Fri, May 16, 2014 at 07:27:32PM +0530, Preeti Murthy wrote:
>>> 0 isn't strictly the right thing to do here, since the clock can wrap,
>>> but being wrong every ~585 years isn't too big an issue for this.
>>
>> I don't understand this. Will setting it to 0 not indicate beginning
>> of ticking?
>
> In modular spaces there is no beginnings nor endings.
>
>> So when you find out for how long the task has run, the
>> difference would be larger than what would have been had you
>> let exec_start be at its previous value of the old cpu's clock_task right?
>
> Nope, see the modular space thing, once every ~585 years we'll wrap the
> clock and 0 is within range of recently ran.
>
>> Will not setting exec_start to the clock_task of the destination rq
>> during migration be better? This would be the closest we could
>> come to estimating the amount of time the task has run on this new
>> cpu while deciding task_hot or not no?
>
> Setting it to the exact clock_task of the destination rq would make it
> hot on that rq, even though it hasn't yet ran there, so you'd have to do
> something like: rq_clock_task(dst_rq) - sysctl_sched_migration_cost.
>
> But seeing as how that is far more work, and all this is heuristics
> anyhow and an extra fail term of 1/585 years is far below the current
> fail rate, all is well.
>
Ok now I understand this.Thanks!
Reviewed-by: Preeti U Murthy <preeti@linux.vnet.ibm.com>
next prev parent reply other threads:[~2014-05-19 8:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-15 22:59 [PATCH] sched: fix exec_start/task_hot on migrated tasks Ben Segall
2014-05-16 8:04 ` Peter Zijlstra
2014-05-16 13:57 ` Preeti Murthy
2014-05-16 14:17 ` Peter Zijlstra
2014-05-19 8:13 ` Preeti U Murthy [this message]
2014-05-16 10:20 ` Peter Zijlstra
2014-05-16 16:57 ` bsegall
2014-05-19 13:07 ` [tip:sched/core] sched: Fix " tip-bot for Ben Segall
2014-05-22 12:26 ` tip-bot for Ben Segall
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=5379BD2C.6080106@linux.vnet.ibm.com \
--to=preeti@linux.vnet.ibm.com \
--cc=bsegall@google.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=preeti.lkml@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.