Page MenuHomeFreeBSD

racct: Fix accounting of CPU time for the system idle process
ClosedPublic

Authored by markj on Apr 29 2025, 2:53 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 26, 10:31 AM
Unknown Object (File)
Sat, Nov 22, 12:17 AM
Unknown Object (File)
Fri, Nov 14, 8:29 PM
Unknown Object (File)
Fri, Nov 14, 6:52 PM
Unknown Object (File)
Fri, Nov 14, 11:14 AM
Unknown Object (File)
Wed, Nov 5, 2:45 PM
Unknown Object (File)
Wed, Nov 5, 2:43 PM
Unknown Object (File)
Wed, Nov 5, 2:40 PM
Subscribers

Details

Summary
  • Add a flag which cleanly indicates that a given process is the system idle process.
  • Modify racctd() to skip over the idle proc when aggregating CPU time and other metrics which don't apply to the idle thread.
  • Remove handling for idle threads from racct_getpcpu().

PR: 269097
MFC after: 2 weeks
Sponsored by: Klara, Inc.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

markj requested review of this revision.Apr 29 2025, 2:53 PM
kib added inline comments.
sys/kern/kern_racct.c
314

?

This revision is now accepted and ready to land.Apr 29 2025, 3:35 PM
sys/kern/kern_racct.c
314

I'll fix this separately.