diff options
author | Christophe JAILLET <christophe.jaillet@wanadoo.fr> | 2024-05-06 21:33:33 +0200 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2024-05-07 10:31:42 +0900 |
commit | 9b1fe0510494c989ab6a131ce8b97cdd02a1c869 (patch) | |
tree | e85ec0e15b237bdc2caa6dd623fb29d01a2b5558 /lib/kunit | |
parent | 991b5e2aad870828669ca105f424ef1b2534f820 (diff) |
regmap: Reorder fields in 'struct regmap_config' to save some memory
On x86_64 and allmodconfig, this shrinks the size of 'struct regmap_config'
from 328 to 312 bytes.
This is usually a win, because this structure is used as a static global
variable.
When moving the kerneldoc fields, I've tried to keep the layout as
consistent as possible, which is not really easy!
Before:
/* size: 328, cachelines: 6, members: 55 */
/* sum members: 296, holes: 6, sum holes: 25 */
/* padding: 7 */
/* last cacheline: 8 bytes */
After:
/* size: 312, cachelines: 5, members: 55 */
/* sum members: 296, holes: 5, sum holes: 16 */
/* last cacheline: 56 bytes */
For the records, this is also widely used:
$git grep static.*regmap_config | wc -l
1327
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr>
Link: https://lore.kernel.org/r/5e039cd8fe415dd7ab3169948c08a5311db9fb9a.1715024007.git.christophe.jaillet@wanadoo.fr
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'lib/kunit')
0 files changed, 0 insertions, 0 deletions