Schedule granularity

Benjie Chen benjie at amsterdam.lcs.mit.edu
Tue Jul 3 13:18:49 EDT 2001


> So, the DelayShaper is put between a queue and a ToDevice I believe as a
> pull element and it only returns a packet if one is ready. Do you have
> an idea how many times this element would be called in a normal
> configuration and how small the interval can be, is e.g. somehting in
> the order of 50us possible ?

conf/delay.click has an example... but with ms delays.

a quick userlevel program that makes gettimeofday call and 
print result to stdout produces the following on p3

sec       usec
----------------
994177102 193550
994177102 193712
994177102 193739
994177102 193764
994177102 193789
994177102 193813
994177102 193838
994177102 193846
994177102 193852
994177102 193858

so it seems like pretty fine grained. you can probably get much
less variation if you don't use stdio. i think the only cost of
calling this in kernel should be cost of rdtsc instruction plus
flushing pipeline, which means on a p4, you will get worse numbers.
for example, on a p4

sec       usec
----------------
994177039 383814
994177039 384072
994177039 384107
994177039 384141
994177039 384176
994177039 384210
994177039 384244
994177039 384279
994177039 384313
994177039 384348

but probably still good enough no?

-- 
benjie chen
benjie at lcs.mit.edu



More information about the click mailing list