Re: kernel-level file serving optimizations

From: J. Robert von Behren (jrvb@cs.berkeley.edu)
Date: Mon Jul 17 2000 - 21:11:51 EST


Hey Alan -

Thanks for the info. ;-) From your response, I expect I should have
been a bit more specific. Let me try again.... ;-)

Alan Cox wrote:
>
> > 1) A number of the sk_buff manipulation routines (skb_push, skb_pull,
> > skb_reserve, etc.) assume that the packet data pointed to by skb->data
> > is contiguous. This is not the case when doing scatter/gather
>
> The entire system is built around linear buffers.
>
> > doing checksums - see Q2). Is this actually the case? Are there other
> > problems that might crop up due to non-contiguous sk_buff data, either
> > durring data transmission or reception?
>
> No other driver can handle them. IP in IP and other protocols may make
> what you think is user data into header. You would need to add BSD like
> m_pullup and more

My intention is to use these techniques only for some connections (the
connections to the file serving daemon I'm working with). Hence, the
effected connections will always be TCP connections and have a
well-known application header structure. AFAICT, this just requires
that the TCP stack not be confused by non-contiguous data after the TCP
portion of the packet. (The receiving side also requires early
demultiplexing of connections on the NIC, so I'm playing with the Alteon
gigabit driver & firmware as well...)

> > to do the checksum while copying the packet data, so without gather
> > writes to the NIC it wouldn't help). It looks like the right place to
> > check this flag for outgoing TCP packets would be in tcp_sendmsg, in
> > tcp.c. Does anyone see any problems with this?
>
> Until you can lock user pages down nicely and DMA from them it is not a
> performance improvement to checksum in hardware.

The file serving app I'm working with doesn't have any reason to touch
the data, so I'm going to do the DMA straight from the disk buffer
cache. The only user-level data that needs to go out is a relatively
small application header, which can easily be copied into kernel space.

-Rob

-
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/



This archive was generated by hypermail 2b29 : Sun Jul 23 2000 - 21:00:10 EST