Re: Fire Engine??

From: Trond Myklebust
Date: Wed Nov 26 2003 - 18:24:24 EST


>>>>> " " == Andi Kleen <ak@xxxxxxx> writes:

> Current sunrpc does two recvmsgs for each record to first get
> the record length and then the payload.

> This means you take all the locks and other overhead twice per
> packet.

> Having a special function that peeks directly at the TCP
> receive queue would be much faster (and falls back to normal
> recvmsg when there is no data waiting)

Oh, right... That would be the server code you are thinking of, then.

The client already does something like this. I've added a function
tcp_read_sock() that is called directly from tcp_data_ready() and
hence fills the page cache directly from within the softirq.

There are a still few inefficiencies with this approach, though. Most
notable is the fact that you need to call kmap_atomic() several times
per page since the socket lower layers will usually be feeding you 1
skb at a time. I thought you might be referring to those (and that you
might have a good solution to propose ;-))

Cheers,
Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/