mirror of
https://github.com/ceph/ceph
synced 2024-12-29 15:03:33 +00:00
osd: Include the dmclock request parameters when the op is enqueued
on mclock queue. Signed-off-by: Byungsu Park <bspark8@sk.com>
This commit is contained in:
parent
2361e9c790
commit
739d7e462f
@ -309,6 +309,12 @@ 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,
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include "include/utime.h"
|
||||
#include "osd/OpRequest.h"
|
||||
#include "osd/PG.h"
|
||||
#include "common/mClockCommon.h"
|
||||
#include "messages/MOSDOp.h"
|
||||
|
||||
|
||||
class OSD;
|
||||
@ -73,6 +75,7 @@ public:
|
||||
private:
|
||||
OpQueueable::Ref qitem;
|
||||
int cost;
|
||||
dmc::ReqParams qos_params;
|
||||
unsigned priority;
|
||||
utime_t start_time;
|
||||
uint64_t owner; ///< global id (e.g., client.XXX)
|
||||
@ -92,7 +95,15 @@ public:
|
||||
start_time(start_time),
|
||||
owner(owner),
|
||||
map_epoch(e)
|
||||
{}
|
||||
{
|
||||
if (auto op = maybe_get_op()) {
|
||||
auto req = (*op)->get_req();
|
||||
if (req->get_type() == CEPH_MSG_OSD_OP) {
|
||||
const MOSDOp *m = static_cast<const MOSDOp*>(req);
|
||||
qos_params = m->get_qos_params();
|
||||
}
|
||||
}
|
||||
}
|
||||
OpQueueItem(OpQueueItem &&) = default;
|
||||
OpQueueItem(const OpQueueItem &) = delete;
|
||||
OpQueueItem &operator=(OpQueueItem &&) = default;
|
||||
@ -125,6 +136,8 @@ public:
|
||||
utime_t get_start_time() const { return start_time; }
|
||||
uint64_t get_owner() const { return owner; }
|
||||
epoch_t get_map_epoch() const { return map_epoch; }
|
||||
dmc::ReqParams get_qos_params() const { return qos_params; }
|
||||
void set_qos_params(dmc::ReqParams qparams) { qos_params = qparams; }
|
||||
|
||||
friend ostream& operator<<(ostream& out, const OpQueueItem& item) {
|
||||
return out << "OpQueueItem("
|
||||
|
@ -77,8 +77,9 @@ namespace ceph {
|
||||
unsigned priority,
|
||||
unsigned cost,
|
||||
Request&& item) {
|
||||
queue.enqueue(get_inner_client(cl, item), priority, cost,
|
||||
std::move(item));
|
||||
auto qos_params = item.get_qos_params();
|
||||
queue.enqueue_distributed(get_inner_client(cl, item), priority, cost,
|
||||
std::move(item), qos_params);
|
||||
}
|
||||
|
||||
// Enqueue the op in the front of the regular queue
|
||||
|
Loading…
Reference in New Issue
Block a user