ceph/src/osd/mClockOpClassQueue.cc
J. Eric Ivancich 729cb600ac osd: replace mclock subop opclass w/ rep_op opclass; combine duplicated code
The OSD subops were replaced with replication ops (i.e., MSG_OSD_REPOP
and MSG_OSD_REPOPREPLY) in jewel. mClock incorrectly used them as an
op class rather than the newer replication ops. This fixes that and
places eight ops into the repop class -- MSG_OSD_REPOP,
MSG_OSD_REPOPREPLY, MSG_OSD_PG_UPDATE_LOG_MISSING,
MSG_OSD_PG_UPDATE_LOG_MISSING_REPLY, MSG_OSD_EC_WRITE,
MSG_OSD_EC_WRITE_REPLY, MSG_OSD_EC_READ, and MSG_OSD_EC_READ_REPLY.

This alo removes dupliated code related to op classes in
mClockOpClassQueue and mClockClientQueue and combines into
mClockOpClassSupport.

The three configuration options
osd_op_queue_mclock_osd_subop_{res,wgt,lim} have also been replaced
with osd_op_queue_mclock_osd_rep_op_{res,wgt,lim}.

This also removes OpQueueItem::OpQueueable::op_type_t::osd_subop since
it's not a category core ceph recognizes and is instead it's part of
an mclock view of ops.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
2017-10-23 09:25:32 -04:00

54 lines
1.2 KiB
C++

// -*- 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) 2016 Red Hat Inc.
*
* 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.
*
*/
#include <memory>
#include "osd/mClockOpClassQueue.h"
#include "common/dout.h"
namespace dmc = crimson::dmclock;
using namespace std::placeholders;
#define dout_context cct
#define dout_subsys ceph_subsys_osd
#undef dout_prefix
#define dout_prefix *_dout
namespace ceph {
/*
* class mClockOpClassQueue
*/
mClockOpClassQueue::mClockOpClassQueue(CephContext *cct) :
queue(std::bind(&mClockOpClassQueue::op_class_client_info_f, this, _1)),
client_info_mgr(cct)
{
// empty
}
const dmc::ClientInfo* mClockOpClassQueue::op_class_client_info_f(
const osd_op_type_t& op_type)
{
return client_info_mgr.get_client_info(op_type);
}
// Formatted output of the queue
void mClockOpClassQueue::dump(ceph::Formatter *f) const {
queue.dump(f);
}
} // namespace ceph