Re: One-shot-oriented event timers management

From: YAMAMOTO, Taku <taku_at_tackymt.homeip.net>
Date: Mon, 30 Aug 2010 19:59:41 +0900
On Mon, 30 Aug 2010 13:07:38 +0300
Alexander Motin <mav_at_FreeBSD.org> wrote:

> Gary Jennejohn wrote:
(snip)
> > So, what else did you do to reduce interrupts so much?
> > 
> > Ah, I think I see it now.  My desktop has only C1 enabled.  Is that it?
> > Unfortunately, it appears that only C1 is supported :(
> 
> Yes, as I have said, at this moment empty ticks skipped only while CPU
> is in C2/C3 states. In C1 state there is no way to handle lost events on
> wake up. While it may be not very dangerous, it is not very good.

There's an alternative way to catch exit-from-C1 atomically:
use MWAIT with bit0 of ECX set (``Treat masked interrupts as break events''
in Intel 64 and IA-32 Architecthres Software Developer's Manual).

In this way we can put each core individually into deeper Cx state without
additional costs (SMIs and the like) as a bonus.

The problem is that it may be unavailable to earlier CPUs that support
MONITOR/MWAIT instructions:
we should check the presense of this feature by examining bit0 and bit1 of ECX
that is returned by CPUID 5.

-- 
YAMAMOTO, Taku <taku_at_tackymt.homeip.net>
Received on Mon Aug 30 2010 - 08:59:30 UTC

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