diff options
author | Yehuda Sadeh <yehuda@hq.newdream.net> | 2010-02-03 14:00:26 -0500 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2010-02-11 14:48:48 -0500 |
commit | f5a2041bd96c9f05ff10172b9c814c14f247084e (patch) | |
tree | 3c9c47169fa5ad2ec52d278f10d9d2de2237accf /fs/ceph/osd_client.h | |
parent | b056c8769d1da6a6a80ce780a4b8957b70434a41 (diff) |
ceph: put unused osd connections on lru
Instead of removing osd connection immediately when the
requests list is empty, put the osd connection on an lru.
Only if that osd has not been used for more than a specified
time, will it be removed.
Signed-off-by: Yehuda Sadeh <yehuda@hq.newdream.net>
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/osd_client.h')
-rw-r--r-- | fs/ceph/osd_client.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ceph/osd_client.h b/fs/ceph/osd_client.h index 8d533d9406ff..70f31b61f02c 100644 --- a/fs/ceph/osd_client.h +++ b/fs/ceph/osd_client.h | |||
@@ -31,9 +31,11 @@ struct ceph_osd { | |||
31 | struct rb_node o_node; | 31 | struct rb_node o_node; |
32 | struct ceph_connection o_con; | 32 | struct ceph_connection o_con; |
33 | struct list_head o_requests; | 33 | struct list_head o_requests; |
34 | struct list_head o_osd_lru; | ||
34 | struct ceph_authorizer *o_authorizer; | 35 | struct ceph_authorizer *o_authorizer; |
35 | void *o_authorizer_buf, *o_authorizer_reply_buf; | 36 | void *o_authorizer_buf, *o_authorizer_reply_buf; |
36 | size_t o_authorizer_buf_len, o_authorizer_reply_buf_len; | 37 | size_t o_authorizer_buf_len, o_authorizer_reply_buf_len; |
38 | unsigned long lru_ttl; | ||
37 | }; | 39 | }; |
38 | 40 | ||
39 | /* an in-flight request */ | 41 | /* an in-flight request */ |
@@ -90,11 +92,13 @@ struct ceph_osd_client { | |||
90 | 92 | ||
91 | struct mutex request_mutex; | 93 | struct mutex request_mutex; |
92 | struct rb_root osds; /* osds */ | 94 | struct rb_root osds; /* osds */ |
95 | struct list_head osd_lru; /* idle osds */ | ||
93 | u64 timeout_tid; /* tid of timeout triggering rq */ | 96 | u64 timeout_tid; /* tid of timeout triggering rq */ |
94 | u64 last_tid; /* tid of last request */ | 97 | u64 last_tid; /* tid of last request */ |
95 | struct rb_root requests; /* pending requests */ | 98 | struct rb_root requests; /* pending requests */ |
96 | int num_requests; | 99 | int num_requests; |
97 | struct delayed_work timeout_work; | 100 | struct delayed_work timeout_work; |
101 | struct delayed_work osds_timeout_work; | ||
98 | #ifdef CONFIG_DEBUG_FS | 102 | #ifdef CONFIG_DEBUG_FS |
99 | struct dentry *debugfs_file; | 103 | struct dentry *debugfs_file; |
100 | #endif | 104 | #endif |