Re: Fire Engine??

Trond Myklebust
2003-11-26T23:23:26Z

>>>>> " " == Andi Kleen <ak@suse.de> 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