Commit 8578be14 authored by Philip Carns's avatar Philip Carns

generalization of pipeline write path

- use bulk poolset in place of bulk pools for more size options
- allow pipeline/memcpy on smaller transfers
- no explicit limit on courrency; one ult per chunk
- work towards generalizing configuration parameter api
- automatic defaults for buffer settings if pipelining enabled
parent 32964719
......@@ -119,39 +119,24 @@ int bake_provider_list_storage_targets(
bake_provider_t provider,
bake_target_id_t* targets);
/**
* @brief Sets the size and number of intermediate buffers used for transfering data.
* The size is set to 0 by default. A size of 0 indicates that RDMA will be
* done all at once and target the backend device directly without using an
* intermediate buffer.
*
* @param provider Bake provider
* @param target_id Target for which to change the buffer size.
* @param count Number of buffers to initialize.
* @param size Size of the buffer.
*
* @return 0 on success, -1 on failure
/* TODO: the following configuration management functions would ideally be
* split off into a dedicated component. Treating this as a prototype for
* now.
*/
int bake_provider_set_target_xfer_buffer(
bake_provider_t provider,
bake_target_id_t target_id,
size_t count,
size_t size);
/**
* @brief Sets the maximum number of ULTs that will be used to concurrently
* transfer data.
* @brief Set configuration parameters as string key/value pairs
*
* @param provider Bake provider
* @param target_id Target for which to change the number of ULTs
* @param num_threads Number of ULTs
* @param key Configuration key
* @param value Configuratiion value
*
* @return 0 on success, -1 on failure
*/
int bake_provider_set_target_xfer_concurrency(
int bake_provider_set_conf(
bake_provider_t provider,
bake_target_id_t target_id,
uint32_t num_threads);
const char *key,
const char *value);
#ifdef __cplusplus
}
......
......@@ -24,9 +24,7 @@ struct options
unsigned num_pools;
char **bake_pools;
char *host_file;
size_t buf_size;
size_t buf_count;
uint32_t num_threads;
int pipeline_enabled;
mplex_mode_t mplex_mode;
};
......@@ -37,9 +35,7 @@ static void usage(int argc, char **argv)
fprintf(stderr, " bake_pool is the path to the BAKE pool\n");
fprintf(stderr, " [-f filename] to write the server address to a file\n");
fprintf(stderr, " [-m mode] multiplexing mode (providers or targets) for managing multiple pools (default is targets)\n");
fprintf(stderr, " [-b size] buffer size for writes on provider\n");
fprintf(stderr, " [-c count] count of buffers used for accesses on provider\n");
fprintf(stderr, " [-t threads] number of threads used for concurrency\n");
fprintf(stderr, " [-p] enable pipelining\n");
fprintf(stderr, "Example: ./bake-server-daemon tcp://localhost:1234 /dev/shm/foo.dat /dev/shm/bar.dat\n");
return;
}
......@@ -51,7 +47,7 @@ static void parse_args(int argc, char **argv, struct options *opts)
memset(opts, 0, sizeof(*opts));
/* get options */
while((opt = getopt(argc, argv, "f:m:b:t:c:")) != -1)
while((opt = getopt(argc, argv, "f:m:p")) != -1)
{
switch(opt)
{
......@@ -68,14 +64,8 @@ static void parse_args(int argc, char **argv, struct options *opts)
exit(EXIT_FAILURE);
}
break;
case 'b':
opts->buf_size = atol(optarg);
break;
case 'c':
opts->buf_count = atol(optarg);
break;
case 't':
opts->num_threads = atol(optarg);
case 'p':
opts->pipeline_enabled = 1;
break;
default:
usage(argc, argv);
......@@ -184,9 +174,8 @@ int main(int argc, char **argv)
return(-1);
}
bake_provider_set_target_xfer_buffer(provider, tid, opts.buf_count, opts.buf_size);
bake_provider_set_target_xfer_concurrency(provider, tid, opts.num_threads);
if(opts.pipeline_enabled)
bake_provider_set_conf(provider, "pipeline_enabled", "1");
printf("Provider %d managing new target at multiplex id %d\n", i, i+1);
}
......@@ -216,9 +205,8 @@ int main(int argc, char **argv)
return(-1);
}
bake_provider_set_target_xfer_buffer(provider, tid, opts.buf_count, opts.buf_size);
bake_provider_set_target_xfer_concurrency(provider, tid, opts.num_threads);
if(opts.pipeline_enabled)
bake_provider_set_conf(provider, "pipeline_enabled", "1");
printf("Provider 0 managing new target at multiplex id %d\n", 1);
}
}
......
This diff is collapsed.
......@@ -44,7 +44,7 @@ function test_start_servers ()
exit 1
fi
run_to ${maxtime} src/bake-server-daemon -b 128 -c 4 -t 4 -f $TMPBASE/svr-$i.addr na+sm $TMPBASE/svr-$i.dat &
run_to ${maxtime} src/bake-server-daemon -p -f $TMPBASE/svr-$i.addr na+sm $TMPBASE/svr-$i.dat &
if [ $? -ne 0 ]; then
# TODO: this doesn't actually work; can't check return code of
# something executing in background. We have to rely on the
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment