Page MenuHomeFreeBSD

Remove struct proc p_sched and struct thread td_sched.
ClosedPublic

Authored by kib on Jun 3 2016, 9:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Dec 22, 10:30 PM
Unknown Object (File)
Sat, Nov 30, 12:45 PM
Unknown Object (File)
Nov 7 2024, 10:26 PM
Unknown Object (File)
Nov 4 2024, 4:57 AM
Unknown Object (File)
Nov 4 2024, 4:57 AM
Unknown Object (File)
Nov 4 2024, 4:56 AM
Unknown Object (File)
Nov 4 2024, 4:56 AM
Unknown Object (File)
Nov 4 2024, 4:56 AM
Subscribers

Details

Summary

p_sched is unused.

td_sched is pointless, the corresponding memory is always next after the struct thread itself, except for thread0. The later is easily fixable, it only looks ugly. IMO it is better to remove the useless indirection.

Diff Detail

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

Event Timeline

kib retitled this revision from to Remove struct proc p_sched and struct thread td_sched..
kib updated this object.
kib edited the test plan for this revision. (Show Details)
kib added reviewers: jhb, emaste.
kib set the repository for this revision to rS FreeBSD src repository - subversion.
jhb edited edge metadata.
jhb added inline comments.
sys/kern/sched_ule.c
1628 ↗(On Diff #17283)

Maybe use a 'struct td_sched *ts' helper var here so it's more readable?

sys/sys/proc.h
886 ↗(On Diff #17283)

Perhaps move this up to just below 'struct thread' definition so all the types are together?

This revision is now accepted and ready to land.Jun 4 2016, 2:08 PM
kib edited edge metadata.

Move the struct thread0_storage right after the struct thread.
For several sched_ule.c functions, reduce number of td_get_sched() calls by using local vars.
Reorganize asserts about thread0_storage layout, making it static and correcting the size of the tail (reducing it to correct size).

This revision now requires review to proceed.Jun 4 2016, 4:32 PM
This revision was automatically updated to reflect the committed changes.