Skip to content

Commit

Permalink
Merge branch 'master' into mjmac/DAOS-10028-pool
Browse files Browse the repository at this point in the history
Change-Id: Id09db85bfe2f27ac91d2fdfd6f46935dc9011d47
  • Loading branch information
mjmac committed May 6, 2024
2 parents fcd9fad + bf8fb55 commit 03c76ec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/engine/sched.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* (C) Copyright 2016-2023 Intel Corporation.
* (C) Copyright 2016-2024 Intel Corporation.
*
* SPDX-License-Identifier: BSD-2-Clause-Patent
*/
Expand Down Expand Up @@ -1188,11 +1188,16 @@ policy_fifo_enqueue(struct dss_xstream *dx, struct sched_request *req,

D_ASSERT(attr->sra_type < SCHED_REQ_TYPE_MAX);
/*
* If @sra_enqueue_id is not zero, this is a resent RPC, it will
* be inserted to sorted heap instead of fifo list.
* The initial motivation behind this change is to utilize the heap
* exclusively for sorted resent RPCs and the FIFO list for regular
* fetch and update requests. This strategic allocation aims to avoid
* potential performance impacts that could result from maintaining a
* heap in the critical hot path.
*/
if (attr->sra_enqueue_id)
if (attr->sra_flags & SCHED_REQ_FL_RESENT) {
D_ASSERT(attr->sra_enqueue_id > 0);
return d_binheap_insert(&info->si_heap, &req->sr_node);
}

d_list_add_tail(&req->sr_link, &info->si_fifo_list);

Expand Down Expand Up @@ -1389,6 +1394,8 @@ sched_req_enqueue(struct dss_xstream *dx, struct sched_req_attr *attr,

if (attr->sra_enqueue_id == 0)
attr->sra_enqueue_id = ++info->si_cur_id;
else
attr->sra_flags |= SCHED_REQ_FL_RESENT;

/*
* A RPC flow control mechanism is introduced to avoid RPC timeout when the
Expand Down
1 change: 1 addition & 0 deletions src/include/daos_srv/daos_engine.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,7 @@ enum {
SCHED_REQ_FL_NO_DELAY = (1 << 0),
SCHED_REQ_FL_PERIODIC = (1 << 1),
SCHED_REQ_FL_NO_REJECT = (1 << 2),
SCHED_REQ_FL_RESENT = (1 << 3),
};

struct sched_req_attr {
Expand Down

0 comments on commit 03c76ec

Please sign in to comment.