diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-08-25 17:28:20 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-08-27 11:47:44 +0200 |
commit | ebf05c7dc92c11b0355aaa0e94064beadaa4b05c (patch) | |
tree | 09e59c0be773a7a452e1c8ccfca62e35b1da5f38 /drivers/net/ppp | |
parent | tty: n_tty: deduplicate copy code in n_tty_receive_buf_real_raw() (diff) | |
download | linux-ebf05c7dc92c11b0355aaa0e94064beadaa4b05c.tar.xz linux-ebf05c7dc92c11b0355aaa0e94064beadaa4b05c.zip |
tty: shrink the size of struct tty_struct by 40 bytes
It's been a long time since anyone has looked at what struct tty_struct
looks like in memory, turns out there was a ton of holes.
So move things around a bit, change one variable (closing) from being an
int to a bool (it is only being tested for 0/1), and we end up saving 40
bytes per structure overall on x86-64 systems.
Before this patch:
/* size: 696, cachelines: 11, members: 37 */
/* sum members: 665, holes: 8, sum holes: 31 */
/* forced alignments: 2, forced holes: 1, sum forced holes: 4 */
/* last cacheline: 56 bytes */
After this change:
/* size: 656, cachelines: 11, members: 37 */
/* sum members: 654, holes: 1, sum holes: 2 */
/* forced alignments: 2 */
/* last cacheline: 16 bytes */
Cc: Jiri Slaby <jirislaby@kernel.org>
Link: https://lore.kernel.org/r/2023082519-cobbler-unholy-8d1f@gregkh
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/net/ppp')
0 files changed, 0 insertions, 0 deletions