public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Olivier Langlois <olivier@trillion01.com>
To: KOSAKI Motohiro <kosaki.motohiro@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	schwidefsky@de.ibm.com, Steven Rostedt <rostedt@goodmis.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] process cputimer is moving faster than its corresponding clock
Date: Sat, 27 Apr 2013 01:02:23 -0400	[thread overview]
Message-ID: <1367038943.12779.10.camel@Wailaba2> (raw)
In-Reply-To: <CAHGf_=q5W1brnzmsK0bN9s07RXsRUyRoYKN347kySQs_3g2_Lg@mail.gmail.com>

On Fri, 2013-04-26 at 22:15 -0400, KOSAKI Motohiro wrote:
> On Fri, Apr 26, 2013 at 9:51 PM, Olivier Langlois
> <olivier@trillion01.com> wrote:
> > On Fri, 2013-04-26 at 15:08 -0400, KOSAKI Motohiro wrote:
> >> > I need to add that I can only confirm that to be true with
> >> > sum_exec_runtime.
> >> >
> >> > To affirm it to be true for stime and utime would require more
> >> > investigation. I didn't look them at all. I was only concerned with
> >> > sum_exec_runtime.
> >> >
> >> > I will prepare a v2 of the patch accounting all the feedbacks that I
> >> > received from KOSAKI Motohiro, Frederic Weisbecker and Peter Zijlstra
> >> > and send it back here for further discussion.
> >> >
> >> > Thank you very much all!
> >>
> >> Do you mean your utime test case still failure? If you share your test-case,
> >> I'm going to look at your issue too.
> >>
> > Sure with pleasure. My testcase is glibc-2.17/rt/tst-cputimer1.c
> >
> > That being said, it strictly test CPUCLOCK_SCHED timers. Hence my focus
> > when modifying the code was strictly on sum_exec_runtime.
> >
> > If utime and stime components of cputimer are moving faster than their
> > associated clock, this is something that I did not address.
> 
> Hmm... Sorry. I'm confused. 1) I haven't seen any glibc test failure
> after applying
> my patch. 2) tst-cputimer1.c only have CLOCK_PROCESS_CPUTIME_ID test and
> don't have any utime, stime tests.
> 
> Please let me know if you've seen any failure after applying my patch.

Basically it is to exclude deltas away from the cputimer initialization
value.

Yes I still have the failure. My patch can be broken into 3 elements.

1. fair.c - cputimer slow down
2. Add deltas to cputimer sample
3. Address race condition

If any of these 3 elements are missing, you get the failure.

That being said, it is not a systematic failure. It is intermittent. I
am wrapping the execution of the unittest into a simple perl script:

#!/usr/bin/perl

use strict;
use warnings;

my $i = 0;

while (system("./tst-cputimer1") == 0) { ++$i; }

print "run $i successful iteration\n";

----------------------------------------

I get the failure after 10-300 iterations depending how I am
lucky/unlucky.

Also other factors to consider it is are you doing the test on a very
loaded system? What is your platform?

I have tested it positively on 32 bit, 64 bits build on Atom N450

i7 first and second generation system.

I did vary HZ from 300 to 1000 HZ, I tried the 3 three different
preemption models.

With all these combinations, I still have the problem.

Basically the timer error is usually < 500 uS so depending when the
process is called as a response to the timer event and this depends on
scheduler decisions, your failure rate will vary depending on the system
load IMO.




  reply	other threads:[~2013-04-27  5:02 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-05 17:59 [PATCH] process cputimer is moving faster than its corresponding clock Olivier Langlois
2013-04-10 11:35 ` Peter Zijlstra
2013-04-10 15:48   ` Olivier Langlois
2013-04-12  9:16     ` Peter Zijlstra
2013-04-15  1:55       ` Olivier Langlois
2013-04-12  9:18     ` Peter Zijlstra
2013-04-12 10:50     ` Peter Zijlstra
2013-04-12 15:55       ` Peter Zijlstra
2013-04-15  6:11         ` Olivier Langlois
2013-04-19 13:03         ` Frederic Weisbecker
2013-04-19 17:38           ` KOSAKI Motohiro
2013-04-19 18:08             ` KOSAKI Motohiro
2013-04-26  4:40               ` Olivier Langlois
2013-04-26  6:27                 ` Olivier Langlois
2013-04-26 19:08                   ` KOSAKI Motohiro
2013-04-27  1:51                     ` Olivier Langlois
2013-04-27  2:15                       ` KOSAKI Motohiro
2013-04-27  5:02                         ` Olivier Langlois [this message]
2013-04-27  5:17                           ` Olivier Langlois
2013-04-27  5:31                           ` Olivier Langlois
2013-04-27  5:06                         ` Olivier Langlois
2013-04-27  4:40                     ` [PATCH v2 1/3] " Olivier Langlois
2013-04-29  0:45                       ` Frederic Weisbecker
2013-04-29 17:29                         ` Olivier Langlois
2013-04-29  5:06                       ` KOSAKI Motohiro
2013-04-29 17:10                         ` Olivier Langlois
2013-04-29 17:41                           ` Olivier Langlois
2013-04-29 17:56                           ` KOSAKI Motohiro
2013-04-29 18:20                             ` Olivier Langlois
2013-04-29 18:31                               ` KOSAKI Motohiro
2013-04-29 18:54                                 ` Olivier Langlois
2013-04-29 19:09                                   ` KOSAKI Motohiro
2013-04-29 21:20                                     ` Olivier Langlois
2013-04-29 22:42                                       ` KOSAKI Motohiro
     [not found]                     ` <1367036552.7911.63.camel@Wailaba2>
2013-04-27  4:40                       ` [PATCH v2 2/3] " Olivier Langlois
2013-04-27  4:41                       ` [PATCH v2 3/3] " Olivier Langlois
2013-04-29  6:25                         ` KOSAKI Motohiro
2013-04-29 17:16                           ` Olivier Langlois
2013-04-11  3:29   ` [PATCH] " Olivier Langlois

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=1367038943.12779.10.camel@Wailaba2 \
    --to=olivier@trillion01.com \
    --cc=fweisbec@gmail.com \
    --cc=kosaki.motohiro@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=tglx@linutronix.de \
    /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