From owner-freebsd-bugs Wed Jul 12 6:30: 6 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id 14AF737BE2E for ; Wed, 12 Jul 2000 06:30:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id GAA30958; Wed, 12 Jul 2000 06:30:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from jehovah.technokratis.com (modemcable009.62-201-24.mtl.mc.videotron.net [24.201.62.9]) by hub.freebsd.org (Postfix) with ESMTP id 8C81A37BBA0 for ; Wed, 12 Jul 2000 06:29:45 -0700 (PDT) (envelope-from bmilekic@jehovah.technokratis.com) Received: (from bmilekic@localhost) by jehovah.technokratis.com (8.9.3/8.9.3) id JAA01176; Wed, 12 Jul 2000 09:31:58 -0400 (EDT) (envelope-from bmilekic) Message-Id: <200007121331.JAA01176@jehovah.technokratis.com> Date: Wed, 12 Jul 2000 09:31:58 -0400 (EDT) From: Bosko.Milekic@jehovah.technokratis.com Reply-To: bmilekic@technokratis.com To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/19866: mbuf ext_buf referencing (i.e. mclrefcnt, sendfile's ext_obj ref., etc.) should be changed (PATCH(es) included) Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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