mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andreas Mohr <andi@lisas.de>
To: Kirill Tkhai <tkhai@yandex.ru>
Cc: Andreas Mohr <andi@lisas.de>,
	linux-kernel@vger.kernel.org, peterz@infradead.org,
	mingo@redhat.com
Subject: Re: [PATCH] sched: Transform resched_task() into resched_curr()
Date: Sun, 29 Jun 2014 12:54:57 +0200	[thread overview]
Message-ID: <20140629105457.GA5413@rhlx01.hs-esslingen.de> (raw)
In-Reply-To: <53AFD57D.4090008@yandex.ru>

On Sun, Jun 29, 2014 at 12:59:41PM +0400, Kirill Tkhai wrote:
> On 29.06.2014 12:36, Andreas Mohr wrote:
> > I just noticed that there is a part touching rq->idle,
> > and ISTR that idle task handling is "special"
> > (after all that's the power management side of things).
> > Specifically, rq->curr and rq->idle are distinct rq members
> > (since they are distinct tasks AFAIK!),
> > so there might now be some issues with task state tracking here
> > (unless this cleanup happens to unify handling here anyway).
> 
> Are you worrying about check_preempt_curr_idle()? I've looked
> at check_preempt_curr() and found, we never call this function
> in current scheduler logic.

Yeah - I should have included that hunk verbatim, sorry.


> It's called only if just enqueued task is of the same class as
> rq's current, but we can't have two idle class tasks enqueued
> on the same rq. So, it's just a stub. We can do not worry
> about this.

That seems to be the case indeed in current implementation.

Removing specific references from these sched_class parts
(here: idle_task.c, rq->idle) where possible seems to be a good direction,
since AFAIUI sched_class things are supposed to encode *behaviour*,
where containing too many specific-member references is best avoided.



I'd fathom that for the sched_curr() handler
I'm still somewhat in favour of an extra non-inline wrapper though;
it's just good minimal-dependency implementation.
But more frequent topic partners might have more valuable input
on this patch :)

Thanks,

Andreas

  reply	other threads:[~2014-06-29 10:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-29  7:20 Andreas Mohr
2014-06-29  7:57 ` Kirill Tkhai
2014-06-29  8:36   ` Andreas Mohr
2014-06-29  8:59     ` Kirill Tkhai
2014-06-29 10:54       ` Andreas Mohr [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-06-28 20:03 Kirill Tkhai

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=20140629105457.GA5413@rhlx01.hs-esslingen.de \
    --to=andi@lisas.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=tkhai@yandex.ru \
    /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®