From cc9a9142fd41ee5c98792c6f6d2e550410fba549 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sun, 17 Mar 2019 08:06:18 -0500 Subject: [PATCH] msg: remove XioMessenger There is a lot of good stuff going on here, but nobody is investing in xio and it is not expected to be the path forward for RDMA. If that ever changes, we can resurrect the code. Until then, let's clean up the tree and reduce friction for changes going forward. Signed-off-by: Sage Weil --- CMakeLists.txt | 6 - cmake/modules/Findxio.cmake | 24 - qa/suites/perf-basic/settings/optimized.yaml | 1 - qa/suites/rados/perf/settings/optimized.yaml | 1 - qa/workunits/mon/config.sh | 68 +- src/CMakeLists.txt | 5 - src/common/buffer.cc | 57 - src/common/legacy_config_opts.h | 15 - src/common/options.cc | 57 - src/common/subsys.h | 1 - src/include/buffer.h | 14 - src/messages/MDataPing.h | 92 -- src/msg/CMakeLists.txt | 9 - src/msg/Message.cc | 6 - src/msg/Message.h | 3 +- src/msg/MessageRef.h | 1 - src/msg/Messenger.cc | 8 - src/msg/QueueStrategy.cc | 2 +- src/msg/xio/XioConnection.cc | 858 ------------- src/msg/xio/XioConnection.h | 380 ------ src/msg/xio/XioInSeq.h | 84 -- src/msg/xio/XioMessenger.cc | 1136 ------------------ src/msg/xio/XioMessenger.h | 176 --- src/msg/xio/XioMsg.cc | 51 - src/msg/xio/XioMsg.h | 446 ------- src/msg/xio/XioPool.cc | 41 - src/msg/xio/XioPool.h | 218 ---- src/msg/xio/XioPortal.cc | 98 -- src/msg/xio/XioPortal.h | 458 ------- src/msg/xio/XioSubmit.h | 58 - src/test/CMakeLists.txt | 1 - src/test/messenger/CMakeLists.txt | 43 - src/test/messenger/message_helper.h | 135 --- src/test/messenger/simple_client.cc | 160 --- src/test/messenger/simple_dispatcher.cc | 85 -- src/test/messenger/simple_dispatcher.h | 104 -- src/test/messenger/simple_server.cc | 107 -- src/test/messenger/xio_client.cc | 189 --- src/test/messenger/xio_dispatcher.cc | 76 -- src/test/messenger/xio_dispatcher.h | 102 -- src/test/messenger/xio_server.cc | 122 -- src/test/objectstore/CMakeLists.txt | 2 +- src/tools/ceph-dencoder/types.h | 3 - 43 files changed, 37 insertions(+), 5466 deletions(-) delete mode 100644 cmake/modules/Findxio.cmake delete mode 100644 src/messages/MDataPing.h delete mode 100644 src/msg/xio/XioConnection.cc delete mode 100644 src/msg/xio/XioConnection.h delete mode 100644 src/msg/xio/XioInSeq.h delete mode 100644 src/msg/xio/XioMessenger.cc delete mode 100644 src/msg/xio/XioMessenger.h delete mode 100644 src/msg/xio/XioMsg.cc delete mode 100644 src/msg/xio/XioMsg.h delete mode 100644 src/msg/xio/XioPool.cc delete mode 100644 src/msg/xio/XioPool.h delete mode 100644 src/msg/xio/XioPortal.cc delete mode 100644 src/msg/xio/XioPortal.h delete mode 100644 src/msg/xio/XioSubmit.h delete mode 100644 src/test/messenger/CMakeLists.txt delete mode 100644 src/test/messenger/message_helper.h delete mode 100644 src/test/messenger/simple_client.cc delete mode 100644 src/test/messenger/simple_dispatcher.cc delete mode 100644 src/test/messenger/simple_dispatcher.h delete mode 100644 src/test/messenger/simple_server.cc delete mode 100644 src/test/messenger/xio_client.cc delete mode 100644 src/test/messenger/xio_dispatcher.cc delete mode 100644 src/test/messenger/xio_dispatcher.h delete mode 100644 src/test/messenger/xio_server.cc diff --git a/CMakeLists.txt b/CMakeLists.txt index 6c392af176dd..a75cd74326f9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -403,12 +403,6 @@ set(USE_NSS 1) set(USE_OPENSSL 1) set(CRYPTO_LIBS ${NSS_LIBRARIES} ${NSPR_LIBRARIES} OpenSSL::Crypto) -option(WITH_XIO "Enable XIO messaging" OFF) -if(WITH_XIO) - find_package(xio REQUIRED) - set(HAVE_XIO ${XIO_FOUND}) -endif() - option(WITH_DPDK "Enable DPDK messaging" OFF) if(WITH_DPDK) find_package(dpdk) diff --git a/cmake/modules/Findxio.cmake b/cmake/modules/Findxio.cmake deleted file mode 100644 index 938af03efb8e..000000000000 --- a/cmake/modules/Findxio.cmake +++ /dev/null @@ -1,24 +0,0 @@ -# - Find libxio -# Find libxio transport library -# -# XIO_INCLUDE_DIR - libxio include dir -# XIO_LIBRARIES - List of libraries -# XIO_FOUND - True if libxio found. - -if(WITH_XIO AND EXISTS ${WITH_XIO}) - find_path(XIO_INCLUDE_DIR libxio.h HINTS "${WITH_XIO}/include") - find_library(XIO_LIBRARY xio HINTS "${WITH_XIO}/lib") -else() - find_path(XIO_INCLUDE_DIR libxio.h) - find_library(XIO_LIBRARY xio) -endif() - -set(XIO_LIBRARIES ${XIO_LIBRARY}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(xio DEFAULT_MSG XIO_LIBRARY XIO_INCLUDE_DIR) - -mark_as_advanced( - XIO_LIBRARY - XIO_INCLUDE_DIR - ) diff --git a/qa/suites/perf-basic/settings/optimized.yaml b/qa/suites/perf-basic/settings/optimized.yaml index fffb9be5e6c8..9e0ebbd45124 100644 --- a/qa/suites/perf-basic/settings/optimized.yaml +++ b/qa/suites/perf-basic/settings/optimized.yaml @@ -63,7 +63,6 @@ overrides: debug asok: "0/0" debug throttle: "0/0" debug refs: "0/0" - debug xio: "0/0" debug compressor: "0/0" debug bluestore: "0/0" debug bluefs: "0/0" diff --git a/qa/suites/rados/perf/settings/optimized.yaml b/qa/suites/rados/perf/settings/optimized.yaml index 5ebcb3aeb4aa..3a7db65c423d 100644 --- a/qa/suites/rados/perf/settings/optimized.yaml +++ b/qa/suites/rados/perf/settings/optimized.yaml @@ -59,7 +59,6 @@ overrides: debug asok: "0/0" debug throttle: "0/0" debug refs: "0/0" - debug xio: "0/0" debug compressor: "0/0" debug bluestore: "0/0" debug bluefs: "0/0" diff --git a/qa/workunits/mon/config.sh b/qa/workunits/mon/config.sh index d97106a4a141..29d22f9329a4 100755 --- a/qa/workunits/mon/config.sh +++ b/qa/workunits/mon/config.sh @@ -9,13 +9,13 @@ function expect_false() ceph config dump # value validation -ceph config set mon.a debug_xio 22 -ceph config set mon.a debug_xio 22/33 -ceph config get mon.a debug_xio | grep 22 -ceph config set mon.a debug_xio 1/2 -expect_false bin/ceph config set mon.a debug_xio foo -expect_false bin/ceph config set mon.a debug_xio -10 -ceph config rm mon.a debug_xio +ceph config set mon.a debug_asok 22 +ceph config set mon.a debug_asok 22/33 +ceph config get mon.a debug_asok | grep 22 +ceph config set mon.a debug_asok 1/2 +expect_false bin/ceph config set mon.a debug_asok foo +expect_false bin/ceph config set mon.a debug_asok -10 +ceph config rm mon.a debug_asok ceph config set global log_graylog_port 123 expect_false ceph config set global log_graylog_port asdf @@ -40,48 +40,48 @@ ceph config set mon.a osd_pool_default_type replicated ceph config rm mon.a osd_pool_default_type # scoping -ceph config set global debug_xio 33 -ceph config get mon.a debug_xio | grep 33 -ceph config set mon debug_xio 11 -ceph config get mon.a debug_xio | grep 11 -ceph config set mon.a debug_xio 22 -ceph config get mon.a debug_xio | grep 22 -ceph config rm mon.a debug_xio -ceph config get mon.a debug_xio | grep 11 -ceph config rm mon debug_xio -ceph config get mon.a debug_xio | grep 33 -ceph config rm global debug_xio +ceph config set global debug_asok 33 +ceph config get mon.a debug_asok | grep 33 +ceph config set mon debug_asok 11 +ceph config get mon.a debug_asok | grep 11 +ceph config set mon.a debug_asok 22 +ceph config get mon.a debug_asok | grep 22 +ceph config rm mon.a debug_asok +ceph config get mon.a debug_asok | grep 11 +ceph config rm mon debug_asok +ceph config get mon.a debug_asok | grep 33 +ceph config rm global debug_asok # help -ceph config help debug_xio | grep debug_xio +ceph config help debug_asok | grep debug_asok # show -ceph config set osd.0 debug_xio 33 -while ! ceph config show osd.0 | grep debug_xio | grep 33 | grep mon +ceph config set osd.0 debug_asok 33 +while ! ceph config show osd.0 | grep debug_asok | grep 33 | grep mon do sleep 1 done -ceph config set osd.0 debug_xio 22 -while ! ceph config show osd.0 | grep debug_xio | grep 22 | grep mon +ceph config set osd.0 debug_asok 22 +while ! ceph config show osd.0 | grep debug_asok | grep 22 | grep mon do sleep 1 done -ceph tell osd.0 config set debug_xio 99 -while ! ceph config show osd.0 | grep debug_xio | grep 99 +ceph tell osd.0 config set debug_asok 99 +while ! ceph config show osd.0 | grep debug_asok | grep 99 do sleep 1 done -ceph config show osd.0 | grep debug_xio | grep 'override mon' -ceph tell osd.0 config unset debug_xio -ceph tell osd.0 config unset debug_xio +ceph config show osd.0 | grep debug_asok | grep 'override mon' +ceph tell osd.0 config unset debug_asok +ceph tell osd.0 config unset debug_asok -ceph config rm osd.0 debug_xio -while ceph config show osd.0 | grep debug_xio | grep mon +ceph config rm osd.0 debug_asok +while ceph config show osd.0 | grep debug_asok | grep mon do sleep 1 done -ceph config show osd.0 | grep -c debug_xio | grep 0 +ceph config show osd.0 | grep -c debug_asok | grep 0 ceph config set osd.0 osd_data testorama while ! ceph config show osd.0 | grep osd_data | grep mon @@ -91,7 +91,7 @@ done ceph config rm osd.0 osd_data # show-with-defaults -ceph config show-with-defaults osd.0 | grep debug_xio +ceph config show-with-defaults osd.0 | grep debug_asok # assimilate t1=`mktemp` @@ -99,12 +99,12 @@ t2=`mktemp` cat < $t1 [osd.0] keyring = foo -debug_xio = 66 +debug_asok = 66 EOF ceph config assimilate-conf -i $t1 | tee $t2 grep keyring $t2 -expect_false grep debug_xio $t2 +expect_false grep debug_asok $t2 rm -f $t1 $t2 echo OK diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 1b1f19d464e0..3d1be8b0f17b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -237,11 +237,6 @@ else() set(PY_BINDING_INFIX 3) endif() -if(HAVE_XIO) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I${XIO_INCLUDE_DIR}") - list(APPEND EXTRALIBS ${XIO_LIBRARY} pthread) -endif(HAVE_XIO) - # sort out which allocator to use if(ALLOCATOR STREQUAL "tcmalloc") set(ALLOC_LIBS gperftools::tcmalloc) diff --git a/src/common/buffer.cc b/src/common/buffer.cc index a3c6201d208a..e6f38998f7b6 100644 --- a/src/common/buffer.cc +++ b/src/common/buffer.cc @@ -35,10 +35,6 @@ #include "include/spinlock.h" #include "include/scope_guard.h" -#if defined(HAVE_XIO) -#include "msg/xio/XioMsg.h" -#endif - using namespace ceph; #define CEPH_BUFFER_ALLOC_UNIT 4096u @@ -308,59 +304,6 @@ static ceph::spinlock debug_lock; } }; -#if defined(HAVE_XIO) - class buffer::xio_msg_buffer : public buffer::raw { - private: - XioDispatchHook* m_hook; - public: - xio_msg_buffer(XioDispatchHook* _m_hook, const char *d, - unsigned l) : - raw((char*)d, l), m_hook(_m_hook->get()) {} - - bool is_shareable() const override { return false; } - static void operator delete(void *p) - { - xio_msg_buffer *buf = static_cast(p); - // return hook ref (counts against pool); it appears illegal - // to do this in our dtor, because this fires after that - buf->m_hook->put(); - } - raw* clone_empty() { - return new buffer::raw_char(len); - } - }; - - class buffer::xio_mempool : public buffer::raw { - public: - struct xio_reg_mem *mp; - xio_mempool(struct xio_reg_mem *_mp, unsigned l) : - raw((char*)_mp->addr, l), mp(_mp) - { } - ~xio_mempool() {} - raw* clone_empty() { - return new buffer::raw_char(len); - } - }; - - struct xio_reg_mem* get_xio_mp(const buffer::ptr& bp) - { - buffer::xio_mempool *mb = dynamic_cast(bp.get_raw()); - if (mb) { - return mb->mp; - } - return NULL; - } - - buffer::raw* buffer::create_msg( - unsigned len, char *buf, XioDispatchHook* m_hook) { - XioPool& pool = m_hook->get_pool(); - buffer::raw* bp = - static_cast(pool.alloc(sizeof(xio_msg_buffer))); - new (bp) xio_msg_buffer(m_hook, buf, len); - return bp; - } -#endif /* HAVE_XIO */ - ceph::unique_leakable_ptr buffer::copy(const char *c, unsigned len) { auto r = buffer::create_aligned(len, sizeof(size_t)); memcpy(r->data, c, len); diff --git a/src/common/legacy_config_opts.h b/src/common/legacy_config_opts.h index e3b33e901ffb..22265feb6314 100644 --- a/src/common/legacy_config_opts.h +++ b/src/common/legacy_config_opts.h @@ -77,21 +77,6 @@ OPTION(enable_experimental_unrecoverable_data_corrupting_features, OPT_STR) SAFE_OPTION(plugin_dir, OPT_STR) -OPTION(xio_trace_mempool, OPT_BOOL) // mempool allocation counters -OPTION(xio_trace_msgcnt, OPT_BOOL) // incoming/outgoing msg counters -OPTION(xio_trace_xcon, OPT_BOOL) // Xio message encode/decode trace -OPTION(xio_queue_depth, OPT_INT) // depth of Accelio msg queue -OPTION(xio_mp_min, OPT_INT) // default min mempool size -OPTION(xio_mp_max_64, OPT_INT) // max 64-byte chunks (buffer is 40) -OPTION(xio_mp_max_256, OPT_INT) // max 256-byte chunks -OPTION(xio_mp_max_1k, OPT_INT) // max 1K chunks -OPTION(xio_mp_max_page, OPT_INT) // max 1K chunks -OPTION(xio_mp_max_hint, OPT_INT) // max size-hint chunks -OPTION(xio_portal_threads, OPT_INT) // xio portal threads per messenger -OPTION(xio_max_conns_per_portal, OPT_INT) // max xio_connections per portal/ctx -OPTION(xio_transport_type, OPT_STR) // xio transport type: {rdma or tcp} -OPTION(xio_max_send_inline, OPT_INT) // xio maximum threshold to send inline - OPTION(compressor_zlib_isal, OPT_BOOL) OPTION(compressor_zlib_level, OPT_INT) //regular zlib compression level, not applicable to isa-l optimized version diff --git a/src/common/options.cc b/src/common/options.cc index d8a06e27d56d..452a5206e876 100644 --- a/src/common/options.cc +++ b/src/common/options.cc @@ -695,63 +695,6 @@ std::vector