From: Hector Perez Tijero <perezh@unican.es>
To: linux-rt-users@vger.kernel.org
Subject: Re: Posix Execution time clock
Date: Fri, 04 Dec 2009 18:23:21 -0800 [thread overview]
Message-ID: <4B19C419.2020204@unican.es> (raw)
In-Reply-To: <20091202190845.GB22051@pengutronix.de>
Hi all,
Just to complete the info. I have repeated a similar test (SMP and
scaling frequency disabled in the BIOS, TSC clock) with another function:
If I measure the attached function with CLOCK_THREAD_CPUTIME_ID, I keep
getting variable timing results. The execution of this function takes
about 400 usecs in my system. Having called it more than 10_000 times,
most of the measures are within 100 usecs from this value. This range
makes sense to me. But I have found a few measures (less than 10 out of
10_000) which are over 1100 usecs, which it's a bit suspicious. Since
this clock just takes the execution time associated to a single thread
(no preemption time should be included) and the function's execution
time could be considered as "constant", it seems that something is going
wrong with this kind of clock.
Any idea?
Thanks
Hector
PS: Ubuntu 2.6.24.-25-rt is based on 2.6.24.7-rt27 patch (link
<http://packages.ubuntu.com/hardy-updates/linux-restricted-modules-2.6.24-25-rt>)
void make_job ()
{
long temp = 0;
int index, index2 = 0;
for (index = 0; index < 5000; index ++) {
temp += index;
if (index%97 == 0) {
for (index2 = 0; index2 < 1000; index2 ++) {
temp +=index;
}
}
}
}
Uwe Kleine-König escribió:
> On Tue, Dec 01, 2009 at 10:32:28AM -0200, Luis Claudio R. Goncalves wrote:
>
>> Along with that, the latest version for 2.6.24, IIRC, was 2.6.24.7-rt27.
>> So, it sounds like you are using older versions of old software.
>>
> The version scheme of Ubuntu doesn't allow to read the used rt patch
> from the kernel version. The Ubuntu version used is 2.6.24-25-rt. This
> only means something like: The 25th Ubuntu revision of the 2.6.24
> kernel in the rt feature set.
>
> Best regards
> Uwe
>
>
--
To unsubscribe from this list: send the line "unsubscribe linux-rt-users" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
prev parent reply other threads:[~2009-12-05 2:23 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-01 12:14 Posix Execution time clock Hector Perez Tijero
2009-12-01 9:53 ` Uwe Kleine-König
2009-12-01 12:32 ` Luis Claudio R. Goncalves
2009-12-02 9:01 ` Hector Perez Tijero
2009-12-02 19:08 ` Uwe Kleine-König
2009-12-05 2:23 ` Hector Perez Tijero [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=4B19C419.2020204@unican.es \
--to=perezh@unican.es \
--cc=linux-rt-users@vger.kernel.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).