mirror of https://github.com/schoebel/mars
trans_logger: limit q0 length
This commit is contained in:
parent
8a7d86e73b
commit
7b905f93ad
|
@ -57,6 +57,9 @@ EXPORT_SYMBOL_GPL(trans_logger_do_crc);
|
|||
int trans_logger_mem_usage; // in KB
|
||||
EXPORT_SYMBOL_GPL(trans_logger_mem_usage);
|
||||
|
||||
int trans_logger_max_depth = 128;
|
||||
EXPORT_SYMBOL_GPL(trans_logger_max_depth);
|
||||
|
||||
struct writeback_group global_writeback = {
|
||||
.lock = __RW_LOCK_UNLOCKED(global_writeback.lock),
|
||||
.group_anchor = LIST_HEAD_INIT(global_writeback.group_anchor),
|
||||
|
@ -655,7 +658,8 @@ int _write_ref_get(struct trans_logger_output *output, struct trans_logger_mref_
|
|||
// delay in case of too many master shadows / memory shortage
|
||||
wait_event_interruptible_timeout(brick->caller_event,
|
||||
!brick->delay_callers &&
|
||||
(brick_global_memlimit < 1024 || atomic64_read(&global_mshadow_used) / 1024 < brick_global_memlimit),
|
||||
(brick_global_memlimit < 1024 || atomic64_read(&global_mshadow_used) / 1024 < brick_global_memlimit) &&
|
||||
(trans_logger_max_depth <= 0 || atomic_read(&brick->q_phase[0].q_queued) < trans_logger_max_depth),
|
||||
HZ / 2);
|
||||
#endif
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
|
||||
extern int trans_logger_do_crc;
|
||||
extern int trans_logger_mem_usage; // in KB
|
||||
extern int trans_logger_max_depth;
|
||||
extern atomic_t global_mshadow_count;
|
||||
extern atomic64_t global_mshadow_used;
|
||||
|
||||
|
|
|
@ -203,6 +203,7 @@ ctl_table mars_table[] = {
|
|||
INT_ENTRY("syslog_max_class", brick_say_syslog_max, 0600),
|
||||
INT_ENTRY("delay_say_on_overflow",delay_say_on_overflow, 0600),
|
||||
INT_ENTRY("mapfree_period_sec", mapfree_period_sec, 0600),
|
||||
INT_ENTRY("logger_max_depth", trans_logger_max_depth, 0600),
|
||||
INT_ENTRY("mem_limit_percent", mars_mem_percent, 0600),
|
||||
INT_ENTRY("logger_mem_used_kb", trans_logger_mem_usage, 0400),
|
||||
INT_ENTRY("mem_used_raw_kb", brick_global_block_used,0400),
|
||||
|
|
Loading…
Reference in New Issue