On Thu, 28 May 2026 15:02:12 +1000
David Gibson
We have a special path that avoids updating conn->pending when the amounts read and written are equal. This has a conceptual complexity cost, in particular, it means that conn->pending[] is not accurate to its normal meaning for a section of the loop body.
conn->pending[] shares a cacheline with conn->pipe[] and conn->s[], so it's almost certainly cache-hot. It's questionable that avoiding the update of pending even outweighs the extra conditional branch, let alone saves anything of significance. Remove it.
I added this when we still had 64-bit counters, that is, two weeks before commit 37c228ada88b ("tap, tcp, udp, icmp: Cut down on some oversized buffers"), but now, as you point out, it doesn't make sense anymore. -- Stefano