From: Sage Weil Date: Wed, 4 Apr 2018 02:24:07 +0000 (-0500) Subject: osd: do not release_reserved_pushes when requeuing X-Git-Tag: v12.2.5~34^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F21229%2Fhead;p=ceph.git 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 --- diff --git a/src/osd/OSD.cc b/src/osd/OSD.cc index 0cc42eed599..905a199638b 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();