On Thu, 2014-03-13 at 13:17 +0000, Zoltan Kiss wrote:I don't think a barrier is necessary here, if this function ran into !NETBACK_INVALID_HANDLE, it just starts again the checking.
On 13/03/14 10:33, Ian Campbell wrote:
On Thu, 2014-03-06 at 21:48 +0000, Zoltan Kiss wrote:Yes, that's intentional, we shouldn't exit this loop until everything is
+ netdev_err(vif->dev,
+ "Page still granted! Index: %x\n",
+ i);
+ i = -1;
Should there not be a break here? Otherwise don't we restart the for
loop from 0 again? If that is intentional then a comment would be very
useful.
unmapped. An i-- would be fine as well. I will put a comment there.
Yes please do, it's very non-obvious what is going on. I'm almost
inclined to suggest that this is one of the few places where a goto
retry might be appropriate.
Can you also add a comment saying what is doing the actual unmap work
which we are waiting for here since it is not actually part of the loop.
Might a barrier be needed to ensure we see that work happening?