mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Dmitry Adamushko" <dmitry.adamushko@gmail.com>
To: "Steven Rostedt" <rostedt@goodmis.org>
Cc: LKML <linux-kernel@vger.kernel.org>,
	RT <linux-rt-users@vger.kernel.org>,
	"Linus Torvalds" <torvalds@linux-foundation.org>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Ingo Molnar" <mingo@elte.hu>,
	"Thomas Gleixner" <tglx@linutronix.de>,
	"Gregory Haskins" <ghaskins@novell.com>,
	"Peter Zijlstra" <a.p.zijlstra@chello.nl>
Subject: Re: [patch 6/8] pull RT tasks
Date: Tue, 23 Oct 2007 00:34:21 +0200	[thread overview]
Message-ID: <b647ffbd0710221534h7c3e7da8g3311c39c10cb341c@mail.gmail.com> (raw)
In-Reply-To: <1193061928.1912.26.camel@localhost.localdomain>

Hi Steven,

agreed with your comments in the previous message. Indeed, I missed some points.

> On wakeup, we can wake up several RT tasks (as my test case does) and if
> we only push one task, then the other tasks may not migrate over to the
> other run queues. I logged this happening in my tests.

I guess, what may happen is that while we are running push_rt_tasks()
on CPU-k (say, as a result on try_to_wake_up(task_1))
and as this_rq->lock may get released (in double_lock_balance()) , we
may get in a 'race'
with try_to_wake_up(task_2) from (another) CPU-m.
It places a woken up task on the same run-queue (for which
push_rt_task() is already running on CPU-k) and, actually, run
push_rt_task() for the same rq again!

So it may happen that both task_1 and task_2 will be pushed from the same CPU...

Do you see an error in my description? (it's a late hour so I can miss
something again ... sure, otherwise I'm almost perfect :-/ ) Can it
correlate with what you have observed in your tests?

Otherwise, there is 1:1 relation : push_rt_task() is called for every
new (single) task activated by try_to_wake_up() and for a preempted
task... so it's not like a few tasks are placed on the run-queue and
then push_rt_tasks() is called once.

btw., if this scenario may take place... maybe it would make sense to
have something like RTLB_INPROGRESS/PENDING and to avoid competing
push_rt_tasks() calls for the same 'rq' from different CPUs?
(although, there can be some disadvantages here as well. e.g. we would
likely need to remove 'max 3 tasks at once' limit and get,
theoretically, unbounded time spent in push_rt_tasks() on a single
CPU).


>
> -- Steve
>

-- 
Best regards,
Dmitry Adamushko

  reply	other threads:[~2007-10-22 22:34 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-19 18:42 [patch 0/8] New RT Task Balancing Steven Rostedt
2007-10-19 18:42 ` [patch 1/8] Add rt_nr_running accounting Steven Rostedt
2007-10-20 16:45   ` Dmitry Adamushko
2007-10-21  2:13     ` Steven Rostedt
2007-10-19 18:42 ` [patch 2/8] track highest prio queued on runqueue Steven Rostedt
2007-10-19 19:19   ` Steven Rostedt
2007-10-19 19:45   ` Gregory Haskins
2007-10-19 19:57     ` Steven Rostedt
2007-10-20 18:14   ` Dmitry Adamushko
2007-10-21  2:19     ` Steven Rostedt
2007-10-19 18:42 ` [patch 3/8] push RT tasks Steven Rostedt
2007-10-19 18:42 ` [patch 4/8] RT overloaded runqueues accounting Steven Rostedt
2007-10-19 18:42 ` [patch 5/8] Move prototypes together Steven Rostedt
2007-10-19 18:43 ` [patch 6/8] pull RT tasks Steven Rostedt
2007-10-19 19:24   ` Peter Zijlstra
2007-10-19 19:35     ` Peter Zijlstra
2007-10-19 19:43       ` Steven Rostedt
2007-10-21  9:35   ` Dmitry Adamushko
2007-10-22 13:55     ` Steven Rostedt
2007-10-21 11:59   ` Dmitry Adamushko
2007-10-22 14:05     ` Steven Rostedt
2007-10-22 22:34       ` Dmitry Adamushko [this message]
2007-10-23  1:16         ` Steven Rostedt
2007-10-19 18:43 ` [patch 7/8] wake up balance RT Steven Rostedt
2007-10-19 18:43 ` [patch 8/8] disable CFS RT load balancing Steven Rostedt

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=b647ffbd0710221534h7c3e7da8g3311c39c10cb341c@mail.gmail.com \
    --to=dmitry.adamushko@gmail.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=akpm@linux-foundation.org \
    --cc=ghaskins@novell.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rt-users@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.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 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®