tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: MP-safe ifnet with psz & psref
Date: Fri, 20 May 2016 11:51:24 +0900
From: Ryota Ozaki <ozaki-r%netbsd.org@localhost>
On Fri, May 20, 2016 at 3:01 AM, Taylor R Campbell
<campbell+netbsd-tech-kern%mumble.net@localhost> wrote:
> Can you explain why there are long-term mbufs and rtentries that may
> continue to point to ifnets that are gone? Can you instead arrange to
> (1) prevent an ifnet from being used, and (2) flush all mbufs and
> rtentries pointing at it, before (3) destroying the ifnet?
For mbufs, currently we do nothing when destroying an interface object.
We can flush mbufs queued in its if_percpuq, but it's difficult to all
mbufs pointing to the interface, for example mbufs in other queues such
as pktqueues for ip and gif. (Well, we may be able to flush such mbufs
in every existing queues, I'm not sure it's a realistic approach.)
And we also have to wait for in-flight mbufs, which are dequeued and
in use, are disappeared somehow.
Fair enough. I guess just recursively flushing every queue that might
be fed into by the interface's queue is not doable, since there are
cycles in the transitive closure of that relation.
Home |
Main Index |
Thread Index |
Old Index