Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 14 Aug 2012 23:58:36 +0300
From:      Alexander Motin <mav@FreeBSD.org>
To:        Adam McDougall <mcdouga9@egr.msu.edu>
Cc:        freebsd-stable@FreeBSD.org
Subject:   Re: High load event idl.
Message-ID:  <502ABBFC.9090602@FreeBSD.org>
In-Reply-To: <20120814192540.GV68639@egr.msu.edu>
References:  <CAPjTQNGts290DyjORNfir8_rZ5S_vdog%2BJMEBA9mc2vJhUa=jg@mail.gmail.com> <4F9CCEF2.6050609@FreeBSD.org> <20120429155512.M91148@sola.nimnet.asn.au> <4F9CDE91.1060300@FreeBSD.org> <CAPjTQNF=0Hgq_7BxeK_8o6DRQ%2BUJ_r94Y3PqwF8f_ccDeA_hHQ@mail.gmail.com> <4F9D2F0C.4050501@FreeBSD.org> <20120429122714.GA56829@ravenloft.kiev.ua> <4F9D3DF8.9000800@FreeBSD.org> <20120429133056.GA58422@ravenloft.kiev.ua> <4F9D4491.2060007@FreeBSD.org> <20120814192540.GV68639@egr.msu.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On 14.08.2012 22:25, Adam McDougall wrote:
> On Sun, Apr 29, 2012 at 04:39:29PM +0300, Alexander Motin wrote:
>
>    On 04/29/12 16:30, Alex Kozlov wrote:
>    > On Sun, Apr 29, 2012 at 04:11:20PM +0300, Alexander Motin wrote:
>    >> On 04/29/12 15:27, Alex Kozlov wrote:
>    >>> On Sun, Apr 29, 2012 at 03:07:40PM +0300, Alexander Motin wrote:
>    >>>> On 04/29/12 15:04, Oliver Pinter wrote:
>    >>>>> Removing dummynet from kernel don't chanage anything, that is releated
>    >>>>> to load average. The loadavg hold to 0.70 +/- 0.2. (single user : sh +
>    >>>>> top)
>    >>>>
>    >>>> New ktr dump?
>    >>> I have similar issue on one of my laptops. Should I provide ktr dump?
>    >>> http://lists.freebsd.org/pipermail/freebsd-current/2011-September/027133.html
>    >> In your case HPET also shares interrupt with other devices. I suspect
>    >> that may be a reason. Every time when swi thread runs loadavg, other CPU
>    >> runs shared interrupt handler, that is accounted as result. Please show
>    >> your verbose dmesg.
>    > Attached.
>
>    In your case HPET could solely use IRQ22 that seems free now. After
>    recent changes in ACPI code it is detected before PCI devices and so
>    doesn't avoids sharing. You may try to hint it specific IRQ by adding to
>    loader,conf line:
>    hint.hpet.0.allowed_irqs="0x00400000"
>
>    --
>    Alexander Motin
>
> I think I am having the same issue on my Sun Fire x4150 servers.  It
> goes away when I sysctl kern.eventtimer.timer=LAPIC but I'm hesitant to
> use local workarounds in case they become pessimistic in the future.
> I'm not sure all of my systems would have the same free irqs (including
> after potential addition of expansion cards) so it might be a pain to
> determine an appropriate allowed_irqs setting for each.  I tried
> hint.hpet.0.allowed_irqs="0x00000000" for the sake of experiment and
> that just results in LAPIC being used since HPET is removed from
> kern.eventtimer.choice.  I've attached a verbose dmesg (will probably be
> stripped from the list, hence the Cc:).
>
> Is there a limit to how high the irq can be set or could I perhaps set
> it high enough that it is unlikely to conflict with other hardware?  Is
> there a chance we can find an automatic fix for this issue, or should I
> just stick with LAPIC at the expense of whatever the HPET event timer
> gets me?  Or something else?  I feel the partially random load average
> level makes it difficult to measure a low load and can be misleading
> during problem debugging.  Thanks.

HPET theoretically can use any IRQ from 0 to 31. Practically there could 
be different limitations. It is BIOS duty to tell us which IRQs are 
allowed to use. In your case IRQs 20-23 are allowed. Unluckily now 
system just gives to the HPET driver the first from the range.

Problem with LAPIC timer is that it stops working when CPU goes to C3 or 
deeper idle state. These states are not enabled by default, so unless 
you enabled them explicitly, it is safe to use LAPIC. In any case 
present 9-STABLE system should prevent you from using unsafe C-state if 
LAPIC timer is used. From all other perspectives LAPIC is preferable, as 
it is faster and easier to operate then HPET. Latest CPUs fixed the 
LAPIC timer problem, so I don't think that switching to it will be 
pessimistic in foreseeable future.

-- 
Alexander Motin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?502ABBFC.9090602>