Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 08 Jul 2010 12:59:49 +0300
From:      Andriy Gapon <avg@freebsd.org>
To:        freebsd-net@freebsd.org
Cc:        Kostik Belousov <kostikbel@gmail.com>, lstewart@freebsd.org, bz@freebsd.org, Andre Oppermann <andre@freebsd.org>, Ming Fu <Ming.Fu@watchguard.com>
Subject:   Re: kern/123095 kern/131602 sendfile
Message-ID:  <4C35A195.5060804@freebsd.org>
In-Reply-To: <4C359D21.30308@freebsd.org>
References:  <7C3D15DD6E8F464998CA1470D8A322F302BB9F72@ES02CO.wgti.net> <20100707205041.GO13238@deviant.kiev.zoral.com.ua> <4C358843.5000001@freebsd.org> <4C358A01.8080206@icyb.net.ua> <20100708082943.GB2439@deviant.kiev.zoral.com.ua> <4C358EE5.8070003@icyb.net.ua> <4C359D21.30308@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
on 08/07/2010 12:40 Andriy Gapon said the following:
> on 08/07/2010 11:40 Andriy Gapon said the following:
>> on 08/07/2010 11:29 Kostik Belousov said the following:
>>> Right, the patch maps the page in sf buffer read-only (on i386 only).
>>> But note the parallel posting with m_cat() change. It is still not enough,
>>> and I am not set up for the real network testing ATM.
>> Could you also try to experiment with mb_dupcl?
>> Namely transfer M_RDONLY from source mbuf.
> 
> 
> Oh, sigh, should have looked at definition of M_WRITABLE() first.

As kib has just pointed out to me, m_ext.ref_cnt may go back to one (via source
mbuf going away) and then destination mbuf becomes R/W.
BTW, perhaps m_collapse() should also use M_WRITABLE instead of directly testing
M_RDONLY?

-- 
Andriy Gapon



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