linux-man.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rodrigo Campos <rodrigo-aOqSs0FX/Gu4Tu3zPC53fQ@public.gmane.org>
To: Christoph Lameter <cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org>
Cc: "Michael Kerrisk (man-pages)"
	<mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	linux-man <linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Peter Zijlstra <peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	Peter Zijlstra
	<a.p.zijlstra-/NLkJaSkS4VmR6Xm/wNWPw@public.gmane.org>
Subject: Re: [PATCH] clock_getres.2: Remove obsolete note on SMP systems
Date: Thu, 5 Sep 2013 09:10:18 +0100	[thread overview]
Message-ID: <20130905081018.GA25617@sdfg.com.ar> (raw)
In-Reply-To: <00000140e9df10cd-71ca0078-fe11-4a8d-b588-93c2dfff098f-000000-p/GC64/jrecnJqMo6gzdpkEOCMrvLtNR@public.gmane.org>

On Wed, Sep 04, 2013 at 04:47:25PM +0000, Christoph Lameter wrote:
> On Wed, 4 Sep 2013, Rodrigo Campos wrote:
> 
> > On Wed, Sep 04, 2013 at 04:01:27PM +0000, Christoph Lameter wrote:
> > > On Wed, 4 Sep 2013, Michael Kerrisk (man-pages) wrote:
> > >
> > > > > I don't know. But looking at the git repo, it seems in the first git commit
> > > > > (1da177e4c3f41524e886b7f1b8a0c1fc7321cac2) it was already safe,
> > >
> > > What do you mean by "safe"? Note that the manpage was written mainly based
> >
> > That you don't get bogus results on SMP systems. Now, it I think the note is
> > obsolete (Peter confirmed that in fact it is), but we want to know when the note
> > become obsolete.
> 
> Well as soon as you have a kernel implementation of these clocks the issue
> should be moot.

Ohh, so my "theory" was right. Thanks a lot for the insight :-)

So, Michael, IIUC what Christoph says, the note on SMP systems was relevant when
glibc provide simple wrappers (like to retrieve TSC/ITC register contents) and
didn't use the kernel support for it (or kernel support was not there). 

Checking the glibc repo, I *think* the commit that starts using the kernel for
these clocks might be this one: 2f4f3bd4a9ad805383b278e5b975971ca15c7a77
("Handle CLOCK_PROCESS_CPUTIME_ID and CLOCK_PROCESS_THREAD_ID specially,
translating to the kernel clockid_t for our own process/thread clock.")

That commit, doing a simple:
	git tag --contains 2f4f3bd | sort -V

seems to be included in glibc-2.4 for the first time, released on 6/Mar/2006.
But, of course, I'm not sure this is the right commit :-)

If that is the case, should we change the note to say since which glibc (do we
care about any other libc?) and kernel version these are safe on SMP and keep
the note for people using olders version ?

Also, I didn't check if kernel support was backported to Linux 2.4...





Thanks a lot,
Rodrigo
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2013-09-05  8:10 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-03 10:05 clock_getres.2: Remove obsolete note on SMP systems Rodrigo Campos
     [not found] ` <1378202731-29738-1-git-send-email-rodrigo-aOqSs0FX/Gu4Tu3zPC53fQ@public.gmane.org>
2013-09-03 10:05   ` [PATCH] " Rodrigo Campos
     [not found]     ` <1378202731-29738-2-git-send-email-rodrigo-aOqSs0FX/Gu4Tu3zPC53fQ@public.gmane.org>
2013-09-04 12:32       ` Michael Kerrisk (man-pages)
     [not found]         ` <CAKgNAkj_SumnwDQ=rxSBubybzOSTS9u0RjDBSR-1=KrTK7=L_A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-04 13:32           ` Rodrigo Campos
     [not found]             ` <20130904133217.GC12620-aOqSs0FX/Gu4Tu3zPC53fQ@public.gmane.org>
2013-09-04 15:01               ` Michael Kerrisk (man-pages)
     [not found]                 ` <CAKgNAkjwVc3HLOL0n5upE5rOgqCN3TYGacrWMOzJ=uyv1mbHUg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-04 15:11                   ` Rodrigo Campos
2013-09-04 16:01                   ` Christoph Lameter
     [not found]                     ` <00000140e9b4ede6-8b9dfd6f-7ca2-4d35-9454-389f6453031a-000000-p/GC64/jrecnJqMo6gzdpkEOCMrvLtNR@public.gmane.org>
2013-09-04 16:08                       ` Rodrigo Campos
     [not found]                         ` <20130904160815.GA15601-aOqSs0FX/Gu4Tu3zPC53fQ@public.gmane.org>
2013-09-04 16:47                           ` Christoph Lameter
     [not found]                             ` <00000140e9df10cd-71ca0078-fe11-4a8d-b588-93c2dfff098f-000000-p/GC64/jrecnJqMo6gzdpkEOCMrvLtNR@public.gmane.org>
2013-09-05  8:10                               ` Rodrigo Campos [this message]
     [not found]                                 ` <20130905081018.GA25617-aOqSs0FX/Gu4Tu3zPC53fQ@public.gmane.org>
2013-09-05 11:03                                   ` Michael Kerrisk (man-pages)
     [not found]                                     ` <CAKgNAki9BLKHmwJfJ6mhLtNjHf7cVEdE3bhpWXEKnhTCRt+FpA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-05 11:41                                       ` Rodrigo Campos
     [not found]                                         ` <20130905114136.GB27528-aOqSs0FX/Gu4Tu3zPC53fQ@public.gmane.org>
2013-09-06  4:11                                           ` Michael Kerrisk (man-pages)
     [not found]                                             ` <CAKgNAkiVoZXntTnmPXhEywLvAo08cZJNVWdvBSpCjEFN2tbWSw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2013-09-06  7:55                                               ` Rodrigo Campos
2013-09-05 14:22                                   ` Christoph Lameter
     [not found]                                     ` <00000140ee806e2a-6ac74d68-f5d8-4330-ab1c-fd8dd3a8ada3-000000-p/GC64/jrecnJqMo6gzdpkEOCMrvLtNR@public.gmane.org>
2013-09-06  7:47                                       ` Rodrigo Campos
2013-09-05 10:51                       ` Michael Kerrisk (man-pages)
2013-09-09 11:07           ` Peter Zijlstra

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=20130905081018.GA25617@sdfg.com.ar \
    --to=rodrigo-aoqss0fx/gu4tu3zpc53fq@public.gmane.org \
    --cc=a.p.zijlstra-/NLkJaSkS4VmR6Xm/wNWPw@public.gmane.org \
    --cc=cl-vYTEC60ixJUAvxtiuMwx3w@public.gmane.org \
    --cc=linux-man-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mtk.manpages-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=peterz-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.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;
as well as URLs for NNTP newsgroup(s).