All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dario Faggioli <raistlin@linux.it>
To: Daniel Rosenthal <danielrosenthal@acm.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
	LKML <linux-kernel@vger.kernel.org>, Ingo Molnar <mingo@elte.hu>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: behavior of hrtimers scheduled to expire in the past, SCHED_SPORADIC subtlety
Date: Thu, 23 Oct 2008 10:10:47 +0200	[thread overview]
Message-ID: <1224749448.9835.22.camel@Palanthas> (raw)
In-Reply-To: <4b6fba110810221805m70fd7e72rd66da9eba8f9f532@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2716 bytes --]

On Wed, 2008-10-22 at 21:05 -0400, Daniel Rosenthal wrote:
> Darrio,
> Just to warn you, be careful that your SCHED_SPORADIC implementation
> deals with the above situation correctly.  
I know this is an issue, but anyway thank you very much for adding me to
this Cc. :-)

> Be careful to avoid this in your code because
> this is subtle and it took me a very long time to debug this
I know that feeling quite well!! :-P

> And regarding SCHED_SPORADIC, I am also working on SCHED_SPORADIC in
> 2.6.25. If I don't finish my RFC patch by the time you finish your
> final 2.6.27 patch, please let me know because I believe it would be
> beneficial for us to compare code before any final decisions are made
> (mine still isn't working well enough to compare yet).
Ok, this is how things are right now. Anyway, any comparison, discussion
and collaboration are more than welcome. :-D

I've almost rewritten almost all the code in order to fulfill Peter's
suggestions and to deal with some situations I did not consider in the
first implementation.

First of all I've changed the interface from standard POSIX calls
(sched_setscheduler, etc.) to the new API (sched_setscheduler2, etc.) as
suggested in the LKML.
After that I discovered that dealing with poor precision in budget
accounting (tick resolution) causes very big issues, especially if
budget and period are very short, and I had to rethink the algorithm and
the code again to cope with this (and no, hrtick does not help, not so
much at least!). :-(

All this took very long time, much more than what I expected, but now
it's ready... I'm just testing it with some corner cases I have been
able to figure out and, more interestingly, I'm trying to establish a
meaningful comparison between the present throttling mechanism and the
SCHED_SPORADIC group scheduling.

In a short while (I hope) I'll send the patch again to you as well as to
the ML, so that we can discuss about it being more informed. :-)

Also, I'm going to present this work at the next RealTime Linux
Workshop, next week, in Mexico... Are you attending?

Thanks again and Regards,
Dario

-- 
<<This happens because I choose it to happen!>>
(Raistlin Majere, DragonLance Chronicles -Dragons of Spring Drawning-)
----------------------------------------------------------------------
Dario Faggioli
GNU/Linux Registered User: #340657
Web: http://www.linux.it/~raistlin
Blog: http://blog.linux.it/raistlin
SIP Account: dario.faggioli@sipproxy.wengo.fr or
             raistlin@ekiga.net
Jabber Account: dario.faggioli@jabber.org/WengoPhone
GnuPG Key ID: 4DC83AC4
GnuPG Key Fingerprint: 2A78 AD5D B9CF A082 0836 08AD 9385 DA04 4DC8 3AC4

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2008-10-23  8:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-23  1:05 behavior of hrtimers scheduled to expire in the past, SCHED_SPORADIC subtlety Daniel Rosenthal
2008-10-23  8:10 ` Dario Faggioli [this message]
2008-10-23 17:38   ` Daniel Rosenthal

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=1224749448.9835.22.camel@Palanthas \
    --to=raistlin@linux.it \
    --cc=danielrosenthal@acm.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.