From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751961AbcGUKYB (ORCPT ); Thu, 21 Jul 2016 06:24:01 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:33497 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751346AbcGUKX7 (ORCPT ); Thu, 21 Jul 2016 06:23:59 -0400 Date: Thu, 21 Jul 2016 12:23:56 +0200 From: Sebastian Andrzej Siewior To: Davidlohr Bueso Cc: linux-kernel@vger.kernel.org, Peter Zijlstra , tglx@linutronix.de, Manfred Spraul , Andrew Morton Subject: Re: [PATCH v4] ipc/msg: Implement lockless pipelined wakeups Message-ID: <20160721102356.GB6323@linutronix.de> References: <1469029517-18577-1-git-send-email-bigeasy@linutronix.de> <20160721001612.GA3066@linux-80c1.suse> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160721001612.GA3066@linux-80c1.suse> X-Key-Id: 2A8CF5D1 X-Key-Fingerprint: 6425 4695 FFF0 AA44 66CC 19E6 7B96 E816 2A8C F5D1 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 * Davidlohr Bueso | 2016-07-20 17:16:12 [-0700]: >Just as with expunge_all and the E2BIG case, could you remove that explicit >barrier (B) and just rely on wake_q_add? Just did. So we have just a smp_rmb() on the reader side and the comment talks about smb_wmb() and at the spot where we should have the smb_wmb we have a comment why we don't have one :) For my understanding: we need that smp_rmb() to ensure that everything past that cmpxchg() is visible on all other CPUs so we don't have the wakeup before we r_msg reads != -EAGAIN, right? >Thanks, >Davidlohr Sebastian