public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Boqun Feng <boqun.feng@gmail.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: mingo@kernel.org, oleg@redhat.com, linux-kernel@vger.kernel.org,
	paulmck@linux.vnet.ibm.com, corbet@lwn.net, mhocko@kernel.org,
	dhowells@redhat.com, torvalds@linux-foundation.org,
	will.deacon@arm.com, waiman.long@hpe.com, pjt@google.com
Subject: Re: [PATCH 4/4] sched: Document Program-Order guarantees
Date: Thu, 3 Dec 2015 21:16:48 +0800	[thread overview]
Message-ID: <20151203131648.GA2460@fixme-laptop> (raw)
In-Reply-To: <20151203124339.665446482@infradead.org>

[-- Attachment #1: Type: text/plain, Size: 1043 bytes --]

On Thu, Dec 03, 2015 at 01:40:14PM +0100, Peter Zijlstra wrote:
[snip]
> + *
> + *   CPU0 (schedule)  CPU1 (try_to_wake_up) CPU2 (schedule)
> + *
> + *   LOCK rq(0)->lock LOCK X->pi_lock
> + *   dequeue X
> + *   sched-out X
> + *   smp_store_release(X->on_cpu, 0);
> + *
> + *                    smp_cond_acquire(!X->on_cpu);
> + *                    X->state = WAKING
> + *                    set_task_cpu(X,2)
> + *
> + *                    LOCK rq(2)->lock
> + *                    enqueue X
> + *                    X->state = RUNNING
> + *                    UNLOCK rq(2)->lock
> + *
> + *                                          LOCK rq(2)->lock // orders against CPU1
> + *                                          sched-out Z
> + *                                          sched-in X
> + *                                          UNLOCK rq(1)->lock
						^^^^^^^^^^^^^^^

This is a typo, right? Should be "UNLOCK rq(2)->lock".

Regards,
Boqun

> + *
> + *                    UNLOCK X->pi_lock
> + *   UNLOCK rq(0)->lock
> + *
> + *

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

  reply	other threads:[~2015-12-03 13:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-03 12:40 [PATCH 0/4] scheduler ordering bits -v2 Peter Zijlstra
2015-12-03 12:40 ` [PATCH 1/4] sched: Better document the try_to_wake_up() barriers Peter Zijlstra
2015-12-03 12:40 ` [PATCH 2/4] sched: Fix a race in try_to_wake_up() vs schedule() Peter Zijlstra
2015-12-03 12:40 ` [PATCH 3/4] locking: Introduce smp_cond_acquire() Peter Zijlstra
2015-12-03 16:37   ` Will Deacon
2015-12-03 20:26     ` Peter Zijlstra
2015-12-03 21:16       ` Peter Zijlstra
2015-12-04 14:57       ` Will Deacon
2015-12-04 20:51       ` Waiman Long
2015-12-04 22:05         ` Linus Torvalds
2015-12-04 22:48           ` Waiman Long
2015-12-04 23:43           ` Peter Zijlstra
2015-12-07 15:18             ` Will Deacon
2015-12-03 19:41   ` Davidlohr Bueso
2015-12-03 20:31     ` Peter Zijlstra
2015-12-03 12:40 ` [PATCH 4/4] sched: Document Program-Order guarantees Peter Zijlstra
2015-12-03 13:16   ` Boqun Feng [this message]
2015-12-03 13:29     ` Peter Zijlstra

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=20151203131648.GA2460@fixme-laptop \
    --to=boqun.feng@gmail.com \
    --cc=corbet@lwn.net \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mhocko@kernel.org \
    --cc=mingo@kernel.org \
    --cc=oleg@redhat.com \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=pjt@google.com \
    --cc=torvalds@linux-foundation.org \
    --cc=waiman.long@hpe.com \
    --cc=will.deacon@arm.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