summaryrefslogtreecommitdiffstats
path: root/xlators/performance/io-threads
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@zresearch.com>2009-04-01 13:58:49 -0700
committerAnand V. Avati <avati@amp.gluster.com>2009-04-02 19:19:11 +0530
commite27f7f344e12d0885a48fcca8dfce36440f5e9e8 (patch)
tree6294b2b9dead48c50996f8a39cf823fa123afca3 /xlators/performance/io-threads
parent42df79e2ad14053f38a12f30b29b81dd897921c9 (diff)
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 <avati@amp.gluster.com>
Diffstat (limited to 'xlators/performance/io-threads')
-rw-r--r--xlators/performance/io-threads/src/io-threads.c59
1 files changed, 33 insertions, 26 deletions
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 = {