Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Oct 2001 13:28:13 -0500
From:      Alfred Perlstein <bright@mu.org>
To:        Luigi Rizzo <rizzo@aciri.org>
Cc:        net@freebsd.org
Subject:   Re: performance issues with M_PREPEND on clusters
Message-ID:  <20011023132813.I15052@elvis.mu.org>
In-Reply-To: <20011023110307.A34494@iguana.aciri.org>; from rizzo@aciri.org on Tue, Oct 23, 2001 at 11:03:07AM -0700
References:  <20011023110307.A34494@iguana.aciri.org>

next in thread | previous in thread | raw e-mail | index | archive | help
* Luigi Rizzo <rizzo@aciri.org> [011023 13:06] wrote:
> 
> Hi,
> don't know what is the right forum to discuss this, but this is
> certainly one. I have also Bcc-ed some people who might need to be
> involved.
> 
> In the mbuf code, M_LEADINGSPACE always returns 0 when M_EXT is
> set, instead of calling the second part of M_WRITABLE to check
> whether there is a chance of writing into the cluster. This means
> that both M_PREPEND() and m_pullup() will have to allocate a second
> mbuf when they are invoked on a cluster, which these days is
> basically true for most of the incoming traffic (several network
> drivers pass up the full packet in a cluster).

I've seen this brought up before, this is not what you want to
do otherwise you risk corrupting EXT data.  The right thing to
do is have the people allocating writable EXT bufs mark them
as such.  Other EXT type buffers such as sendfile bufs can not
be written to no matter what the sharecount is.

I hope this helps.

-Alfred

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-net" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011023132813.I15052>