Skip to content

os/bluestore: Onode reference counting refactor, prune deleted onodes#38423

Closed
aclamk wants to merge 5 commits intoceph:masterfrom
aclamk:wip-bs-onode-ref-xchg
Closed

os/bluestore: Onode reference counting refactor, prune deleted onodes#38423
aclamk wants to merge 5 commits intoceph:masterfrom
aclamk:wip-bs-onode-ref-xchg

Conversation

@aclamk
Copy link
Contributor

@aclamk aclamk commented Dec 3, 2020

This PR modifies handling of state changes in Onode, as reflected by nref change.
Now it consists of 2 parts - atomic modification of counter and update of Onode state under lock.

As result it was possible to make easy modification to prune deleted onodes (exists == false) from onode_map.

This PR is necessary for work on Onode memory regions.

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>
@aclamk aclamk requested review from ifed01 and jdurgin December 3, 2020 11:59
@github-actions github-actions bot added the core label Dec 3, 2020
@tchaikov tchaikov changed the title Onode reference counting refactor, prune deleted onodes os/bluestore: Onode reference counting refactor, prune deleted onodes Dec 4, 2020
Modified Onode ref counting to make clear state transitions.
It makes it viable to introduce additional states.

Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
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>
@aclamk aclamk force-pushed the wip-bs-onode-ref-xchg branch from 86f9421 to c30142e Compare December 4, 2020 13:14
@tchaikov
Copy link
Contributor

tchaikov commented Dec 5, 2020

i suspect that this PR caused the issues reported by valgrind. see /a/kchai-2020-12-05_02:16:41-rados-wip-kefu-testing-2020-12-04-1516-distro-basic-smithi/5681129$ zless remote/*/log/valgrind/osd.1.log.gz

for more instances, see https://pulpito.ceph.com/kchai-2020-12-05_02:16:41-rados-wip-kefu-testing-2020-12-04-1516-distro-basic-smithi/

@aclamk
Copy link
Contributor Author

aclamk commented Dec 9, 2020

Xchg logic is broken.
Remaining logic is moved to #38499

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants