From: Eddie Kohler <kohler@cs.ucla.edu>
To: dccp@vger.kernel.org
Subject: Re: [PATCH 1/1] DCCP: Fix up t_nom - FOLLOW-UP
Date: Thu, 08 Feb 2007 05:50:35 +0000 [thread overview]
Message-ID: <45CABA2B.80503@cs.ucla.edu> (raw)
In-Reply-To: <200701101021.38920@strip-the-willow>
>> You want it to return microseconds precisely so you can distinguish
>> between
>> cases that require a timer and cases that require something
>> lighterweight,
>> like a simple rescheduling. If you pre-truncate the information to
>> millisecond granularity there's no way to distinguish between "send
>> NOW" and
>> "send pretty soon but not now". Just divide by 1000 when you actually
>> schedule the timer.
>>
> I'm not sure about this. If you reschedule you've got no guarantee
> when you get your next timeslice.
You've got no GUARANTEE of when you get your next timeslice, but in most
cases it will be soon. As opposed to scheduling a timer 1ms in the
future, where you KNOW you won't run for 1ms, as you say.
Gerrit's problem is burstiness at the level of milliseconds. The only
way to solve this is to run at sub-millisecond granularity. Use hi-res
timers, or easier, use existing mechanisms for running code frequently:
i.e., leaving the code runnable.
Eddie
> I also think that timers probably
> aren't that heavy in Linux as it probably weights the scheduler. If
> you ask for something 5 msecs in future you are guaranteed it won't go
> off before then but sometime after..
>
> Probably one to test some time but I can't see this affecting things
> too much and bigger bugs to fry at present probably. But certainly
> worth checking at some point.
>
> Ian
prev parent reply other threads:[~2007-02-08 5:50 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-10 10:21 [PATCH 1/1] DCCP: Fix up t_nom - FOLLOW-UP Gerrit Renker
2007-01-10 19:40 ` Ian McDonald
2007-01-12 10:39 ` Gerrit Renker
2007-01-12 12:54 ` Gerrit Renker
2007-01-12 16:33 ` Eddie Kohler
2007-01-12 16:41 ` Eddie Kohler
2007-01-12 16:58 ` Gerrit Renker
2007-01-12 20:02 ` Ian McDonald
2007-01-15 7:56 ` Gerrit Renker
2007-01-15 8:34 ` Gerrit Renker
2007-02-08 0:59 ` Eddie Kohler
2007-02-08 1:13 ` Ian McDonald
2007-02-08 1:23 ` Eddie Kohler
2007-02-08 1:47 ` Ian McDonald
2007-02-08 5:50 ` Eddie Kohler [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=45CABA2B.80503@cs.ucla.edu \
--to=kohler@cs.ucla.edu \
--cc=dccp@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 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.