Page MenuHomeFreeBSD

Optimize padding in powerpc busdma_machdep.c
ClosedPublic

Authored by bdragon on May 1 2019, 4:14 AM.
Referenced Files
F107394170: D20121.diff
Mon, Jan 13, 1:27 PM
F107353218: D20121.id56896.diff
Sun, Jan 12, 10:28 PM
Unknown Object (File)
Sat, Jan 4, 11:39 PM
Unknown Object (File)
Fri, Dec 27, 11:23 PM
Unknown Object (File)
Thu, Dec 26, 8:21 PM
Unknown Object (File)
Sep 18 2024, 5:13 AM
Unknown Object (File)
Sep 17 2024, 5:43 PM
Unknown Object (File)
Sep 1 2024, 8:32 PM
Subscribers

Details

Summary

Noticed this while manually inspecting DMA tags.

Save 64 bytes of padding (32b after nsegments due to alignment requirements of next member, 32b after map_count due to alignment requirements of next member due to odd number of contig. ints.)

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

From my count it saves 8 bytes, not 64. I don't think it's a significant issue, given the size of the structure already, but it's not a bad change, and does allow for better packing.

This revision is now accepted and ready to land.May 1 2019, 2:10 PM

Yeah I meant bits, not bytes. 64 bits. 8 bytes.

This revision was automatically updated to reflect the committed changes.