summaryrefslogtreecommitdiffstats
path: root/include/linux/ceph
diff options
context:
space:
mode:
authorIlya Dryomov <ilya.dryomov@inktank.com>2014-01-31 17:54:26 +0200
committerYan, Zheng <zheng.z.yan@intel.com>2014-04-03 10:33:50 +0800
commit9d521470a40f16110bd31018034155c60c1a1275 (patch)
tree0dd56756c47839cd9605262ddca0f91c12c07c67 /include/linux/ceph
parent455c6fdbd219161bd09b1165f11699d6d73de11c (diff)
downloadop-kernel-dev-9d521470a40f16110bd31018034155c60c1a1275.zip
op-kernel-dev-9d521470a40f16110bd31018034155c60c1a1275.tar.gz
libceph: a per-osdc crush scratch buffer
With the addition of erasure coding support in the future, scratch variable-length array in crush_do_rule_ary() is going to grow to at least 200 bytes on average, on top of another 128 bytes consumed by rawosd/osd arrays in the call chain. Replace it with a buffer inside struct osdmap and a mutex. This shouldn't result in any contention, because all osd requests were already serialized by request_mutex at that point; the only unlocked caller was ceph_ioctl_get_dataloc(). Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'include/linux/ceph')
-rw-r--r--include/linux/ceph/osdmap.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/ceph/osdmap.h b/include/linux/ceph/osdmap.h
index 49ff69f..8c8b3ce 100644
--- a/include/linux/ceph/osdmap.h
+++ b/include/linux/ceph/osdmap.h
@@ -84,6 +84,9 @@ struct ceph_osdmap {
/* the CRUSH map specifies the mapping of placement groups to
* the list of osds that store+replicate them. */
struct crush_map *crush;
+
+ struct mutex crush_scratch_mutex;
+ int crush_scratch_ary[CEPH_PG_MAX_SIZE * 3];
};
static inline void ceph_oid_set_name(struct ceph_object_id *oid,
OpenPOWER on IntegriCloud