Re: [PATCH] drm/i915/selftests: Pretty print the i915_active

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Quoting Chris Wilson (2019-10-31 14:18:56)
> My memory says, and my assumption in this code, is that the
> the iterator is safe against insertions -- we won't get horribly lost if
> the tree is rebalanced as we walk.

Actually, the iterator is not perfect across rebalances. It won't matter
here in the selftest, since we are the only accessor, the two other
users deserve throught.

In __active_retire, we have exclusive access to the tree as we are
freeing the nodes. Safe.

In i915_active_wait() [we can't take the mutex here due to shrinker
inversions!], we walk the tree to kick signaling on the nodes. So the
iterator is not perfect, but calling enable_signaling() is mostly an
optimisation so that we don't have to wait upon the background flush. So
I think we are safe to miss nodes, so long as the iterator itself is
bounded (which it must be).
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux