[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: struct ifnet and ifaddr handling [was: Re: Making global variables of if.c MPSAFE]
On Tue, Nov 18, 2014 at 12:07 AM, Masao Uebayashi <uebayasi%gmail.com@localhost> wrote:
> On Mon, Nov 17, 2014 at 7:03 PM, Ryota Ozaki <ozaki-r%netbsd.org@localhost> wrote:
>> - http://www.netbsd.org/~ozaki-r/ifget-ifput.diff
> Is it possible to have another "dying" flag in struct refcount, so
> that ifput() can atomically set it without taking a lock, then later
> call a g/c call?
If the kernel has a facility of GC, we may be able to do so...but
I have to say sorry for my bad writing; I misled you about
"free an ifnet object" due to my forgetfulness about the fact that
an ifnet object is normally embedded into a softc of each driver
(via ethercom) in NetBSD. (I.e., we cannot free an ifnet object
independently.) So with the current implementation, if_detach
have to wait for ifput releasing the ifnet object, to prevent
the driver from freeing sc. So it's a little bit difficult to use
"GC objects later" strategy for ifnet objects.
Should we change embedded ifnet objects to pointers (like FreeBSD)?
It requires changes of all drivers though :-/
Main Index |
Thread Index |