linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oleg Nesterov <oleg@redhat.com>
To: Kirill Tkhai <ktkhai@parallels.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Kirill Tkhai <tkhai@yandex.ru>,
	linux-kernel@vger.kernel.org, nicolas.pitre@linaro.org,
	pjt@google.com, rostedt@goodmis.org, umgwanakikbuti@gmail.com,
	tim.c.chen@linux.intel.com, mingo@kernel.org
Subject: Re: [PATCH v2 2/5] sched: Teach scheduler to understand ONRQ_MIGRATING state
Date: Tue, 29 Jul 2014 18:19:28 +0200	[thread overview]
Message-ID: <20140729161928.GA31298@redhat.com> (raw)
In-Reply-To: <1406627582.3600.9.camel@tkhai>

On 07/29, Kirill Tkhai wrote:
>
> How about this? Everything is inside task_rq_lock() now. The patch
> became much less.

And with this change task_migrating() is not possible under
task_rq_lock() or __task_rq_lock(). This means that 1/5 can be simplified
too.

__migrate_swap_task() is probably the notable exception...

Off-topic, but it takes 2 ->pi_lock's. This means it can deadlock with
try_to_wake_up_local() (if a 3rd process does ttwu() and waits for
->on_cpu == 0). But I guess __migrate_swap_task() should not play with
PF_WQ_WORKER threads.

Oleg.


  parent reply	other threads:[~2014-07-29 16:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-26 14:58 [PATCH v2 0/5] sched: Add on_rq states and remove several double rq locks Kirill Tkhai
2014-07-26 14:59 ` [PATCH v2 1/5] sched: Wrapper for checking task_struct's .on_rq Kirill Tkhai
2014-07-26 14:59 ` [PATCH v2 2/5] sched: Teach scheduler to understand ONRQ_MIGRATING state Kirill Tkhai
2014-07-28  8:01   ` Peter Zijlstra
2014-07-28  9:05     ` Kirill Tkhai
2014-07-29  9:53       ` Kirill Tkhai
2014-07-29 12:38         ` Peter Zijlstra
2014-07-29 16:19         ` Oleg Nesterov [this message]
2014-07-30  8:04           ` Kirill Tkhai
2014-07-30 14:41             ` Oleg Nesterov
2014-07-30 21:25               ` Kirill Tkhai
2014-07-26 14:59 ` [PATCH v2 3/5] sched: Remove double_rq_lock() from __migrate_task() Kirill Tkhai
2014-07-26 14:59 ` [PATCH v2 4/5] sched/fair: Remove double_lock_balance() from active_load_balance_cpu_stop() Kirill Tkhai
2014-07-26 14:59 ` [PATCH v2 5/5] sched/fair: Remove double_lock_balance() from load_balance() Kirill Tkhai
2014-07-29 12:57   ` Peter Zijlstra
2014-07-26 19:39 ` [PATCH v2 0/5] sched: Add on_rq states and remove several double rq locks Oleg Nesterov
2014-07-27 21:26   ` Kirill Tkhai
2014-07-28 13:19     ` Oleg Nesterov

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=20140729161928.GA31298@redhat.com \
    --to=oleg@redhat.com \
    --cc=ktkhai@parallels.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=nicolas.pitre@linaro.org \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    --cc=rostedt@goodmis.org \
    --cc=tim.c.chen@linux.intel.com \
    --cc=tkhai@yandex.ru \
    --cc=umgwanakikbuti@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;
as well as URLs for NNTP newsgroup(s).