linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Anton Blanchard <anton@samba.org>
To: Adhemerval Zanella <azanella@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH] [RFC] powerpc: Add VDSO version of time
Date: Fri, 19 Apr 2013 08:38:35 +1000	[thread overview]
Message-ID: <20130419083835.37f1c180@kryten> (raw)
In-Reply-To: <5148C2B3.6010408@linux.vnet.ibm.com>


Hi Adhemerval,

> This patch implement the time syscall as vDSO. I have a glibc patch
> to use it as IFUNC (as latest gettimeofday patch). Below the perf
> numbers:
> 
> Baseline PPC32: 380 nsec
> Baseline PPC64: 352 nsec
> vdso PPC32:      20 nsec
> vdso PPC64:      20 nsec

Very nice speedup. One small performance improvement:

+1:	ld	r8,CFG_TB_UPDATE_COUNT(r3)
+	ld	r4,STAMP_XTIME+TSPC64_TV_SEC(r3)
+	andi.	r0,r8,1			/* pending update ? loop */
+	bne-	1b

Since you are only reading one long you shouldn't need to check the
update count and loop, you will always see a consistent value. The
system call version of time() just does an unprotected load for example.

> I focused on 64 bit kernel, do I need to provide a scheme for 32 bits
> as well?
> 
> Any tips, advices, comments?

With the above change and with Michael's comments covered (decent
changelog entry and Signed-off-by):

Acked-by: Anton Blanchard <anton@samba.org>

Anton

  parent reply	other threads:[~2013-04-18 22:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-19 19:55 [PATCH] [RFC] powerpc: Add VDSO version of time Adhemerval Zanella
2013-03-20  5:00 ` Benjamin Herrenschmidt
2013-03-21 13:40   ` Adhemerval Zanella
2013-03-26 17:32     ` Adhemerval Zanella
2013-04-04 19:22   ` Adhemerval Zanella
2013-04-05  6:21 ` Michael Ellerman
2013-04-05 18:49   ` Adhemerval Zanella
2013-04-08 14:05   ` Adhemerval Zanella
2013-04-18  5:58     ` Michael Ellerman
2013-04-18 22:38 ` Anton Blanchard [this message]
2013-04-22 19:29   ` Adhemerval Zanella

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=20130419083835.37f1c180@kryten \
    --to=anton@samba.org \
    --cc=azanella@linux.vnet.ibm.com \
    --cc=linuxppc-dev@lists.ozlabs.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).