Page MenuHomeFreeBSD

Free bootstacks after AP startup.
ClosedPublic

Authored by kib on Dec 8 2018, 11:26 PM.
Tags
None
Referenced Files
F176019112: D18486.id.diff
Thu, Oct 15, 8:44 AM
Unknown Object (File)
Sun, Oct 4, 4:01 AM
Unknown Object (File)
Fri, Oct 2, 8:06 AM
Unknown Object (File)
Tue, Sep 29, 12:47 AM
Unknown Object (File)
Fri, Sep 25, 7:25 AM
Unknown Object (File)
Fri, Sep 25, 5:08 AM
Unknown Object (File)
Thu, Sep 24, 6:22 PM
Unknown Object (File)
Thu, Sep 24, 2:57 PM
Subscribers

Details

Summary

Bootstacks are unused after APs executed sched_throw() in init_secondary_tail() and started executing on proper idle thread stack.
Add sysinit that detects that the idle thread for each CPU was scheduled at least once, and free corresponding bootstack.

I believe that slight addition of the code (~200 bytes) is worth it, because even on typical small modern desktop CPU we leak 128K of memory otherwise (4 pages x 8 threads).

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

I also think it is worth it.

This revision is now accepted and ready to land.Dec 10 2018, 7:01 PM
This revision was automatically updated to reflect the committed changes.