Messages in this thread | | | Date | Sun, 22 Mar 1998 15:16:03 -0800 (PST) | From | Linus Torvalds <> | Subject | Re: bug in 2.1.89 include/net/sock.h? |
| |
On Sun, 22 Mar 1998, David S. Miller wrote: > > Something like > > /* Wake up only if we have more than half the wspace free: */ > if (atomic_read(sk->wmem_alloc)*2 <= sk->sndbuf)) { > ... wake_up() .. > } > > should get rid of some unnecessary wake-ups, whether they are due > to ACK's or not. There's no point in having the writer trickle the > write data in small chunks anyway. > > Sounds good. As Alexey mentioned, this was exactly what the code used > to do a long time ago, but the conditional disappeared early in the > 2.1.x series.
Yes, I think I may have been responsible for that code in 2.0.x.. I was surprised that it looked like it did in 2.1.x when I checked.
> Outside of the ACK cases, the other bogus case as I mentioned is for > clones of real outgoing data packets, used for transmission, the SOCK > gets charged again for the entire data area when in reality only > sizeof(struct sk_buff) more memory is being tied up due to the clone.
I think this is bogus. I have a strong memory of _not_ updating the socket counters at all for cloned skb's, exactly because that would have gotten the counts wrong. The thing used to set "skb->truesize" to zero for this reason.
I think. It's been a long time since I worked on that code, I have to admit.
Linus
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu
| |