Skip to content

Commit d0724a2

Browse files
committed
osdc: Add SplitOp capability to Objecter
This will provide the ability for Objecter to split up certain ops and distribute them to the OSDs directly if that provides a preformance advantage. This is experimental code and is switched off unless the magic pool flags are enabled. These magic pool flags were pushed in an earlier commit in the same PR. Signed-off-by: Alex Ainscow <[email protected]>
1 parent ee651d1 commit d0724a2

File tree

5 files changed

+727
-1
lines changed

5 files changed

+727
-1
lines changed

src/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -532,6 +532,7 @@ set(libcommon_files
532532
osdc/Striper.cc
533533
osdc/Objecter.cc
534534
osdc/error_code.cc
535+
osdc/SplitOp.cc
535536
librbd/Features.cc
536537
librbd/io/IoOperations.cc
537538
${mds_files})

src/osdc/Objecter.cc

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@
6363

6464
#include "neorados/RADOSImpl.h"
6565

66+
#include "osdc/SplitOp.h"
67+
6668
using std::list;
6769
using std::make_pair;
6870
using std::map;
@@ -2350,7 +2352,12 @@ void Objecter::op_submit(Op *op, ceph_tid_t *ptid, int *ctx_budget)
23502352
if (!ptid)
23512353
ptid = &tid;
23522354
op->trace.event("op submit");
2353-
_op_submit_with_budget(op, rl, ptid, ctx_budget);
2355+
2356+
bool was_split = SplitOp::create(op, *this, rl, ptid, ctx_budget, cct);
2357+
2358+
if (!was_split) {
2359+
_op_submit_with_budget(op, rl, ptid, ctx_budget);
2360+
}
23542361
}
23552362

23562363
void Objecter::_op_submit_with_budget(Op *op,

src/osdc/Objecter.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1691,6 +1691,10 @@ inline std::ostream& operator <<(std::ostream& m, const ObjectOperation& oo) {
16911691
// ----------------
16921692

16931693
class Objecter : public md_config_obs_t, public Dispatcher {
1694+
friend class SplitOp;
1695+
friend class ECSplitOp;
1696+
friend class ReplicaSplitOp;
1697+
16941698
using MOSDOp = _mosdop::MOSDOp<osdc_opvec>;
16951699
public:
16961700
using OpSignature = void(boost::system::error_code);

0 commit comments

Comments
 (0)