Re: RFC: New event timers infrastructure

From: Alexander Motin <mav_at_FreeBSD.org>
Date: Sun, 20 Jun 2010 09:17:58 +0300
Brandon Gooch wrote:
> I've been testing these patches since the first iteration
> (et.20100606), and I haven't discovered any related issues.

Thank you!

> I am unclear about the number of interrupts I should expect from the
> hpet0 device (compared to the 99 from the rtc at 100Hz), so here is
> the output of vmstat -i with and without the "et" patches:
> 
> With "et" patches:
> 
> interrupt                          total       rate
> irq1: atkbd0                         369          3
> irq9: acpi0                          961          8
> irq12: psm0                         1002          9
> irq18: uhci5                         140          1
> irq19: uhci2 ehci0*                 4823         45
> irq20: hpet0                       23893        223
> irq23: uhci3 ehci1                    11          0
> irq256: vgapci0                     1031          9
> irq257: hdac0                         14          0
> irq258: iwn0                        4258         39
> irq259: bge0                           1          0
> Total                              36503        341
> 
> Without "et" patches:
> 
> interrupt                          total       rate
> irq1: atkbd0                         449          2
> irq0: clk                          17334         99
> irq9: acpi0                         1701          9
> irq12: psm0                         8784         50
> irq18: uhci5                         188          1
> irq19: uhci2 ehci0*                 5828         33
> irq23: uhci3 ehci1                    11          0
> irq256: vgapci0                     1896         10
> irq257: hdac0                         14          0
> irq258: iwn0                       29571        169
> irq259: bge0                           1          0
> Total                              65777        378
> 
> And lastly, the values of the kern.eventtimer sysctls:
> 
> $ sysctl kern.eventtimer
> kern.eventtimer.choice: HPET(450) HPET1(440) HPET2(440) HPET3(440) i8254(100)
> kern.eventtimer.timer2: HPET1
> kern.eventtimer.timer1: HPET
> kern.eventtimer.singlemul: 4

I don't see there neither LAPIC, nor RTC timer. I suppose you have
disabled them via device hints. I also suppose you've done it to left
with only 100Hz IRQs of i8254 timer. Now, with the patch, these two are
still disabled, but system got 4 more HPET timers. As they have higher
precedence, two of them were taken (HPET and HPET1). Number if
interrupts can be explained by the line:

Starting kernel event timers: HPET _at_ 100Hz, HPET1 _at_ 128Hz

As result, you've got 228Hz IRQs (which then redistributed to every
CPU). As your HPET timer doesn't support FSB interrupts, all it's timers
share same IRQ vector, seen as "hpet0".

If you wish to get back to 100Hz IRQs as before, you may remove your
previous clock-disabling hints and add instead:

kern.eventtimer.timer1=HPET
kern.eventtimer.timer2=NONE
kern.eventtimer.singlemul=1

As result, you will have single timer, running at HZ rate. Instead of
HPET there you may choose any timer:
 LAPIC - it is per-CPU, so saves on IPI interrupts, supports one-shot
mode and so suitable for further tickless kernel, but it doesn't work in
C3 state;
 HPET{x} - on this hardware it can't be used as per-CPU, it supports
one-shot mode, but less suitable for further tickless kernel, as CPUs
can't run independently;
 i8254 - somewhat faster, as it doesn't needs status reading, but due to
being also a timecounter it can't be used in one-shot mode;
 RTC - somewhat slower, has limited set of supported frequencies (powers
of 2), only periodic mode.

-- 
Alexander Motin
Received on Sun Jun 20 2010 - 04:18:03 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:04 UTC