From e27f7f344e12d0885a48fcca8dfce36440f5e9e8 Mon Sep 17 00:00:00 2001 From: Shehjar Tikoo Date: Wed, 1 Apr 2009 13:58:49 -0700 Subject: io-threads: Classify requests for threadpool type New io-threads will serve requests through two separate threadpools. One thread pool for requests that must be ordered on a file that is open. so that the server can process the requests in the order they were entered in the requests queue, and not in the order the io-thread is able to send a request, which in turn is determined by how the thread gets scheduled. This can also be called the data-intensive ops thread pool. Second thread-pool for requests that dont care about ordering, i.e. requests like lookup, open, create, mkdir, etc. Signed-off-by: Anand V. Avati --- xlators/performance/io-threads/src/io-threads.c | 59 ++++++++++++++----------- 1 file changed, 33 insertions(+), 26 deletions(-) (limited to 'xlators/performance/io-threads') diff --git a/xlators/performance/io-threads/src/io-threads.c b/xlators/performance/io-threads/src/io-threads.c index b986a945e..59fc642ca 100644 --- a/xlators/performance/io-threads/src/io-threads.c +++ b/xlators/performance/io-threads/src/io-threads.c @@ -1480,33 +1480,40 @@ fini (xlator_t *this) return; } +/* + * O - Goes to ordered threadpool. + * U - Goes to un-ordered threadpool. + * V - Variable, depends on whether the file is open. + * If it is, then goes to ordered, otherwise to + * un-ordered. + */ struct xlator_fops fops = { - .open = iot_open, - .create = iot_create, - .readv = iot_readv, - .writev = iot_writev, - .flush = iot_flush, - .fsync = iot_fsync, - .lk = iot_lk, - .stat = iot_stat, - .fstat = iot_fstat, - .truncate = iot_truncate, - .ftruncate = iot_ftruncate, - .utimens = iot_utimens, - .checksum = iot_checksum, - .unlink = iot_unlink, - .lookup = iot_lookup, - .chmod = iot_chmod, - .fchmod = iot_fchmod, - .chown = iot_chown, - .fchown = iot_fchown, - .access = iot_access, - .readlink = iot_readlink, - .mknod = iot_mknod, - .mkdir = iot_mkdir, - .rmdir = iot_rmdir, - .symlink = iot_symlink, - .rename = iot_rename, + .open = iot_open, /* U */ + .create = iot_create, /* U */ + .readv = iot_readv, /* O */ + .writev = iot_writev, /* O */ + .flush = iot_flush, /* O */ + .fsync = iot_fsync, /* O */ + .lk = iot_lk, /* O */ + .stat = iot_stat, /* V */ + .fstat = iot_fstat, /* O */ + .truncate = iot_truncate, /* V */ + .ftruncate = iot_ftruncate, /* O */ + .utimens = iot_utimens, /* V */ + .checksum = iot_checksum, /* U */ + .unlink = iot_unlink, /* V */ + .lookup = iot_lookup, /* U */ + .chmod = iot_chmod, /* V */ + .fchmod = iot_fchmod, /* O */ + .chown = iot_chown, /* V */ + .fchown = iot_fchown, /* O */ + .access = iot_access, /* V */ + .readlink = iot_readlink, /* U */ + .mknod = iot_mknod, /* U */ + .mkdir = iot_mkdir, /* U */ + .rmdir = iot_rmdir, /* U */ + .symlink = iot_symlink, /* U */ + .rename = iot_rename, /* U */ }; struct xlator_mops mops = { -- cgit