Skip to content

Commit

Permalink
ext4: realign trace events structs to make it smaller
Browse files Browse the repository at this point in the history
Most hardware architectures require that data (including struct fields)
have to be aligned in memory. To make it happen compiler inserts padding
between struct fields if they are not aligned correctly.

Reorder fields to remove paddings and make structures denser. Making data
smaller saves some memory that is very important for trace events.
Tracing buffer has limited size and making objects smaller we can put more
of them without overflowing the tracing buffer.

To find data struct holes I used 'pahole -H 1 -E -I vmlinux.o' from
'dwarves' package.

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
  • Loading branch information
Anatol Pomozov authored and Theodore Ts'o committed Aug 17, 2012
1 parent df981d0 commit 210c052
Showing 1 changed file with 120 additions and 120 deletions.
Loading

0 comments on commit 210c052

Please sign in to comment.