Re: git: 9e007a88d65b - main - atkbd: Reduce polling rate from 10Hz to ~1Hz.

From: John Baldwin <jhb_at_FreeBSD.org>
Date: Wed, 05 Jan 2022 19:19:37 UTC
On 1/5/22 9:26 AM, Warner Losh wrote:
> Maybe we default hw.atkbd.hz to 0. That will give us more info if this is
> even a thing still. And it would give users hit by this a no recompile fix
> and give us feedback as to how often this happens.
> 
> We used to miss ISA interrupts in the early SMPNG days, and that's the time
> this change was introduced. The PIC does a good job of latching the state
> and we have no other drivers that have this workaround absent issues with
> the device itself.

This is much older than SMPng.  The original commit to add this is:

commit 10661203e7e5727c16d3ecbb15c819837d6ad176
Author: Søren Schmidt <sos@FreeBSD.org>
Date:   Mon Nov 4 21:01:08 1996 +0000

     Fix the hanging keyboard problem under Xaccel. Apprently we are loosing
     an interrupt somewhere. The solution here is to check for keyboard
     input each time the screen update timer ticks. Not pretty, but works.

ISA interrupts have always been edge triggered, though in theory even in
pre-SMPng we should have set a bit in the mask of pending hardware interrupts
and re-ran the interrupt handler after it returned anytime an interrupt
arrived while the handler was running (if I understand the pre-SMPng
interrupt management correctly).  That said, I somewhat doubt that this is
still an actual bug today.  I think you could just leave this set to 0 by
default.

-- 
John Baldwin