diff options
-rw-r--r-- | transport/ib-verbs/src/ib-verbs.c | 42 | ||||
-rw-r--r-- | xlators/performance/io-cache/src/io-cache.c | 20 | ||||
-rw-r--r-- | xlators/performance/read-ahead/src/read-ahead.c | 28 | ||||
-rw-r--r-- | xlators/performance/write-behind/src/write-behind.c | 18 |
4 files changed, 7 insertions, 101 deletions
diff --git a/transport/ib-verbs/src/ib-verbs.c b/transport/ib-verbs/src/ib-verbs.c index 91a3209b8..b524a032f 100644 --- a/transport/ib-verbs/src/ib-verbs.c +++ b/transport/ib-verbs/src/ib-verbs.c @@ -1256,10 +1256,10 @@ ib_verbs_options_init (transport_t *this) /* TODO: validate arguments from options below */ - options->send_size = 1048576; /* 1 MB */ - options->recv_size = 1048576; /* 1 MB */ - options->send_count = 16; - options->recv_count = 16; + options->send_size = this->xl->ctx->page_size; + options->recv_size = this->xl->ctx->page_size; + options->send_count = 32; + options->recv_count = 32; temp = dict_get (this->xl->options, "transport.ib-verbs.work-request-send-count"); @@ -1271,32 +1271,6 @@ ib_verbs_options_init (transport_t *this) if (temp) options->recv_count = data_to_int32 (temp); - temp = dict_get (this->xl->options, - "transport.ib-verbs.work-request-send-size"); - if (temp) { - ret = gf_string2bytesize (temp->data, &options->send_size); - if (ret != 0) { - gf_log ("ib-verbs", GF_LOG_ERROR, - "invalid number format \"%s\" of " - "\"option request-send-size\"", - temp->data); - options->send_size = 1 * GF_UNIT_MB; - } - } - - temp = dict_get (this->xl->options, - "transport.ib-verbs.work-request-recv-size"); - if (temp) { - ret = gf_string2bytesize (temp->data, &options->recv_size); - if (ret != 0) { - gf_log ("ib-verbs", GF_LOG_ERROR, - "invalid number format \"%s\" of " - "\"option request-recv-size\"", - temp->data); - options->recv_size = 1 * GF_UNIT_MB; - } - } - options->port = 1; temp = dict_get (this->xl->options, "transport.ib-verbs.port"); @@ -2367,14 +2341,6 @@ struct volume_options options[] = { .type = GF_OPTION_TYPE_ANY, .description = "check by 'ibv_devinfo'" }, - { .key = {"transport.ib-verbs.work-request-send-size", - "ib-verbs-work-request-send-size"}, - .type = GF_OPTION_TYPE_SIZET, - }, - { .key = {"transport.ib-verbs.work-request-recv-size", - "ib-verbs-work-request-recv-size"}, - .type = GF_OPTION_TYPE_SIZET, - }, { .key = {"transport.ib-verbs.work-request-send-count", "ib-verbs-work-request-send-count"}, .type = GF_OPTION_TYPE_INT, diff --git a/xlators/performance/io-cache/src/io-cache.c b/xlators/performance/io-cache/src/io-cache.c index 9d6f35806..0c394b84e 100644 --- a/xlators/performance/io-cache/src/io-cache.c +++ b/xlators/performance/io-cache/src/io-cache.c @@ -1327,7 +1327,6 @@ init (xlator_t *this) ioc_table_t *table; dict_t *options = this->options; uint32_t index = 0; - char *page_size_string = NULL; char *cache_size_string = NULL; if (!this->children || this->children->next) { @@ -1346,26 +1345,9 @@ init (xlator_t *this) ERR_ABORT (table); table->xl = this; - table->page_size = IOC_PAGE_SIZE; + table->page_size = this->ctx->page_size; table->cache_size = IOC_CACHE_SIZE; - if (dict_get (options, "page-size")) - page_size_string = data_to_str (dict_get (options, - "page-size")); - - if (page_size_string) { - if (gf_string2bytesize (page_size_string, - &table->page_size) != 0) { - gf_log ("io-cache", GF_LOG_ERROR, - "invalid number format \"%s\" of " - "\"option page-size\"", - page_size_string); - return -1; - } - gf_log (this->name, GF_LOG_DEBUG, - "using page-size %"PRIu64"", table->page_size); - } - if (dict_get (options, "cache-size")) cache_size_string = data_to_str (dict_get (options, "cache-size")); diff --git a/xlators/performance/read-ahead/src/read-ahead.c b/xlators/performance/read-ahead/src/read-ahead.c index 39475d2c9..6d015f70b 100644 --- a/xlators/performance/read-ahead/src/read-ahead.c +++ b/xlators/performance/read-ahead/src/read-ahead.c @@ -768,7 +768,6 @@ init (xlator_t *this) { ra_conf_t *conf; dict_t *options = this->options; - char *page_size_string = NULL; char *page_count_string = NULL; if (!this->children || this->children->next) { @@ -784,27 +783,9 @@ init (xlator_t *this) conf = (void *) CALLOC (1, sizeof (*conf)); ERR_ABORT (conf); - conf->page_size = 256 * 1024; - conf->page_count = 2; + conf->page_size = this->ctx->page_size; + conf->page_count = 4; - if (dict_get (options, "page-size")) - page_size_string = data_to_str (dict_get (options, - "page-size")); - if (page_size_string) - { - if (gf_string2bytesize (page_size_string, &conf->page_size) != 0) - { - gf_log ("read-ahead", - GF_LOG_ERROR, - "invalid number format \"%s\" of \"option page-size\"", - page_size_string); - return -1; - } - - gf_log (this->name, GF_LOG_DEBUG, "Using conf->page_size = %"PRIu64"", - conf->page_size); - } - if (dict_get (options, "page-count")) page_count_string = data_to_str (dict_get (options, "page-count")); @@ -878,11 +859,6 @@ struct volume_options options[] = { { .key = {"force-atime-update"}, .type = GF_OPTION_TYPE_BOOL }, - { .key = {"page-size"}, - .type = GF_OPTION_TYPE_SIZET, - .min = 64 * GF_UNIT_KB, - .max = 2 * GF_UNIT_MB - }, { .key = {"page-count"}, .type = GF_OPTION_TYPE_INT, .min = 1, diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c index 3aa14bd61..cba3c7e5f 100644 --- a/xlators/performance/write-behind/src/write-behind.c +++ b/xlators/performance/write-behind/src/write-behind.c @@ -1807,7 +1807,6 @@ init (xlator_t *this) { dict_t *options = NULL; wb_conf_t *conf = NULL; - char *aggregate_size_string = NULL; char *window_size_string = NULL; char *flush_behind_string = NULL; char *disable_till_string = NULL; @@ -1846,18 +1845,6 @@ init (xlator_t *this) /* configure 'options aggregate-size <size>' */ conf->aggregate_size = 0; - ret = dict_get_str (options, "block-size", - &aggregate_size_string); - if (ret == 0) { - ret = gf_string2bytesize (aggregate_size_string, - &conf->aggregate_size); - if (ret != 0) { - gf_log (this->name, GF_LOG_ERROR, - "invalid number format \"%s\" of \"option aggregate-size\"", - aggregate_size_string); - return -1; - } - } gf_log (this->name, GF_LOG_DEBUG, "using aggregate-size = %"PRIu64"", @@ -1970,11 +1957,6 @@ struct volume_options options[] = { { .key = {"flush-behind"}, .type = GF_OPTION_TYPE_BOOL }, - { .key = {"block-size", "aggregate-size"}, - .type = GF_OPTION_TYPE_SIZET, - .min = 128 * GF_UNIT_KB, - .max = 4 * GF_UNIT_MB - }, { .key = {"cache-size", "window-size"}, .type = GF_OPTION_TYPE_SIZET, .min = 512 * GF_UNIT_KB, |