Skip to content

Commit

Permalink
ovsdb: Reorder elements in ovsdb_table_schema structure.
Browse files Browse the repository at this point in the history
By reordering the elements in ovsdb_table_schema structure, pad bytes
can be reduced and also a cache line is saved.

Before: structure size:72, holes:2, sum padbytes:10, cachelines:2
After: structure size:64, holes:1, sum padbytes:2, cachelines:1

Signed-off-by: Bhanuprakash Bodireddy <[email protected]>
Co-authored-by: Antonio Fischetti <[email protected]>
Signed-off-by: Antonio Fischetti <[email protected]>
Acked-by: Jarno Rajahalme <[email protected]>
Acked-by: Daniele Di Proietto <[email protected]>
  • Loading branch information
2 people authored and ddiproietto committed Oct 18, 2016
1 parent 165f5e4 commit 96d9691
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ovsdb/table.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ struct uuid;
struct ovsdb_table_schema {
char *name;
bool mutable;
struct shash columns; /* Contains "struct ovsdb_column *"s. */
unsigned int max_rows; /* Maximum number of rows. */
bool is_root; /* Part of garbage collection root set? */
unsigned int max_rows; /* Maximum number of rows. */
struct shash columns; /* Contains "struct ovsdb_column *"s. */
struct ovsdb_column_set *indexes;
size_t n_indexes;
};
Expand Down

0 comments on commit 96d9691

Please sign in to comment.