tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: MP-safe ifnet with psz & psref

On Thu, Apr 28, 2016 at 4:04 PM, Ryota Ozaki <> wrote:
> Hi,
> This proposal is the first step toward making interfaces
> (struct ifnet) MP-safe; it applies psz and psref to ifnet
> and ifnet_list to safely look up ifnets from ifnet_list
> and safely remove an ifnet.
> Here is a patch:

I restored the original ifnet_list because the change broke
netstat -i (kvm(3)). So we now maintain two ifnet lists while
the original list is only added/removed elements and not
referenced by say IFNET_FOREACH. It's redundant but its overhead
is negligible and it's the easiest way to keep backward
compatibility. Of course, ideally we should kill kvm(3) users
and remove the original list, but it's not now, I think.



> One concern is m_reclaim that can be run in hardware
> interrupt and so the patch skips if_drain if it's
> running in hardware interrupt because pserialize is
> basically designed used in lwp or softint (and now
> psref is used with IPL_SOFTNET). Is there a better
> solution?
> And any other suggestions and comments would be
> appreciated.
> Thanks,
>   ozaki-r
> P.S. From today for ten days, I'll be unable to use
> my main development machines, I wouldn't be able to
> update and test patches reflected your feedbacks enough.

Home | Main Index | Thread Index | Old Index