Page MenuHomeFreeBSD

kern: run the PMC context-switch-in hook in fork_exit
DraftPublic

Authored by afscoelho_gmail.com on Thu, Sep 3, 9:32 PM.
Tags
None
Referenced Files
F171037571: D59361.id185758.diff
Tue, Sep 8, 8:10 AM
F170944221: D59361.id185758.diff
Mon, Sep 7, 6:48 PM
F170930513: D59361.diff
Mon, Sep 7, 4:36 PM
Unknown Object (File)
Mon, Sep 7, 12:08 AM
Unknown Object (File)
Sun, Sep 6, 12:07 PM
Unknown Object (File)
Fri, Sep 4, 5:19 PM
Unknown Object (File)
Fri, Sep 4, 2:46 PM
Unknown Object (File)
Fri, Sep 4, 11:04 AM
Subscribers
This is a draft revision that has not yet been submitted for review.

Details

Reviewers
None
Summary

A new thread reaches the CPU for the first time through fork_exit()
instead of sched_switch(), so the context-switch-in hook that
sched_switch() runs is skipped. An inherited PMC is then not
programmed onto the hardware until the child's first real context
switch, and hwpmc does not count the work of a short-lived child.

Run the hook from fork_exit() for a process that uses PMCs. This
mirrors the mi_switch() path that fork_exit() already emulates.

Sponsored by: AMD

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 76455
Build 73338: arc lint + arc unit