Subject: Re: CVS commit: syssrc/sys/net
To: None <tech-net@netbsd.org>
From: David Laight <david@l8s.co.uk>
List: tech-net
Date: 10/01/2002 17:53:38
>   I ask because it seems like mbufs whose reference/dereference
>   implementation can be overridden open interesting opportunities for
>   optimization.  For example, if you have some NIC whose receive buffer
>   is mapped into the host's virtual memory, then a driver can hand up
>   an mbuf which points into the NIC's receive buffer. The mbuf has a
>   special 'free' method assigned, which indicates to the NIC that the
>   mbuf's range in the receive buffer is eligible for re-use. In this way,
>   you avoid a copy to the host's memory.
> 
>   Is this optimization too complicated to consider?

Is it even an optimisation?

Access to the NICs memory is likely to be slower than accessing
host memory [1].  So there are likely to be performance advantages
in ensuring it is only accessed once.

	David

[1] it is also likely to be uncached - unless the driver is doing
some quite compilated, cpu dependand, cache management.

-- 
David Laight: david@l8s.co.uk