ich habe ein Kernelmodul geschrieben, dass einen hochauflösenden Timer benötigt. Auf meinem Laptop funktioniert die ganze Sache absolut problemlos (selbstkompilierter 2.6.23 von SID, der insbesondere HR_TIMERS mit einkompiliert bekommen hat). Auf dem Produktivsystem funktionieren die High Resolution Timer leider nicht. Hier verwende ich einen selbstkompilierten 2.6.25er Kernel, ebenfalls aus dem SID Repository und mit die Timer betreffend gleichen Optionen. Es gibt keine Fehlermeldung, allerdings funktionieren die Timer deutlich ungenauer, leider eben auch viel zu ungenau. Hier der entsprechende Output von cat /proc/timer_list auf dem Entwicklungsrechner:
Code: Alles auswählen
Timer List Version: v0.3
HRTIMER_MAX_CLOCK_BASES: 2
now at 25469434139815 nsecs
cpu: 0
clock 0:
.index: 0
.resolution: 1 nsecs
.get_time: ktime_get_real
.offset: 1214976840856921991 nsecs
active timers:
clock 1:
.index: 1
.resolution: 1 nsecs
.get_time: ktime_get
.offset: 0 nsecs
active timers:
#0: <e4d41ee8>, tick_sched_timer, S:01
# expires at 25469436000000 nsecs [in 1860185 nsecs]
#1: <e4d41ee8>, it_real_fn, S:01
# expires at 25469451553408 nsecs [in 17413593 nsecs]
#2: <e4d41ee8>, hrtimer_wakeup, S:01
# expires at 25469464666244 nsecs [in 30526429 nsecs]
#3: <e4d41ee8>, hrtimer_wakeup, S:01
# expires at 25469470534777 nsecs [in 36394962 nsecs]
#4: <e4d41ee8>, hrtimer_wakeup, S:01
# expires at 25470746745258 nsecs [in 1312605443 nsecs]
#5: <e4d41ee8>, it_real_fn, S:01
# expires at 25474594786498 nsecs [in 5160646683 nsecs]
#6: <e4d41ee8>, it_real_fn, S:01
# expires at 25495680943972 nsecs [in 26246804157 nsecs]
#7: <e4d41ee8>, hrtimer_wakeup, S:01
# expires at 25500781027200 nsecs [in 31346887385 nsecs]
#8: <e4d41ee8>, hrtimer_wakeup, S:01
# expires at 28958707688459 nsecs [in 3489273548644 nsecs]
.expires_next : 25469436000000 nsecs
.hres_active : 1
.nr_events : 4786932
.nohz_mode : 2
.idle_tick : 25469424000000 nsecs
.tick_stopped : 0
.idle_jiffies : 6292355
.idle_calls : 5737157
.idle_sleeps : 3033715
.idle_entrytime : 25469423503083 nsecs
.idle_sleeptime : 15391797321745 nsecs
.last_jiffies : 6292355
.next_jiffies : 6292359
.idle_expires : 25469436000000 nsecs
jiffies: 6292358
Tick Device: mode: 1
Clock Event Device: <NULL>
tick_broadcast_mask: 00000000
tick_broadcast_oneshot_mask: 00000000
Tick Device: mode: 1
Clock Event Device: pit
max_delta_ns: 27461866
min_delta_ns: 12571
mult: 5124677
shift: 32
mode: 3
next_event: 25469436000000 nsecs
set_next_event: pit_next_event
set_mode: init_pit_timer
event_handler: hrtimer_interrupt
Code: Alles auswählen
Timer List Version: v0.3
HRTIMER_MAX_CLOCK_BASES: 2
now at 181813985215 nsecs
cpu: 0
clock 0:
.index: 0
.resolution: 4000250 nsecs
.get_time: ktime_get_real
.offset: 0 nsecs
active timers:
clock 1:
.index: 1
.resolution: 4000250 nsecs
.get_time: ktime_get
.offset: 0 nsecs
active timers:
#0: <f754bee8>, it_real_fn, S:01
# expires at 192405231144 nsecs [in 10591245929 nsecs]
#1: <f754bee8>, hrtimer_wakeup, S:01
# expires at 203432149920 nsecs [in 21618164705 nsecs]
#2: <f754bee8>, it_real_fn, S:01
# expires at 1812649027145 nsecs [in 1630835041930 nsecs]
#3: <f754bee8>, hrtimer_wakeup, S:01
# expires at 3613397498878 nsecs [in 3431583513663 nsecs]
.expires_next : 9223372036854775807 nsecs
.hres_active : 0
.nr_events : 0
.nohz_mode : 0
.idle_tick : 0 nsecs
.tick_stopped : 0
.idle_jiffies : 0
.idle_calls : 0
.idle_sleeps : 0
.idle_entrytime : 181810305977 nsecs
.idle_waketime : 0 nsecs
.idle_exittime : 0 nsecs
.idle_sleeptime : 2559531932 nsecs
.last_jiffies : 0
.next_jiffies : 0
.idle_expires : 0 nsecs
jiffies: 4294937719
Tick Device: mode: 0
Clock Event Device: <NULL>
tick_broadcast_mask: 00000000
tick_broadcast_oneshot_mask: 00000000
Tick Device: mode: 0
Clock Event Device: pit
max_delta_ns: 27461866
min_delta_ns: 12571
mult: 5124677
shift: 32
mode: 2
next_event: 0 nsecs
set_next_event: pit_next_event
set_mode: init_pit_timer
event_handler: tick_handle_periodic
Gruß, Felix