All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kirill Tkhai <tkhai@yandex.ru>
To: Libo Chen <chenlibo.3@gmail.com>
Cc: linux-kernel@vger.kernel.org,
	Steven Rostedt <rostedt@goodmis.org>,
	Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-rt-users <linux-rt-users@vger.kernel.org>,
	lizefan@huawei.com, jovi.zhangwei@huawei.com
Subject: Re:[PATCH]sched/rt: Do not try to push tasks if pinned task switches to RT
Date: Tue, 29 Jan 2013 13:13:37 +0400	[thread overview]
Message-ID: <446051359450817@web10d.yandex.ru> (raw)



> From: Libo Chen <libo.chen@huawei.com>
> 
> On 2013-1-29 4:23, Kirill Tkhai wrote:
> 
>> Just switched pinned task is not able to be pushed. If the rq had had
>> several RT tasks before they have already been considered as candidates
>> to be pushed (or pulled).
>>
>> Signed-off-by: Kirill V Tkhai <tkhai@yandex.ru>
>> CC: Steven Rostedt <rostedt@goodmis.org>
>> CC: Ingo Molnar <mingo@kernel.org>
>> CC: Peter Zijlstra <peterz@infradead.org>
>> CC: linux-rt-users <linux-rt-users@vger.kernel.org>
>> ---
>> kernel/sched/rt.c | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>> diff --git a/kernel/sched/rt.c b/kernel/sched/rt.c
>> index 4e8f0f4..5f7d92b 100644
>> --- a/kernel/sched/rt.c
>> +++ b/kernel/sched/rt.c
>> @@ -1925,9 +1925,9 @@ static void switched_to_rt(struct rq *rq, struct task_struct *p)
>> */
>> if (p->on_rq && rq->curr != p) {
>> #ifdef CONFIG_SMP
>> - if (rq->rt.overloaded && push_rt_task(rq) &&
>> + if (rq->rt.overloaded && p->nr_cpus_allowed > 1 &&
>> /* Don't resched if we changed runqueues */
>> - rq != task_rq(p))
>> + push_rt_task(rq) && rq != task_rq(p))
> 
> I think you worry about it was excess to call push_rt_task, since the task of p->nr_cpus_allowed=1 can`t be pushed. is that right?

Sure.

> 
> The task of p->nr_cpus_allowed =1 would`t be added to pushable_tasks list (see the enqueue_task_rt())and this push_rt_task() need to push other tasks when rt.overloaded.

If rq has already had 2 or more pushable tasks and we try to add a pinned task then call of push_rt_task will just waste a time.

> 
> So I don`t agree this patch.
> 
>> check_resched = 0;
>> #endif /* CONFIG_SMP */
>> if (check_resched && p->prio < rq->curr->prio)
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html


 -- 

             reply	other threads:[~2013-01-29  9:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-29  9:13 Kirill Tkhai [this message]
2013-01-29 13:19 ` Re:[PATCH]sched/rt: Do not try to push tasks if pinned task switches to RT Steven Rostedt
2013-01-29 13:19   ` Steven Rostedt
  -- strict thread matches above, loose matches on Subject: below --
2013-01-29 14:45 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=446051359450817@web10d.yandex.ru \
    --to=tkhai@yandex.ru \
    --cc=chenlibo.3@gmail.com \
    --cc=jovi.zhangwei@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.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 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.