public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: Michael Kerrisk <mtk.manpages@gmail.com>,
	linux-kernel@vger.kernel.org,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	Josh Triplett <josh@joshtriplett.org>,
	KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>,
	rostedt <rostedt@goodmis.org>,
	Nicholas Miell <nmiell@comcast.net>,
	Ingo Molnar <mingo@redhat.com>,
	One Thousand Gnomes <gnomes@lxorguk.ukuu.org.uk>,
	Lai Jiangshan <laijs@cn.fujitsu.com>,
	Stephen Hemminger <stephen@networkplumber.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	David Howells <dhowells@redhat.com>,
	Pranith Kumar <bobby.prani@gmail.com>,
	Shuah Khan <shuahkh@osg.samsung.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	linux-api <linux-api@vger.kernel.org>
Subject: Re: [RFC PATCH man-pages] Add membarrier system call man page
Date: Fri, 18 Dec 2015 19:37:32 +0000 (UTC)	[thread overview]
Message-ID: <1370012029.264035.1450467452427.JavaMail.zimbra@efficios.com> (raw)
In-Reply-To: <20151218184035.GF17386@linux-uzut.site>

----- 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

      reply	other threads:[~2015-12-18 19:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-13 13:17 [RFC PATCH man-pages] Add membarrier system call man page Mathieu Desnoyers
2015-12-15 16:14 ` Michael Kerrisk (man-pages)
2015-12-18 18:40 ` Davidlohr Bueso
2015-12-18 19:37   ` Mathieu Desnoyers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1370012029.264035.1450467452427.JavaMail.zimbra@efficios.com \
    --to=mathieu.desnoyers@efficios.com \
    --cc=akpm@linux-foundation.org \
    --cc=bobby.prani@gmail.com \
    --cc=dave@stgolabs.net \
    --cc=dhowells@redhat.com \
    --cc=gnomes@lxorguk.ukuu.org.uk \
    --cc=josh@joshtriplett.org \
    --cc=kosaki.motohiro@jp.fujitsu.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mtk.manpages@gmail.com \
    --cc=nmiell@comcast.net \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=shuahkh@osg.samsung.com \
    --cc=stephen@networkplumber.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox