Fix: PS/2 mouse ISR blocking; convert USB polling & GFX refresh to processes; remove dead scheduler #48

Merged
admin merged 1 commits from feature/ps2-mouse-fix into develop 2026-03-07 00:40:22 +00:00
Owner

PS/2 Mouse:

  • Fix ISR spin-blocking by reading port $60 directly with inb() instead
    of calling mouse_read(), which uses mouse_wait_long (100k iterations)
    and would stall the interrupt handler waiting for the next packet byte.

Timer (PIT):

  • Increase PIT frequency from ~1024 Hz to ~8 kHz (divisor 1193 -> 149)
    for more granular timer ticks.

Graphics Refresh:

  • Replace timer-hook-driven rendering (driver/timers/graphicsrefresh)
    with a dedicated 'gfxd' process that runs a continuous render loop,
    keeping the vCPU active to avoid NEM/Hyper-V pause-loop descheduling.
  • Move uidebug from driver/video/ to prog/.
  • Update FPS calculation to account for 8 kHz tick rate.

USB Hotplug:

  • Replace timer-hook-driven polling (driver/timers/usbhotplug) with a
    dedicated 'usbd' daemon process that sleeps 1s between poll cycles.
  • Add bounds check in usbcore.usb_check_hotplug for empty HC list.

Cleanup:

  • Remove old scheduler unit (superseded by processmanager/contextswitcher).
  • Remove tss unit and tss.init() call from kernel.
  • Remove unused syslog import from contextswitcher.
  • Reduce BASE_QUANTUM from 8 to 5.
PS/2 Mouse: - Fix ISR spin-blocking by reading port $60 directly with inb() instead of calling mouse_read(), which uses mouse_wait_long (100k iterations) and would stall the interrupt handler waiting for the next packet byte. Timer (PIT): - Increase PIT frequency from ~1024 Hz to ~8 kHz (divisor 1193 -> 149) for more granular timer ticks. Graphics Refresh: - Replace timer-hook-driven rendering (driver/timers/graphicsrefresh) with a dedicated 'gfxd' process that runs a continuous render loop, keeping the vCPU active to avoid NEM/Hyper-V pause-loop descheduling. - Move uidebug from driver/video/ to prog/. - Update FPS calculation to account for 8 kHz tick rate. USB Hotplug: - Replace timer-hook-driven polling (driver/timers/usbhotplug) with a dedicated 'usbd' daemon process that sleeps 1s between poll cycles. - Add bounds check in usbcore.usb_check_hotplug for empty HC list. Cleanup: - Remove old scheduler unit (superseded by processmanager/contextswitcher). - Remove tss unit and tss.init() call from kernel. - Remove unused syslog import from contextswitcher. - Reduce BASE_QUANTUM from 8 to 5.
admin added this to the 2.0.0 milestone 2026-03-07 00:35:48 +00:00
admin added the ImprovementBug
Component
Driver
labels 2026-03-07 00:35:48 +00:00
t3hn3rd was assigned by admin 2026-03-07 00:35:48 +00:00
admin added 1 commit 2026-03-07 00:35:49 +00:00
Fix PS/2 mouse ISR blocking; convert USB polling & GFX refresh to processes; remove dead scheduler
continuous-integration/drone/pr Build is passing
continuous-integration/drone/push Build is passing
738e5828f6
PS/2 Mouse:
- Fix ISR spin-blocking by reading port $60 directly with inb() instead
  of calling mouse_read(), which uses mouse_wait_long (100k iterations)
  and would stall the interrupt handler waiting for the next packet byte.

Timer (PIT):
- Increase PIT frequency from ~1024 Hz to ~8 kHz (divisor 1193 -> 149)
  for more granular timer ticks.

Graphics Refresh:
- Replace timer-hook-driven rendering (driver/timers/graphicsrefresh)
  with a dedicated 'gfxd' process that runs a continuous render loop,
  keeping the vCPU active to avoid NEM/Hyper-V pause-loop descheduling.
- Move uidebug from driver/video/ to prog/.
- Update FPS calculation to account for 8 kHz tick rate.

USB Hotplug:
- Replace timer-hook-driven polling (driver/timers/usbhotplug) with a
  dedicated 'usbd' daemon process that sleeps 1s between poll cycles.
- Add bounds check in usbcore.usb_check_hotplug for empty HC list.

Cleanup:
- Remove old scheduler unit (superseded by processmanager/contextswitcher).
- Remove tss unit and tss.init() call from kernel.
- Remove unused syslog import from contextswitcher.
- Reduce BASE_QUANTUM from 8 to 5.
admin requested review from Aaron 2026-03-07 00:35:49 +00:00
admin scheduled this pull request to auto merge when all checks succeed 2026-03-07 00:36:07 +00:00
Aaron approved these changes 2026-03-07 00:36:46 +00:00
admin merged commit 262d064b6d into develop 2026-03-07 00:40:22 +00:00
Sign in to join this conversation.