From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/9184 Path: news.gmane.org!not-for-mail From: Hauke Mehrtens Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] mips: add vdso support Date: Sun, 24 Jan 2016 00:39:24 +0100 Message-ID: <56A40F2C.3040507@hauke-m.de> References: <1453581118-9569-1-git-send-email-hauke@hauke-m.de> <20160123232933.GZ238@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1453592385 28254 80.91.229.3 (23 Jan 2016 23:39:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 23 Jan 2016 23:39:45 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-9197-gllmg-musl=m.gmane.org@lists.openwall.com Sun Jan 24 00:39:40 2016 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1aN7mN-0006mn-Hz for gllmg-musl@m.gmane.org; Sun, 24 Jan 2016 00:39:39 +0100 Original-Received: (qmail 3260 invoked by uid 550); 23 Jan 2016 23:39:37 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 3242 invoked from network); 23 Jan 2016 23:39:37 -0000 X-Enigmail-Draft-Status: N1110 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0 In-Reply-To: <20160123232933.GZ238@brightrain.aerifal.cx> X-Spam-Status: No, score=-1.0 required=7.0 tests=ALL_TRUSTED,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on hauke-m.de Xref: news.gmane.org gmane.linux.lib.musl.general:9184 Archived-At: On 01/24/2016 12:29 AM, Rich Felker wrote: > On Sat, Jan 23, 2016 at 09:31:58PM +0100, Hauke Mehrtens wrote: >> vdso support is available on mips starting with kernel 4.4, see kernel >> commit a7f4df4e21 "MIPS: VDSO: Add implementations of gettimeofday() >> and clock_gettime()" for details. >> >> Signed-off-by: Hauke Mehrtens >> --- >> arch/mips/syscall_arch.h | 4 ++++ >> 1 file changed, 4 insertions(+) >> >> diff --git a/arch/mips/syscall_arch.h b/arch/mips/syscall_arch.h >> index e74e0ad..39c0ea3 100644 >> --- a/arch/mips/syscall_arch.h >> +++ b/arch/mips/syscall_arch.h >> @@ -161,3 +161,7 @@ static inline long __syscall6(long n, long a, long b, long c, long d, long e, lo >> if (n == SYS_fstatat) __stat_fix(c); >> return r2; >> } >> + >> +#define VDSO_USEFUL >> +#define VDSO_CGT_SYM "__vdso_clock_gettime" >> +#define VDSO_CGT_VER "LINUX_2.6" >> -- >> 2.7.0.rc3 > > Nice! Have you tested it on some real hardware with vdso support to > confirm that it's working properly? > > Rich > Hi Rich, yes I tested this on Lantiq VRX200 (MIPS 34Kc V5.6) hardware. I called clock_gettime(CLOCK_MONOTONIC, &tp) 1.000.000 times and it was about 60% faster with this patch. without vdso: root@OpenWrt:/# time ./vdso-test real 0m 0.95s user 0m 0.24s sys 0m 0.70s with vdso: root@OpenWrt:/# time /usr/bin/vdso-test real 0m 0.35s user 0m 0.34s sys 0m 0.00s Hauke