From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755175AbbIXNVw (ORCPT ); Thu, 24 Sep 2015 09:21:52 -0400 Received: from mail-pa0-f53.google.com ([209.85.220.53]:36399 "EHLO mail-pa0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753867AbbIXNVv (ORCPT ); Thu, 24 Sep 2015 09:21:51 -0400 Date: Thu, 24 Sep 2015 21:21:22 +0800 From: Boqun Feng To: Peter Zijlstra Cc: Oleg Nesterov , "Paul E. McKenney" , linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Jonathan Corbet , Michal Hocko , David Howells , Linus Torvalds , Will Deacon Subject: Re: [PATCH] Documentation: Remove misleading examples of the barriers in wake_*() Message-ID: <20150924132121.GA1814@fixme-laptop.cn.ibm.com> References: <1441674841-11498-1-git-send-email-boqun.feng@gmail.com> <20150909192822.GM4029@linux.vnet.ibm.com> <20150910021612.GC18494@fixme-laptop.cn.ibm.com> <20150910175557.GA20640@redhat.com> <20150917130125.GL3816@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="M9NhX3UHpAaciwkO" Content-Disposition: inline In-Reply-To: <20150917130125.GL3816@twins.programming.kicks-ass.net> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --M9NhX3UHpAaciwkO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Peter, On Thu, Sep 17, 2015 at 03:01:26PM +0200, Peter Zijlstra wrote: > On Thu, Sep 10, 2015 at 07:55:57PM +0200, Oleg Nesterov wrote: > > On 09/10, Boqun Feng wrote: > > > > > > On Wed, Sep 09, 2015 at 12:28:22PM -0700, Paul E. McKenney wrote: > > > > My feeling is > > > > that we should avoid saying too much about the internals of wait_ev= ent() > > > > and wake_up(). > >=20 > > I feel the same. I simply can't understand what we are trying to > > document ;) >=20 > So I've been sitting on this for a while and figured I'd finish it now. >=20 > It are some notes on the scheduler locking and how it provides program > order guarantees on SMP systems. >=20 > Included in it are some of the details on this subject, because a wakeup > has two prior states that are of importance, the tasks own prior state > and the wakeup state, both should be considered in the 'program order' > flow. >=20 Great and very helpful ;-) > So maybe we can reduce the description in memory-barriers to this > 'split' program order guarantee, where a woken task must observe both > its own prior state and its wakee state. ^^^^^ I think you mean "waker" here, right? And the waker is not necessarily the same task who set the @cond to true, right? If so, I feel like it's really hard to *use* this 'split' program order guarantee in other places than sleep/wakeup itself. Could you give an example? Thank you. Regards, Boqun --M9NhX3UHpAaciwkO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJWA/jKAAoJEEl56MO1B/q420oH/0nOVi/thPm9atQLt5Z54FUp LH4bECkI+zMW8JyEEWdEpoxyrptv8J3fIL9amTf0haYkpyu2qgl+2Apz9VX2Ps2P b6Q1rM0KditH5BcsI1vhGPn0Coj+AguiMUq+oLJE/Xt8YUvfRQqYavUhy0Vot3Oy WHqD+YLGZzTzurwtXYVgRsa3hZNER/BEGAlonAmx5vlW9p6go2lZE9IkS4LLih6/ GJfJae8WSDlcK1enXLvPRT4kY4QPx7DAXP7PMawGYz1Q1mXq/ifINSJkGfaQyYnl bPg0mVevJlr8hDWGzYvwu+UnRgCvnRX+XLDJMDyc3TqCEeazqQwdk5SjLTQ4Te4= =abkk -----END PGP SIGNATURE----- --M9NhX3UHpAaciwkO--