Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965072AbbLRTiN (ORCPT ); Fri, 18 Dec 2015 14:38:13 -0500 Received: from mail.efficios.com ([78.47.125.74]:49326 "EHLO mail.efficios.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933011AbbLRThe (ORCPT ); Fri, 18 Dec 2015 14:37:34 -0500 Date: Fri, 18 Dec 2015 19:37:32 +0000 (UTC) From: Mathieu Desnoyers To: Davidlohr Bueso Cc: Michael Kerrisk , linux-kernel@vger.kernel.org, "Paul E. McKenney" , Josh Triplett , KOSAKI Motohiro , rostedt , Nicholas Miell , Ingo Molnar , One Thousand Gnomes , Lai Jiangshan , Stephen Hemminger , Thomas Gleixner , Peter Zijlstra , David Howells , Pranith Kumar , Shuah Khan , Andrew Morton , Linus Torvalds , linux-api Message-ID: <1370012029.264035.1450467452427.JavaMail.zimbra@efficios.com> In-Reply-To: <20151218184035.GF17386@linux-uzut.site> References: <1450012663-16173-1-git-send-email-mathieu.desnoyers@efficios.com> <20151218184035.GF17386@linux-uzut.site> Subject: Re: [RFC PATCH man-pages] Add membarrier system call man page MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Originating-IP: [78.47.125.74] X-Mailer: Zimbra 8.6.0_GA_1178 (ZimbraWebClient - FF42 (Linux)/8.6.0_GA_1178) Thread-Topic: Add membarrier system call man page Thread-Index: EEjs+KLW86znQPXvBFhsqeLXX7uPiA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1826 Lines: 49 ----- On Dec 18, 2015, at 1:40 PM, Davidlohr Bueso dave@stgolabs.net wrote: > On Sun, 13 Dec 2015, Mathieu Desnoyers wrote: >>+.SH RETURN VALUE >>+On success, this system call returns zero. On error, \-1 is returned, >>+and > > For the zero return, would it make sense to specify that it is also the case > for MEMBARRIER_CMD_SHARED under UP? Its pretty obvious it should be a no-op, > but wouldn't hurt to make it explicit. My understanding is that man pages should not document the internal behavior of the system call. What matters here from a user-space perspective, independently of UP vs SMP, is that membarrier with MEMBARRIER_CMD_SHARED command either succeeds (0) or fails (e.g. -1, with ENOSYS or EINVAL errno). By the way, the updated man page text now has this for MEMBARRIER_CMD_SHARED description: " MEMBARRIER_CMD_SHARED Ensure that all threads from all processes on the system pass through a state where all memory accesses to user-space addresses match program order between entry to and return from the membarrier() system call. All threads on the system are targeted by this command." The text above is true both on UP and SMP. I fear that calling out details about UP vs SMP in the man page might confuse users, leading them to think they need to do special handling of UP, even though this is something about which they really should not have to worry. Thanks, Mathieu > > Thanks, > Davidlohr -- Mathieu Desnoyers EfficiOS Inc. http://www.efficios.com -- 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/