MCPcopy Create free account
hub / github.com/ceph/ceph / preempt_one

Method preempt_one

src/common/AsyncReserver.h:65–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

63 std::set<std::pair<unsigned,T>> preempt_by_prio; ///< in_progress that can be preempted
64
65 void preempt_one() {
66 ceph_assert(!preempt_by_prio.empty());
67 auto q = in_progress.find(preempt_by_prio.begin()->second);
68 ceph_assert(q != in_progress.end());
69 Reservation victim = q->second;
70 rdout(10) << __func__ << " preempt " << victim << dendl;
71 f->queue(victim.preempt);
72 victim.preempt = nullptr;
73 in_progress.erase(q);
74 preempt_by_prio.erase(preempt_by_prio.begin());
75 }
76
77 void do_queues() {
78 rdout(20) << __func__ << ":\n";

Callers

nothing calls this directly

Calls 6

emptyMethod · 0.45
findMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
queueMethod · 0.45
eraseMethod · 0.45

Tested by

no test coverage detected