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)
Thu, Nov 7, 10:26 PM
Unknown Object (File)
Mon, Nov 4, 4:57 AM
Unknown Object (File)
Mon, Nov 4, 4:57 AM
Unknown Object (File)
Mon, Nov 4, 4:56 AM
Unknown Object (File)
Mon, Nov 4, 4:56 AM
Unknown Object (File)
Mon, Nov 4, 4:56 AM
Unknown Object (File)
Mon, Nov 4, 4:48 AM
Unknown Object (File)
Oct 28 2024, 7:23 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 Skipped
Unit
Tests Skipped

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

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

sys/sys/proc.h
886

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.