General structure packing
Pack often used structures, so that less memory/cachelines are used Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com>
This commit is contained in:
parent
c751974ae0
commit
da9a6204d3
@ -192,8 +192,8 @@ static int _cas_upgrade_dump_cache_conf_main(ocf_cache_t cache,
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct _ocf_core_visitor_ctx {
|
struct _ocf_core_visitor_ctx {
|
||||||
int i;
|
|
||||||
struct cas_properties *cache_props;
|
struct cas_properties *cache_props;
|
||||||
|
int i;
|
||||||
int error;
|
int error;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -710,9 +710,9 @@ static int _cas_upgrade_init_props_array(
|
|||||||
}
|
}
|
||||||
|
|
||||||
struct _cas_cache_dump_conf_visitor_ctx {
|
struct _cas_cache_dump_conf_visitor_ctx {
|
||||||
int i;
|
|
||||||
struct cas_properties **caches_props_array;
|
struct cas_properties **caches_props_array;
|
||||||
struct casdsk_props_conf *caches_serialized_conf;
|
struct casdsk_props_conf *caches_serialized_conf;
|
||||||
|
int i;
|
||||||
int error;
|
int error;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -9,14 +9,14 @@
|
|||||||
#define MAX_THREAD_NAME_SIZE 48
|
#define MAX_THREAD_NAME_SIZE 48
|
||||||
|
|
||||||
struct cas_thread_info {
|
struct cas_thread_info {
|
||||||
|
char name[MAX_THREAD_NAME_SIZE];
|
||||||
|
void *sync_data;
|
||||||
atomic_t stop;
|
atomic_t stop;
|
||||||
|
atomic_t kicked;
|
||||||
struct completion compl;
|
struct completion compl;
|
||||||
struct completion sync_compl;
|
struct completion sync_compl;
|
||||||
void *sync_data;
|
|
||||||
wait_queue_head_t wq;
|
wait_queue_head_t wq;
|
||||||
atomic_t kicked;
|
|
||||||
struct task_struct *thread;
|
struct task_struct *thread;
|
||||||
char name[MAX_THREAD_NAME_SIZE];
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static int _cas_io_queue_thread(void *data)
|
static int _cas_io_queue_thread(void *data)
|
||||||
|
@ -7,12 +7,12 @@
|
|||||||
#include "ocf_env.h"
|
#include "ocf_env.h"
|
||||||
|
|
||||||
struct env_mpool {
|
struct env_mpool {
|
||||||
int mpool_max;
|
|
||||||
/*!< Max mpool allocation order */
|
|
||||||
|
|
||||||
env_allocator *allocator[env_mpool_max];
|
env_allocator *allocator[env_mpool_max];
|
||||||
/*!< OS handle to memory pool */
|
/*!< OS handle to memory pool */
|
||||||
|
|
||||||
|
int mpool_max;
|
||||||
|
/*!< Max mpool allocation order */
|
||||||
|
|
||||||
uint32_t hdr_size;
|
uint32_t hdr_size;
|
||||||
/*!< Data header size (constant allocation part) */
|
/*!< Data header size (constant allocation part) */
|
||||||
|
|
||||||
|
@ -39,17 +39,17 @@ struct _cas_reserve_pool_per_cpu {
|
|||||||
|
|
||||||
struct cas_reserve_pool {
|
struct cas_reserve_pool {
|
||||||
uint32_t limit;
|
uint32_t limit;
|
||||||
char *name;
|
|
||||||
uint32_t entry_size;
|
uint32_t entry_size;
|
||||||
|
char *name;
|
||||||
struct _cas_reserve_pool_per_cpu *rpools;
|
struct _cas_reserve_pool_per_cpu *rpools;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _cas_rpool_pre_alloc_info {
|
struct _cas_rpool_pre_alloc_info {
|
||||||
struct work_struct ws;
|
struct work_struct ws;
|
||||||
|
struct completion cmpl;
|
||||||
struct cas_reserve_pool *rpool_master;
|
struct cas_reserve_pool *rpool_master;
|
||||||
cas_rpool_new rpool_new;
|
cas_rpool_new rpool_new;
|
||||||
void *allocator_ctx;
|
void *allocator_ctx;
|
||||||
struct completion cmpl;
|
|
||||||
int error;
|
int error;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user