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, Oct 15, 3:08 AM
Unknown Object (File)
Wed, Sep 17, 5:08 AM
Unknown Object (File)
Tue, Sep 16, 7:34 AM
Unknown Object (File)
Sep 16 2025, 2:37 AM
Unknown Object (File)
Sep 16 2025, 1:00 AM
Unknown Object (File)
Sep 13 2025, 11:24 PM
Unknown Object (File)
Sep 9 2025, 10:43 AM
Unknown Object (File)
Sep 3 2025, 1:10 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.