From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754073AbbHaSgO (ORCPT ); Mon, 31 Aug 2015 14:36:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:38406 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753818AbbHaSgM (ORCPT ); Mon, 31 Aug 2015 14:36:12 -0400 Date: Mon, 31 Aug 2015 20:33:35 +0200 From: Oleg Nesterov To: Boqun Feng Cc: Michal Hocko , Peter Zijlstra , LKML , David Howells , Linus Torvalds , "Paul E. McKenney" , Jonathan Corbet Subject: Re: wake_up_process implied memory barrier clarification Message-ID: <20150831183335.GA26333@redhat.com> References: <20150827122727.GC27052@dhcp22.suse.cz> <20150827124334.GY16853@twins.programming.kicks-ass.net> <20150827131444.GE27052@dhcp22.suse.cz> <20150827182654.GA12191@redhat.com> <20150828145121.GG5301@dhcp22.suse.cz> <20150828160637.GA4393@redhat.com> <20150829092514.GA3240@fixme-laptop.cn.ibm.com> <20150829142707.GA19263@redhat.com> <20150831003719.GC924@fixme-laptop.cn.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150831003719.GC924@fixme-laptop.cn.ibm.com> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/31, Boqun Feng wrote: > > Fair enough, I went too far. How about just a single paragraph saying > that: > > The wake_up(), wait_event() and their friends have proper barriers in > them, but these implicity barriers are only for the correctness for > sleep and wakeup. So don't rely on these barriers for things that are > neither wait-conditons nor task states. > > Is that OK to you? Ask Paul ;) but personally I agree. To me, the only thing a user should know about wake_up/try_to_wake_up and barriers is that you do not need another barrier between setting condition and waking up. Oleg.