Page MenuHomeFreeBSD

Ignore object->handle for OBJ_ANON objects.
ClosedPublic

Authored by kib on Nov 20 2019, 7:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 24, 8:11 AM
Unknown Object (File)
Sat, Nov 23, 2:08 AM
Unknown Object (File)
Fri, Nov 22, 8:41 PM
Unknown Object (File)
Fri, Nov 22, 12:10 PM
Unknown Object (File)
Fri, Nov 1, 4:29 AM
Unknown Object (File)
Thu, Oct 31, 2:50 PM
Unknown Object (File)
Oct 3 2024, 9:06 AM
Unknown Object (File)
Sep 26 2024, 4:32 PM
Subscribers

Details

Summary

Note that the change in vm_object_collapse() is arguably a correctness fix. We must not collapse into content-identity carrying objects.

[This is a preparational commit, the plan is to use handle for OBJ_ANON to point to the end of the shadow chain].

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 27666

Event Timeline

sys/vm/vm_object.c
569–570

This could be an assert that it is an ANON object. Non-anon should never have a shadow_count now.

603

I'm a little confused at some of the dead checks in the shadow chains. I don't know where they are possible and where they are not. I suspect some code may be unnecessarily checking and handling them. a vnode may become dead but another anon with a ref should not right?

1752

Here again, can this actually become dead now that we limit to anon objects?

kib marked an inline comment as done.Nov 20 2019, 8:56 PM
kib added inline comments.
sys/vm/vm_object.c
603

Object collapse creates dead anon objects with refcount > 0.

sys/vm/vm_object.c
603

But it should only do so when ref_count == 1. Which means if we hold the object with the final ref it can't disappear out from under us?

shadow_count > 0 implies OBJ_ANON.

sys/vm/vm_object.c
603

Definitely it cannot disappear, but I am not sure that collapse cannot run in parallel while we temporary unlock the object, the case when this code is run is not when the last ref was deallocated, it is pre-last.

jeff added inline comments.
sys/vm/vm_object.c
603

I see now that we drop locks in collapse scan and that could possibly expose OBJ_DEAD in some cases.

This revision is now accepted and ready to land.Nov 20 2019, 10:44 PM

I ran the full stress2 test set without finding any problems.

This revision was automatically updated to reflect the committed changes.