Re: select()/socket has problems under 2.2.x.

Andi Kleen (ak@muc.de)
05 Mar 1999 21:58:46 +0100


andrea@e-mind.com (Andrea Arcangeli) writes:
> }
> } else if (TCP_SKB_CB(skb)->ack_seq == tp->snd_una &&
> - atomic_read(&sk->rmem_alloc) <= sk->rcvbuf) {
> + (sock_rspace(sk) ||
> + (!skb_queue_len(&sk->receive_queue) &&
> + !skb_queue_len(&tp->out_of_order_queue)))) {
> /* Bulk data transfer: receiver */
> __skb_pull(skb,th->doff*4);

The out_of_order_queue check is bogus because the fast path should be never
entered when there are ooo packets. Also you just introduced a costly
additional function call with useless checking (sk!=NULL etc.) to an
important fast path. Why should we go through all the hazzles of header
prediction, if all benefits are later destroyed by lazy coding like this?

I also don't see what you're trying to archieve with this change.

-Andi

-- 
This is like TV. I don't like TV.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/