Linus Torvalds writes: (Summary) wrote:
I don't mind this patch series per se (although I would really like Al to ack it), but this particular patch I hate.
to ack it), but this particular patch I hate.
Why?
Why?
I think the trylock should be done first, and then you don't need that recheck for the common case.
recheck for the common case.
I realize that the recheck itself isn't expensive, but it's mostly about the code flow and the comment:
about the code flow and the comment:
the thing is, 99.9% of the time the d_lock wasn't dropped, so that "while d_lock was dropped" comment is misleading.
[...]
Trylock loops are problematic in two scenarios:I don't mind this patch series per se (although I would really like Al to ack it), but this particular patch I hate.
to ack it), but this particular patch I hate.
Why?
Why?
[...]
as it might have changed after dropping the lock.I think the trylock should be done first, and then you don't need that recheck for the common case.
recheck for the common case.
I realize that the recheck itself isn't expensive, but it's mostly about the code flow and the comment:
about the code flow and the comment:
[...]
+ * d_lock was dropped.the thing is, 99.9% of the time the d_lock wasn't dropped, so that "while d_lock was dropped" comment is misleading.