Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jul 2000 09:31:58 -0400 (EDT)
From:      Bosko.Milekic@jehovah.technokratis.com
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   kern/19866: mbuf ext_buf referencing (i.e. mclrefcnt, sendfile's ext_obj ref., etc.) should be changed (PATCH(es) included) 
Message-ID:  <200007121331.JAA01176@jehovah.technokratis.com>

next in thread | raw e-mail | index | archive | help

>Number:         19866
>Category:       kern
>Synopsis:       The mbuf subsystem presently uses a horrible referencing scheme for external
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jul 12 06:30:02 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     Bosko Milekic
>Release:        FreeBSD 5.0-CURRENT i386
>Organization:
N/A 
>Environment:

	The provided diff is against -CURRENT from yesterday and should ultimately be applied PRIOR
	to Ian Dowse's m_types changes. But if it is not, let me know so that I can merge.

>Description:

	In Synopsis. There are two different diffs that you should look at:

	* http://24.201.62.9/code/mbuf/mbufref.diff : changes:

	   - mbuf ext_buf referencing is now handled entirely at the mbuf subsystem
	     layer. mbufs referencing the same object are kept on a doubly linked list
	     through their m_ext structures.

           - sendfile(2) interface has been modified to accomodate these changes. The
	     external referencing (increment reference count) routine has been removed.

	   - The following drivers (gigabit ethernet card drivers that allocate and
	     manage their own external jumbo-buffer pools) have been modified to
	     work with the new interface, and bloat has been reduced:
			- if_wb
			- if_ti
			- if_sk
	     As I don't have any of these, I am not able to test them properly. Somebody,
	     please test! :-)

	   - mclref*() macros have been eliminated. They are now useless.

	   - m_ext struct within mbufs has been modified. A new void * is
	     provided "ext_args" to which one may attach pretty much anything
	     and have it (optionally) passed to one's ext_free routine.

	   - various other changes have been made to accomodate the new interface.

	   - small cleanups have been made in MGET and MGETHDR that make the system
	     slightly more efficient but are mainly preparatory for work-to-come on
	     the allocator. Expect another preparatory patch to come in soon.

	(Thanks to Ian Dowse and Mike Silbersack for often useful suggestions)

 -----------

	* http://24.201.62.9/code/mbuf/ian.dowse.SLIP.fix : changes:

	   - This fixes if_sl SLIP interface to use the new referencing scheme. This
	     diff was written and produced by Ian Dowse and the full description is
	     at the above URL. Please apply after having applied the first diff above
	     and test if possible - I don't use SLIP.


>How-To-Repeat:

	Not applicable.

>Fix:

	Not applicable, please read above.

	Thanks!


>Release-Note:
>Audit-Trail:
>Unformatted:
                  objects that are attached to mbufs. An example is mclrefcnt global for mbuf
                  clusters, or a similar referencing scheme for sendfile(2)'s sf_bufs, etc.
                  The diff attached adopts NetBSD's referencing scheme which is far easier to
                  manage. 


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




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