From c0153ca2243be1c1134f174c6cb83a3db2da0148 Mon Sep 17 00:00:00 2001 From: "J. Eric Ivancich" Date: Tue, 10 Apr 2018 14:28:39 -0400 Subject: [PATCH] osd: Revert use of dmclock message feature bit since not yet finalized Because the updated use of dmclock is not yet finalized and the unfinished functionality uses a valuable messaging feature bit that we don't want to waste, we're removing it for the mimic release and from master. Reverts most of the following commits for mimic: de8110ebb39401d3e09cb871f843776421ccd56f 739d7e462f3a03c4e188fcfa48eb05c0063970c9 2361e9c790306e789393323ef349d8b4a20bc70d 9b702cf8fc2ff881ca16edc78874f2118a2e4641 Signed-off-by: J. Eric Ivancich --- src/CMakeLists.txt | 2 -- src/common/legacy_config_opts.h | 1 - src/common/mClockCommon.h | 50 --------------------------- src/common/mClockPriorityQueue.h | 33 ------------------ src/common/options.cc | 6 ---- src/include/ceph_features.h | 2 -- src/messages/MOSDOp.h | 27 +++------------ src/messages/MOSDOpReply.h | 21 +++-------- src/osd/OSD.cc | 3 +- src/osd/OpQueueItem.h | 15 +------- src/osd/OpRequest.cc | 3 +- src/osd/OpRequest.h | 2 -- src/osd/PrimaryLogPG.cc | 20 +++++------ src/osd/mClockClientQueue.cc | 11 ++---- src/osdc/CMakeLists.txt | 1 - src/osdc/Objecter.cc | 23 ------------ src/osdc/Objecter.h | 12 +------ src/test/osd/TestMClockClientQueue.cc | 34 ------------------ 18 files changed, 24 insertions(+), 242 deletions(-) delete mode 100644 src/common/mClockCommon.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 2bf655c7d1e..315777e72ee 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -532,8 +532,6 @@ set(libcommon_files common/Cycles.cc common/scrub_types.cc common/bit_str.cc - dmclock/src/dmclock_util.cc - dmclock/support/src/run_every.cc osdc/Striper.cc osdc/Objecter.cc common/Graylog.cc diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index f79ddc1ad04..69fbc51c193 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -385,7 +385,6 @@ OPTION(objecter_completion_locks_per_session, OPT_U64) // num of completion lock OPTION(objecter_inject_no_watch_ping, OPT_BOOL) // suppress watch pings OPTION(objecter_retry_writes_after_first_reply, OPT_BOOL) // ignore the first reply for each write, and resend the osd op instead OPTION(objecter_debug_inject_relock_delay, OPT_BOOL) -OPTION(objecter_mclock_service_tracker, OPT_BOOL) // Max number of deletes at once in a single Filer::purge call OPTION(filer_max_purge_ops, OPT_U32) diff --git a/src/common/mClockCommon.h b/src/common/mClockCommon.h deleted file mode 100644 index 7904cd8cef1..00000000000 --- a/src/common/mClockCommon.h +++ /dev/null @@ -1,50 +0,0 @@ -// -*- mode:C++; tab-width:8; c-basic-offset:2; indent-tabs-mode:t -*- -// vim: ts=8 sw=2 smarttab -/* - * Ceph - scalable distributed file system - * - * Copyright (C) 2017 SK Telecom - * - * This is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License version 2.1, as published by the Free Software - * Foundation. See file COPYING. - * - */ - -#pragma once - -#include -#include "include/encoding.h" -#include "dmclock/src/dmclock_recs.h" - -// the following is done to unclobber _ASSERT_H so it returns to the -// way ceph likes it -#include "include/assert.h" - - -namespace ceph { -namespace dmc = ::crimson::dmclock; -} - -namespace crimson { -namespace dmclock { - -WRITE_RAW_ENCODER(ReqParams) - -inline void encode(const PhaseType &phase, bufferlist& bl, - uint64_t features=0) -{ - using ceph::encode; - encode(static_cast(phase), bl); -} - -inline void decode(PhaseType &phase, bufferlist::iterator& p) -{ - using ceph::decode; - std::uint8_t int_phase; - decode((std::uint8_t&)int_phase, p); - phase = static_cast(int_phase); -} -} -} diff --git a/src/common/mClockPriorityQueue.h b/src/common/mClockPriorityQueue.h index 124273b398b..6a24dfcb9a2 100644 --- a/src/common/mClockPriorityQueue.h +++ b/src/common/mClockPriorityQueue.h @@ -39,7 +39,6 @@ namespace ceph { using priority_t = unsigned; using cost_t = unsigned; - using Retn = std::pair; typedef std::list > ListPairs; @@ -311,12 +310,6 @@ namespace ceph { queue.add_request(std::move(item), cl, cost); } - void enqueue_distributed(K cl, unsigned priority, unsigned cost, T&& item, - const dmc::ReqParams& req_params) { - // priority is ignored - queue.add_request(std::move(item), cl, req_params, cost); - } - void enqueue_front(K cl, unsigned priority, unsigned cost, @@ -352,32 +345,6 @@ namespace ceph { return std::move(*(retn.request)); } - Retn dequeue_distributed() { - assert(!empty()); - dmc::PhaseType resp_params = dmc::PhaseType(); - - if (!high_queue.empty()) { - T ret = std::move(high_queue.rbegin()->second.front().second); - high_queue.rbegin()->second.pop_front(); - if (high_queue.rbegin()->second.empty()) { - high_queue.erase(high_queue.rbegin()->first); - } - return std::make_pair(std::move(ret), resp_params); - } - - if (!queue_front.empty()) { - T ret = std::move(queue_front.front().second); - queue_front.pop_front(); - return std::make_pair(std::move(ret), resp_params); - } - - auto pr = queue.pull_request(); - assert(pr.is_retn()); - auto& retn = pr.get_retn(); - resp_params = retn.phase; - return std::make_pair(std::move(*(retn.request)), resp_params); - } - void dump(ceph::Formatter *f) const override final { f->open_array_section("high_queues"); for (typename SubQueues::const_iterator p = high_queue.begin(); diff --git a/src/common/options.cc b/src/common/options.cc index fb6914d0dda..c66b3427721 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -1904,12 +1904,6 @@ std::vector