xen: credit2: rearrange members of control structures
With the aim of improving memory size and layout, and
at the same time trying to put related fields reside
in the same cacheline.
Here's a summary of the output of `pahole`, with and
without this patch, for the affected data structures.
csched2_runqueue_data:
* Before:
size: 216, cachelines: 4, members: 14
sum members: 208, holes: 2, sum holes: 8
last cacheline: 24 bytes
* After:
size: 208, cachelines: 4, members: 14
last cacheline: 16 bytes
csched2_private:
* Before:
size: 120, cachelines: 2, members: 8
sum members: 112, holes: 1, sum holes: 4
padding: 4
last cacheline: 56 bytes
* After:
size: 112, cachelines: 2, members: 8
last cacheline: 48 bytes
csched2_vcpu:
* Before:
size: 112, cachelines: 2, members: 14
sum members: 108, holes: 1, sum holes: 4
last cacheline: 48 bytes
* After:
size: 112, cachelines: 2, members: 14
padding: 4
last cacheline: 48 bytes
While there, improve the wording, style and alignment
of comments too.
Signed-off-by: Dario Faggioli <dario.faggioli@citrix.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>