On Wed, 2025-04-09 at 16:10 +0200, Christian König wrote:I only see improvement by making things more obvious. In any case, how would you call a wrapper that just does test_bit(IS_SIGNALED, …) ?Broken, that was very intentionally removed quite shortly after we created the framework. We have a few cases were implementations do check that for their fences, but consumers should never be allowed to touch such internals.There is theory and there is practice. In practice, those internals are being used by Nouveau, i915, Xe, vmgfx and radeon.
So it seems that we failed quite a bit at communicating clearly how the interface should be used. And, to repeat myself, with both name and docu of that function, I think it is very easy to misunderstand what it's doing. You say that it shouldn't matter – and maybe that's true, in theory. In practice, it does matter. In practice, APIs get misused and have side-effects. And making that harder is desirable.
In any case, I might have to add another such call to Nouveau, because the solution preferred by you over the callback causes another race. Certainly one could solve this in a clean way, but someone has to do the work, and we're talking about more than a few hours here.
In any case, be so kind and look at patch 2 and tell me there if you're at least OK with making the documentation more detailed.
From 30b9574baadcf860104e61ce2767f9999bbdd77d Mon Sep 17 00:00:00 2001P.