Lets group same width types closer together to reduce the number and size of the holes in the struct. Before: /* size: 480, cachelines: 8, members: 30 */ /* sum members: 469, holes: 3, sum holes: 11 */ /* forced alignments: 1 */ /* last cacheline: 32 bytes */ After: /* size: 472, cachelines: 8, members: 30 */ /* sum members: 469, holes: 1, sum holes: 3 */ /* forced alignments: 1 */ /* last cacheline: 24 bytes */ Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxxx> --- drivers/gpu/drm/amd/amdgpu/amdgpu_job.h | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.h index ce6b9ba967ff..7e5fe3d73a06 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_job.h +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_job.h @@ -50,17 +50,22 @@ struct amdgpu_job { struct amdgpu_sync explicit_sync; struct dma_fence hw_fence; struct dma_fence *gang_submit; - uint32_t preamble_status; - uint32_t preemption_status; bool vm_needs_flush; bool gds_switch_needed; bool spm_update_needed; - uint64_t vm_pd_addr; + bool enforce_isolation; + bool init_shadow; unsigned vmid; unsigned pasid; + uint32_t num_ibs; + uint32_t preamble_status; + uint32_t preemption_status; uint32_t gds_base, gds_size; uint32_t gws_base, gws_size; uint32_t oa_base, oa_size; + /* job_run_counter >= 1 means a resubmit job */ + uint32_t job_run_counter; + uint64_t vm_pd_addr; uint64_t generation; /* user fence handling */ @@ -71,15 +76,7 @@ struct amdgpu_job { uint64_t shadow_va; uint64_t csa_va; uint64_t gds_va; - bool init_shadow; - /* job_run_counter >= 1 means a resubmit job */ - uint32_t job_run_counter; - - /* enforce isolation */ - bool enforce_isolation; - - uint32_t num_ibs; struct amdgpu_ib ibs[]; }; -- 2.48.0