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, Sep 3, 1:10 PM
Unknown Object (File)
Wed, Sep 3, 9:01 AM
Unknown Object (File)
Mon, Sep 1, 12:53 AM
Unknown Object (File)
Sun, Aug 31, 7:30 AM
Unknown Object (File)
Tue, Aug 26, 1:10 AM
Unknown Object (File)
Sat, Aug 23, 8:26 PM
Unknown Object (File)
Wed, Aug 13, 12:59 PM
Unknown Object (File)
Jul 18 2025, 4:54 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.