Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030519AbbKDSLt (ORCPT ); Wed, 4 Nov 2015 13:11:49 -0500 Received: from mx2.suse.de ([195.135.220.15]:45807 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756158AbbKDSLs (ORCPT ); Wed, 4 Nov 2015 13:11:48 -0500 Date: Wed, 4 Nov 2015 10:11:40 -0800 From: Davidlohr Bueso To: Sebastian Andrzej Siewior Cc: linux-kernel@vger.kernel.org, George Spelvin , Thomas Gleixner , Peter Zijlstra , Manfred Spraul , Andrew Morton Subject: Re: [PATCH v2] ipc/msg: Implement lockless pipelined wakeups Message-ID: <20151104181140.GB15994@linux-uzut.site> References: <1446563009-9076-1-git-send-email-bigeasy@linutronix.de> <20151103173021.GE1707@linux-uzut.site> <56391547.2040105@linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <56391547.2040105@linutronix.de> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 829 Lines: 21 On Tue, 03 Nov 2015, Sebastian Andrzej Siewior wrote: >In pipelined_receive() (mqueue) there is the wake_q_add() with the >implicit cmpxchg barrier. The matching barrier pairing should be in >wq_sleep() but there is none. Why is it okay to have none there and I >need one here? So the pairing in mqueue is done in wq_sleep() as we unlock info->lock, so there's an implied barrier there. Also, considering Peter's suggestion to wrap around READ/WRITE_ONCE for sysv queues (specially since you got rid of the volatile tag), it seems we also need them for mqueues. Thanks, Davidlohr -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/