Page MenuHomeFreeBSD

kern: run the PMC context-switch-in hook in fork_exit
Needs ReviewPublic

Authored by afscoelho_gmail.com on Thu, Sep 3, 9:32 PM.
Tags
None
Referenced Files
F173844092: D59361.diff
Mon, Sep 28, 8:36 PM
Unknown Object (File)
Sat, Sep 19, 12:54 AM
Unknown Object (File)
Fri, Sep 18, 4:42 PM
Unknown Object (File)
Wed, Sep 16, 9:52 PM
Unknown Object (File)
Tue, Sep 15, 8:55 PM
Unknown Object (File)
Mon, Sep 14, 10:49 AM
Unknown Object (File)
Sat, Sep 12, 2:40 PM
Unknown Object (File)
Sat, Sep 12, 1:50 PM
Subscribers

Details

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

Signed-off-by: Andre Silva <andasilv@amd.com>

Diff Detail

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