linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: Juri Lelli <juri.lelli@arm.com>
Cc: peterz@infradead.org, linux-kernel@vger.kernel.org,
	mingo@redhat.com, luca.abeni@unitn.it, xpang@redhat.com
Subject: Re: [PATCH v5] sched/deadline: remove useless param from setup_new_dl_entity
Date: Fri, 5 Aug 2016 10:54:08 -0400	[thread overview]
Message-ID: <20160805105408.3780d599@gandalf.local.home> (raw)
In-Reply-To: <20160805143444.GH28125@e106622-lin>

On Fri, 5 Aug 2016 15:34:44 +0100
Juri Lelli <juri.lelli@arm.com> wrote:

> On 05/08/16 09:56, Steven Rostedt wrote:
> > On Fri,  5 Aug 2016 11:09:59 +0100
> > Juri Lelli <juri.lelli@arm.com> wrote:
> >   
> > > @@ -1720,19 +1720,28 @@ static void switched_from_dl(struct rq *rq, struct task_struct *p)
> > >   */
> > >  static void switched_to_dl(struct rq *rq, struct task_struct *p)
> > >  {
> > > -	if (dl_time_before(p->dl.deadline, rq_clock(rq)))
> > > -		setup_new_dl_entity(&p->dl, &p->dl);
> > >  
> > > -	if (task_on_rq_queued(p) && rq->curr != p) {
> > > +	if (task_on_rq_queued(p)) {  
> > 
> > I always hated functions totally encapsulated by an if statement. This
> > can be a bit simpler (and less indented) if you have:
> > 
> > 	/* If p is not queued, its parameters will be updated at wakeup */
> > 	if (!task_on_rq_queued(p))
> > 		return;
> > 
> > 	[...]
> >   
> 
> You mean like what follows?
> 
> I'll post a v6 if OK.
> 

Yes! I think that looks much nicer, and easier to read.

You can add my Reviewed-by tag too.

Thanks!

-- Steve

  reply	other threads:[~2016-08-05 14:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-05 10:09 [PATCH v5] sched/deadline: remove useless param from setup_new_dl_entity Juri Lelli
2016-08-05 12:41 ` Xunlei Pang
2016-08-05 13:56 ` Steven Rostedt
2016-08-05 14:34   ` Juri Lelli
2016-08-05 14:54     ` Steven Rostedt [this message]
2016-08-05 15:02       ` Juri Lelli

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=20160805105408.3780d599@gandalf.local.home \
    --to=rostedt@goodmis.org \
    --cc=juri.lelli@arm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luca.abeni@unitn.it \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=xpang@redhat.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;
as well as URLs for NNTP newsgroup(s).