Date: Sat, 15 Jul 2000 12:49:38 -0400 (EDT) From: Bosko Milekic <bmilekic@dsuper.net> To: Alfred Perlstein <bright@wintelcom.net> Cc: net@FreeBSD.ORG, dg@FreeBSD.ORG, dillon@FreeBSD.ORG Subject: Re: mbuf refcnt and sendfile Message-ID: <Pine.BSF.4.21.0007151245300.19250-100000@jehovah.technokratis.com> In-Reply-To: <20000715093844.D25571@fw.wintelcom.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, 15 Jul 2000, Alfred Perlstein wrote: > And why exactly don't you have to splimp if it's a linked list? Because you're checking the pointer in the isolated mbuf which cannot be modified by anything but the owner. If you check the reference counter which is general, it can be incremented or manipulated by any other code. > I assume you mean an object may be referenced by more than just mbufs, > the solution is simple, you just keep that count seperate: Yes, which is feasible presently without the need for the thing you suggested. [...] > Also, the refcounting can be done with atomic operations therefore > you won't need spl, if you atomically decrease the ref and it's > zero, then the network stack doesn't have access to it. When you increase the reference count, it's not exactly atomic as you may be offsetting into a location, it may produce more than one instruction in which case you may catch an interrupt in between where things will get broken. > Lastly your changes bloat the size of an mbuf by 12 bytes, although > really only 8 because ext_args isn't needed. You don't need that data anyway. When you M_EXT, you don't use the data area of the mbuf. -- Bosko Milekic * Voice/Mobile: 514.865.7738 * Pager: 514.921.0237 bmilekic@technokratis.com * http://www.technokratis.com/ 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?Pine.BSF.4.21.0007151245300.19250-100000>