mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 23:27:04 +02:00
CLEANUP: cache: more efficiently pack the struct cache
By having the cache id on 33 bytes as the first member, it was creating a hole and forcing the "hot" remaining part to be split across two cache lines. Let's move the id at the end as it's used only during config parsing.
This commit is contained in:
parent
08eaa78739
commit
fd5efb5936
@ -45,11 +45,11 @@ struct applet http_cache_applet;
|
||||
struct flt_ops cache_ops;
|
||||
|
||||
struct cache {
|
||||
char id[33]; /* cache name */
|
||||
unsigned int maxage; /* max-age */
|
||||
unsigned int maxblocks;
|
||||
struct list list; /* cache linked list */
|
||||
struct list list; /* cache linked list */
|
||||
struct eb_root entries; /* head of cache entries based on keys */
|
||||
unsigned int maxage; /* max-age */
|
||||
unsigned int maxblocks;
|
||||
char id[33]; /* cache name */
|
||||
};
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user