diff options
| author | Ilya Dryomov <ilya.dryomov@inktank.com> | 2014-01-31 10:54:26 -0500 |
|---|---|---|
| committer | Yan, Zheng <zheng.z.yan@intel.com> | 2014-04-02 22:33:50 -0400 |
| commit | 9d521470a40f16110bd31018034155c60c1a1275 (patch) | |
| tree | 0dd56756c47839cd9605262ddca0f91c12c07c67 /include/linux/ceph | |
| parent | 455c6fdbd219161bd09b1165f11699d6d73de11c (diff) | |
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.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/ceph/osdmap.h b/include/linux/ceph/osdmap.h index 49ff69f0746b..8c8b3cefc28b 100644 --- a/include/linux/ceph/osdmap.h +++ b/include/linux/ceph/osdmap.h | |||
| @@ -84,6 +84,9 @@ struct ceph_osdmap { | |||
| 84 | /* the CRUSH map specifies the mapping of placement groups to | 84 | /* the CRUSH map specifies the mapping of placement groups to |
| 85 | * the list of osds that store+replicate them. */ | 85 | * the list of osds that store+replicate them. */ |
| 86 | struct crush_map *crush; | 86 | struct crush_map *crush; |
| 87 | |||
| 88 | struct mutex crush_scratch_mutex; | ||
| 89 | int crush_scratch_ary[CEPH_PG_MAX_SIZE * 3]; | ||
| 87 | }; | 90 | }; |
| 88 | 91 | ||
| 89 | static inline void ceph_oid_set_name(struct ceph_object_id *oid, | 92 | static inline void ceph_oid_set_name(struct ceph_object_id *oid, |
