mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Hillf Danton <dhillf@gmail.com>
Cc: Yong Zhang <yong.zhang0@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Mike Galbraith <efault@gmx.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@elte.hu>
Subject: Re: [PATCH] sched: remove resetting exec_start in put_prev_task_rt()
Date: Fri, 10 Jun 2011 10:58:37 -0400	[thread overview]
Message-ID: <1307717917.9218.45.camel@gandalf.stny.rr.com> (raw)
In-Reply-To: <BANLkTing2boYvDQqcxaqveYhbG2H1Zyvrw@mail.gmail.com>

On Fri, 2011-06-10 at 22:48 +0800, Hillf Danton wrote:
> On Thu, Jun 9, 2011 at 8:34 PM, Steven Rostedt <rostedt@goodmis.org> wrote:

> Resetting exec_start to zero has no negative functionality in RT scheduling,
> as shown by Yong.
> 
> After put_prev_task() is called in schedule(),
> 
> 	put_prev_task(rq, prev);
> 	next = pick_next_task(rq);
> 	clear_tsk_need_resched(prev);
> 
> next is picked. Lets assume that next is not prev, and prev is still on RQ,
> then prev's sched_class is changed to CFS while it is waiting on RQ.
> After sched_class switch, prev is under CFS charge, and the exec_start field
> could be taken into other games.
> 
> In task_hot(), called when migrating task, zeroed exec_start is trapped as
> the following.
> 

How could any of that happen? This is all done under the rq->lock.
prev's sched class can not change at this time. Everything you stated is
protected by the rq->lock. I don't see any race conditions here.

-- Steve



  reply	other threads:[~2011-06-10 14:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-01 14:03 Hillf Danton
2011-06-01 14:22 ` Steven Rostedt
2011-06-02  8:04 ` Yong Zhang
2011-06-04  4:26   ` Hillf Danton
2011-06-09 12:34   ` Steven Rostedt
2011-06-10  2:38     ` Yong Zhang
2011-06-10  2:41       ` Steven Rostedt
2011-06-10 10:19         ` Peter Zijlstra
2011-06-10 14:48     ` Hillf Danton
2011-06-10 14:58       ` Steven Rostedt [this message]
2011-06-10 15:12         ` Hillf Danton
2011-08-14 16:03 ` [tip:sched/core] sched: Remove " tip-bot for Hillf Danton

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=1307717917.9218.45.camel@gandalf.stny.rr.com \
    --to=rostedt@goodmis.org \
    --cc=dhillf@gmail.com \
    --cc=efault@gmx.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=yong.zhang0@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®