os/bluestore: Prune deleted onodes#38499
Conversation
Got rid of OnodeCacheShard pin() and unpin() functions. Moved their validator logic right into Onode put and get functions. Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
|
dropping from my batch as it conflicts with #37496 |
b539044 to
5d86b67
Compare
ifed01
left a comment
There was a problem hiding this comment.
Looks great!
IMO can be improved (in terms of fewer line numbers) a bit as per my comments.
5d86b67 to
70d1e52
Compare
src/os/bluestore/BlueStore.cc
Outdated
|
|
||
| void _rm_pinned(BlueStore::Onode* o) override | ||
| { | ||
| ceph_assert(!o->pinned); |
There was a problem hiding this comment.
Given the function name this assertion looks a bit confusing. May be remove it totally similar to _unpin()?
And rename to _unpin_and_rm()?
Not a big deal though...
There was a problem hiding this comment.
@ifed01 Confusion is bad. I renamed it and deleted assert.
Added logic for erasing onode from onode_map it is last reference and exists==false. Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
…ation When onode.exists == false getting reference and then releasing it might delete it from container. It must not happen during iteration. Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
Just making sure onode does not get deleted. Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
70d1e52 to
01ff70d
Compare
the LRC cluster in sepia is very slow at this moment, so i cannot read the coredump of |
This PR is about cleanup of remains of onodes that are lingering in onode cache after deletion.
When deleting collections large amounts of nodes that are logically deleted
exists == falseeat up space, inflicting cache pressure on existing ones.Now when all reference counters for onode except one in
onode_mapare relinquished, and onode has been deleted, it is removed from cache and fromonode_map.This PR supersedes #38423.