copy: allow non-strict write order

This commit is contained in:
Thomas Schoebel-Theuer 2017-05-18 14:18:54 +02:00
parent b32b2d57fe
commit 0da44a808f
3 changed files with 8 additions and 1 deletions

View File

@ -57,6 +57,9 @@
int mars_copy_overlap = 1; int mars_copy_overlap = 1;
EXPORT_SYMBOL_GPL(mars_copy_overlap); EXPORT_SYMBOL_GPL(mars_copy_overlap);
/* Always leave at 1, disable only for throughput _testing_ */
int mars_copy_strict_write_order = 1;
int mars_copy_timeout = 180; int mars_copy_timeout = 180;
int mars_copy_read_prio = MARS_PRIO_NORMAL; int mars_copy_read_prio = MARS_PRIO_NORMAL;
@ -551,7 +554,9 @@ restart:
* Currenty, bio and aio are obeying this. Be careful when * Currenty, bio and aio are obeying this. Be careful when
* implementing new IO bricks! * implementing new IO bricks!
*/ */
if (st->prev >= 0 && !GET_STATE(brick, st->prev).writeout) { if (mars_copy_strict_write_order &&
st->prev >= 0 &&
!GET_STATE(brick, st->prev).writeout) {
goto idle; goto idle;
} }
mref0 = st->table[0]; mref0 = st->table[0];

View File

@ -33,6 +33,7 @@
#define COPY_INPUT_NR 4 #define COPY_INPUT_NR 4
extern int mars_copy_overlap; extern int mars_copy_overlap;
extern int mars_copy_strict_write_order;
extern int mars_copy_timeout; extern int mars_copy_timeout;
extern int mars_copy_read_prio; extern int mars_copy_read_prio;
extern int mars_copy_write_prio; extern int mars_copy_write_prio;

View File

@ -322,6 +322,7 @@ struct ctl_table mars_table[] = {
#endif #endif
INT_ENTRY("io_flying_count", mars_global_io_flying, 0400), INT_ENTRY("io_flying_count", mars_global_io_flying, 0400),
INT_ENTRY("copy_overlap", mars_copy_overlap, 0600), INT_ENTRY("copy_overlap", mars_copy_overlap, 0600),
INT_ENTRY("copy_strict_write_order", mars_copy_strict_write_order, 0600),
INT_ENTRY("copy_timeout", mars_copy_timeout, 0600), INT_ENTRY("copy_timeout", mars_copy_timeout, 0600),
INT_ENTRY("copy_read_prio", mars_copy_read_prio, 0600), INT_ENTRY("copy_read_prio", mars_copy_read_prio, 0600),
INT_ENTRY("copy_write_prio", mars_copy_write_prio, 0600), INT_ENTRY("copy_write_prio", mars_copy_write_prio, 0600),