]> www.infradead.org Git - users/dwmw2/linux.git/commit
i8253: Disable PIT timer 0 when not in use
authorDavid Woodhouse <dwmw@amazon.co.uk>
Thu, 1 Aug 2024 16:16:08 +0000 (17:16 +0100)
committerDavid Woodhouse <dwmw@amazon.co.uk>
Fri, 2 Aug 2024 14:52:56 +0000 (15:52 +0100)
commitf3e09ac7c5c453a55bb6b003b258966d1fe949c9
treeb3c8f248d7cbfcd5d4d90a8162a349d5bc0208a2
parent29f30193250ada8f7f152f11152a1f082d4044d9
i8253: Disable PIT timer 0 when not in use

Leaving the PIT interrupt running can cause noticeable steal time for
virtual guests. The VMM generally has a timer which toggles the IRQ input
to the PIC and I/O APIC, which takes CPU time away from the guest. Even
on real hardware, running the counter may use power needlessly (albeit
not much).

Make sure it's turned off if it isn't going to be used.

Signed-off-by: David Woodhouse <dwmw@amazon.co.uk>
arch/x86/kernel/i8253.c
drivers/clocksource/i8253.c
include/linux/i8253.h