Eventhandlers for CPU state changes
From: Joseph Koshy (joseph.koshy_at_gmail.com)
Date: 12/17/04
- Previous message: Suleiman Souhlal: "Re: sysctl locking"
- Next in thread: John Baldwin: "Re: Eventhandlers for CPU state changes"
- Reply: John Baldwin: "Re: Eventhandlers for CPU state changes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 17 Dec 2004 11:58:46 +0530 To: freebsd-arch@freebsd.org
We currently allow CPUs to be enabled and disabled via the
sysctl "machdep.hlt_cpus". CPU enabling and disabling can
happen at any time in our current design.
It would be useful to have an eventhandler hook so that kernel
modules can get notified when a CPU is enabled or disabled.
For example, schedulers, memory allocators and drivers that
use MSRs inside the CPU could use this information.
Here is a straightforward attempt at implementing such an
eventhandler:
http://perforce.freebsd.org/changeView.cgi?CH=67118
The question however, is about the right kind of semantics for
such an eventhandler (The eventhandler above is at best
"advisory" in nature).
When we notify a module that "CPU X is going to go away", we
may still want to allow that module to run on that CPU to cleanup
some state (e.g., disable some MSRs). However we may also wish
to prevent other kernel threads from getting scheduled onto the
to-be-disabled CPU inadvertently.
One way of getting around this problem is for schedulers to register
two eventhandlers. The first with priority EVENTHANDLER_PRI_FIRST
marks CPU X as about to be disabled. Threads will not then get scheduled
onto CPU X unless bound to it. The second with priority
EVENTHANDLER_PRI_LAST will actually disable CPU X.
Suggestions? Comments?
_______________________________________________
freebsd-arch@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-arch
To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
- Previous message: Suleiman Souhlal: "Re: sysctl locking"
- Next in thread: John Baldwin: "Re: Eventhandlers for CPU state changes"
- Reply: John Baldwin: "Re: Eventhandlers for CPU state changes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
- Re: x86_64 account-for-memmap patch in 2.6.18-rc4-mm3 doesnt boot.
... CPU: L2 cache: 4096K ... disabling MSI for SHPC device ... MEM
window: disabled. ... assign_interrupt_mode Found MSI capability ... (Linux-Kernel) - Panic during boot with BT-948 on RELENG_5_4
... CPU: Pentium II/Pentium II Xeon/Celeron ... acpi0: Overriding SCI Interrupt
from IRQ 9 to IRQ 20 ... Location Bus Device Pin Link IRQs ... isa_probe_children:
disabling PnP devices ... (freebsd-stable) - Re: [Bug 8040] Hang before INIT when CONFIG_HIGHMEM4G=y [Fix CONFIG_COMPAT_VDSO] <- Bad?
... CPU: Trace cache: 12K uops, ... Intel machine check architecture supported.
... disabling MSI for SHPC device ... MEM window: disabled. ... (Linux-Kernel) - RE: svchost consuming CPU even after boot-up
... "nass" wrote: ... viewed on Task Manager these spkies are typically around 40%
of CPU, ... 3- On the Internet Options Select Don't use Background Downloading then
... I've tried disabling everything in my startup list with no impact to my ...
(microsoft.public.windowsxp.perform_maintain) - x86_64 account-for-memmap patch in 2.6.18-rc4-mm3 doesnt boot.
... CPU: L2 cache: 4096K ... disabling MSI for SHPC device ... MEM
window: disabled. ... assign_interrupt_mode Found MSI capability ... (Linux-Kernel)