From 4cbca81b049a45d1dd7220f9f63b2b6f3c81af66 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 3 Apr 2018 21:24:07 -0500 Subject: [PATCH] osd: do not release_reserved_pushes when requeuing Back in 3cc48278bf0ee5c9535d04b60a661f988c50063b we refactoring the sharded wq and incorrectly included code that would release_reserved_pushes for items that were queued and deferred and then woken and put back in the queue. The reserved_pushes are for recovery ops that are in flight in the queue, which includes the priority queue *and* the waiting_for_pg; the code we replaced would release these only when dequeueing an item (or items) for processing (or discard). In master, this code is fixed as part of the peering fast dispatch and OSDShard refactor. Signed-off-by: Sage Weil --- src/osd/OSD.cc | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 0cc42eed5998..905a199638be 100644 --- a/src/osd/OSD.cc +++ b/src/osd/OSD.cc @@ -10255,7 +10255,6 @@ void OSD::ShardedOpWQ::wake_pg_waiters(spg_t pgid) uint32_t shard_index = pgid.hash_to_shard(shard_list.size()); auto sdata = shard_list[shard_index]; bool queued = false; - unsigned pushes_to_free = 0; { Mutex::Locker l(sdata->sdata_op_ordering_lock); auto p = sdata->pg_slots.find(pgid); @@ -10268,18 +10267,12 @@ void OSD::ShardedOpWQ::wake_pg_waiters(spg_t pgid) ++i) { sdata->_enqueue_front(make_pair(pgid, *i), osd->op_prio_cutoff); } - for (auto& q : p->second.to_process) { - pushes_to_free += q.get_reserved_pushes(); - } p->second.to_process.clear(); p->second.waiting_for_pg = false; ++p->second.requeue_seq; queued = true; } } - if (pushes_to_free > 0) { - osd->service.release_reserved_pushes(pushes_to_free); - } if (queued) { sdata->sdata_lock.Lock(); sdata->sdata_cond.SignalOne(); -- 2.47.3