mirror of
https://github.com/schoebel/mars
synced 2024-12-16 11:45:10 +00:00
mem: pre-allocate only the necessary
This commit is contained in:
parent
93b05fc6db
commit
fb964fcc75
@ -9,6 +9,17 @@
|
||||
//#define STAT_DEBUGGING // here means: display full statistics
|
||||
//#define HASH_DEBUGGING
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/bio.h>
|
||||
|
||||
#include "mars.h"
|
||||
#include "lib_rank.h"
|
||||
#include "lib_limiter.h"
|
||||
|
||||
#include "mars_trans_logger.h"
|
||||
|
||||
// variants
|
||||
#define KEEP_UNIQUE
|
||||
#define DELAY_CALLERS // this is _needed_ for production systems
|
||||
@ -20,22 +31,15 @@
|
||||
#define APPLY_DATA
|
||||
|
||||
// tuning
|
||||
#define CONF_TRANS_CHUNKSIZE (128 * 1024)
|
||||
#ifdef BRICK_DEBUG_MEM
|
||||
#define CONF_TRANS_CHUNKSIZE (128 * 1024 - PAGE_SIZE * 2)
|
||||
#else
|
||||
#define CONF_TRANS_CHUNKSIZE (128 * 1024)
|
||||
#endif
|
||||
#define CONF_TRANS_MAX_MREF_SIZE PAGE_SIZE
|
||||
//#define CONF_TRANS_ALIGN PAGE_SIZE // FIXME: does not work
|
||||
#define CONF_TRANS_ALIGN 0
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/module.h>
|
||||
#include <linux/string.h>
|
||||
#include <linux/bio.h>
|
||||
|
||||
#include "mars.h"
|
||||
#include "lib_rank.h"
|
||||
#include "lib_limiter.h"
|
||||
|
||||
#include "mars_trans_logger.h"
|
||||
|
||||
#ifdef REPLAY_DEBUGGING
|
||||
#define MARS_RPL(_fmt, _args...) _MARS_MSG(false, "REPLAY ", _fmt, ##_args)
|
||||
#else
|
||||
|
@ -4071,17 +4071,7 @@ done:
|
||||
|
||||
static struct mem_reservation global_reserve = {
|
||||
.amount = {
|
||||
[1] = 32,
|
||||
[2] = 32,
|
||||
[3] = 32,
|
||||
[4] = 64,
|
||||
[5] = 64,
|
||||
[6] = 64,
|
||||
[7] = 2,
|
||||
[8] = 2,
|
||||
[9] = 1,
|
||||
[10] = 1,
|
||||
[11] = 0,
|
||||
},
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user