Page MenuHomeFreeBSD

Dynamically allocate per-cpu scheduler state
ClosedPublic

Authored by jeff on Feb 24 2019, 2:53 AM.
Tags
None
Referenced Files
F148358570: D19315.id60709.diff
Tue, Mar 17, 8:36 AM
F148357417: D19315.id60709.diff
Tue, Mar 17, 8:26 AM
F148311697: D19315.id54278.diff
Tue, Mar 17, 3:01 AM
F148311485: D19315.id54278.diff
Tue, Mar 17, 3:00 AM
Unknown Object (File)
Sat, Mar 14, 9:00 PM
Unknown Object (File)
Tue, Mar 3, 3:06 AM
Unknown Object (File)
Sun, Feb 22, 2:56 PM
Unknown Object (File)
Mon, Feb 16, 1:23 AM
Subscribers

Details

Summary

We want to allocate scheduler state dynamically so that it can be allocated to the correct NUMA domain. This also eliminates a global and statically sized MAXCPU state array.

I added a per-cpu variable to point at dpcpu allocated memory to keep the instruction bloat down. This actually makes TDQ_SELF() more efficient than it was before but TDQ_CPU() is less efficient.

Diff Detail

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

Event Timeline

Can you re-upload the diff with the full context added, please ?

Much cleaner, as usual, than the hack I gave you to start with.

This revision is now accepted and ready to land.Feb 25 2019, 4:48 PM
In D19315#413467, @kib wrote:

Can you re-upload the diff with the full context added, please ?

+1, it is painful to review diffs without context.

Am I right that in head, dpcpu area allocations are not yet NUMA-affinitized?

kern/sched_ule.c
315 ↗(On Diff #54278)

It's called "id" in the definition.

Am I right that in head, dpcpu area allocations are not yet NUMA-affinitized?

Yes, it is just kmem_malloc() in mp_machdep.c:native_start_all_aps().