From: Wilco Dijkstra <Wilco.Dijkstra@arm.com>
To: Adhemerval Zanella <adhemerval.zanella@linaro.org>,
'GNU C Library' <libc-alpha@sourceware.org>,
"rafaeleduardoruviaro.christ@asml.com"
<rafaeleduardoruviaro.christ@asml.com>
Subject: Re: aarch64 lacks HP_TIMING support in glibc
Date: Wed, 23 Jun 2021 15:19:25 +0000 [thread overview]
Message-ID: <VE1PR08MB55990FA5428129C5576D2F8B83089@VE1PR08MB5599.eurprd08.prod.outlook.com> (raw)
In-Reply-To: <f1a3c7bb-20be-4c3e-a638-78da34148d7d@linaro.org>
Hi Adhemerval,
> Is the trap really an issue here? Assuming that we can make it only issued for
> LD_DEBUG=statistics (I need to check if they are used outside it), it will be
> basically the cost of calling clock_gettime on the architecture without the
> support.
I checked and found an old server that traps. The emulation is surprisingly fast -
only a factor of 10 overhead. On several cores using cntvct_el0 is twice as fast
as clock_gettime. This remains true even if trapped (ie. vDSO is disabled).
That means there is no issue with using cntvct_el0 in hp_timing.h since it doesn't
crash and is never slower. So we could just add the header without needing
kernel fixes.
Cheers,
Wilco
next prev parent reply other threads:[~2021-06-23 15:19 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-23 11:43 Wilco Dijkstra
2021-06-23 13:26 ` Adhemerval Zanella
2021-06-23 15:19 ` Wilco Dijkstra [this message]
2021-06-28 15:49 ` Rafael Eduardo Ruviaro Christ
2021-06-28 19:25 ` Wilco Dijkstra
2021-06-30 13:27 ` Rafael Eduardo Ruviaro Christ
2021-07-02 13:13 ` Wilco Dijkstra
2021-07-02 13:53 ` Adhemerval Zanella
-- strict thread matches above, loose matches on Subject: below --
2021-06-22 18:29 Rafael Eduardo Ruviaro Christ
2021-06-22 18:38 ` Andrew Pinski
2021-06-22 18:57 ` Adhemerval Zanella
2021-06-22 19:27 ` Andreas Schwab
2021-06-22 19:53 ` Adhemerval Zanella
2021-06-22 20:18 ` Andreas Schwab
2021-06-22 20:22 ` 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=VE1PR08MB55990FA5428129C5576D2F8B83089@VE1PR08MB5599.eurprd08.prod.outlook.com \
--to=wilco.dijkstra@arm.com \
--cc=adhemerval.zanella@linaro.org \
--cc=libc-alpha@sourceware.org \
--cc=rafaeleduardoruviaro.christ@asml.com \
/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 read-only IMAP folder(s) and NNTP newsgroup(s).