From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752174AbbJKP1L (ORCPT ); Sun, 11 Oct 2015 11:27:11 -0400 Received: from mail-oi0-f47.google.com ([209.85.218.47]:36395 "EHLO mail-oi0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751332AbbJKP1I (ORCPT ); Sun, 11 Oct 2015 11:27:08 -0400 Date: Sun, 11 Oct 2015 23:26:40 +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: <20151011152640.GC27351@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> <20150924132121.GA1814@fixme-laptop.cn.ibm.com> <20151006160650.GT3604@twins.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tjCHc7DPkfUGtrlw" Content-Disposition: inline In-Reply-To: <20151006160650.GT3604@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 --tjCHc7DPkfUGtrlw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Oct 06, 2015 at 06:06:50PM +0200, Peter Zijlstra wrote: > On Thu, Sep 24, 2015 at 09:21:22PM +0800, Boqun Feng wrote: > > > Included in it are some of the details on this subject, because a wak= eup > > > 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 > >=20 > > Great and very helpful ;-) > >=20 > > > 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? >=20 > Yes. >=20 > > And the waker is not necessarily the same task who set the @cond to > > true, right?=20 >=20 > It should be. >=20 > > 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. >=20 > It was not meant to be used in any other scenario; the 'split' PO really > is part of the whole sleep/wakeup. It does not apply to anything else. Got it. So at this point, I think it's better to remove the entire "Sleep and wake-up functions" section in memory-barriers.txt. Because this order guarantee is not for other users except sleep/wakeup. Any concern, Paul? Regards, Boqun --tjCHc7DPkfUGtrlw Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAABCAAGBQJWGn+tAAoJEEl56MO1B/q4d9UH/381lX1qsXkQlw7RlXgByNcP ME3NPDQ/QeGxzNn6Jayp6MpCectaKCndklhp0LpT7ZTreZwzHwqPszU4aXpEjgqU 24y1bbDGAiwmVwxeg7TLQSb3G/LzWy8CkNbI1bkBnNV1bqLMlTSAow/wvh0tK6tc 1xQp7n480S9dzOcNpbOgYe6dGsgCg6RyjWs+JTjPI3CvjtfQnTHQ8ST4xSAUPRPl S3BRG0vzdDUHFFBFg99sJgMxu2Zy9TX3C8CONun6pllvklJC1d7YQf461D1x6JJz x+BPW9x433iZh71F1tTLYL1oXtdzhs7vk7htjEW+KLKxRNB/6vpz9n/+PSSP+no= =AOYY -----END PGP SIGNATURE----- --tjCHc7DPkfUGtrlw--