mirror of https://github.com/schoebel/mars
copy: make io_prio configurable via /proc
This commit is contained in:
parent
08b27c548e
commit
72a2537c6d
|
@ -35,6 +35,12 @@
|
|||
int mars_copy_overlap = 0;
|
||||
EXPORT_SYMBOL_GPL(mars_copy_overlap);
|
||||
|
||||
int mars_copy_read_prio = MARS_PRIO_NORMAL;
|
||||
EXPORT_SYMBOL_GPL(mars_copy_read_prio);
|
||||
|
||||
int mars_copy_write_prio = MARS_PRIO_NORMAL;
|
||||
EXPORT_SYMBOL_GPL(mars_copy_write_prio);
|
||||
|
||||
///////////////////////// own helper functions ////////////////////////
|
||||
|
||||
/* TODO:
|
||||
|
@ -261,7 +267,11 @@ int _make_mref(struct copy_brick *brick, int index, int queue, void *data, loff_
|
|||
len = end_pos - pos;
|
||||
}
|
||||
mref->ref_len = len;
|
||||
mref->ref_prio = brick->io_prio;
|
||||
mref->ref_prio = rw ?
|
||||
mars_copy_write_prio :
|
||||
mars_copy_read_prio;
|
||||
if (mref->ref_prio < MARS_PRIO_HIGH || mref->ref_prio > MARS_PRIO_LOW)
|
||||
mref->ref_prio = brick->io_prio;
|
||||
|
||||
SETUP_CALLBACK(mref, copy_endio, mref_a);
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
#define INPUT_B_COPY 3
|
||||
|
||||
extern int mars_copy_overlap;
|
||||
extern int mars_copy_read_prio;
|
||||
extern int mars_copy_write_prio;
|
||||
|
||||
enum {
|
||||
COPY_STATE_RESET = -1,
|
||||
|
|
|
@ -231,6 +231,8 @@ ctl_table mars_table[] = {
|
|||
INT_ENTRY("mem_used_raw_kb", brick_global_block_used,0400),
|
||||
INT_ENTRY("io_flying_count", mars_global_io_flying, 0400),
|
||||
INT_ENTRY("copy_overlap", mars_copy_overlap, 0600),
|
||||
INT_ENTRY("copy_read_prio", mars_copy_read_prio, 0600),
|
||||
INT_ENTRY("copy_write_prio", mars_copy_write_prio, 0600),
|
||||
INT_ENTRY("statusfiles_rollover_sec", mars_rollover_interval, 0600),
|
||||
INT_ENTRY("scan_interval_sec", mars_scan_interval, 0600),
|
||||
INT_ENTRY("propagate_interval_sec", mars_propagate_interval, 0600),
|
||||
|
|
Loading…
Reference in New Issue