tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
re: MP-safe ifnet with psz & psref
Thor Lancelot Simon writes:
> I do not think you should do any extra work to support kvm grovelling.
existing tool functionality should not be broken, however. the
netstat -i groveller code should be either updated to the new
method or converted to a real sysctl, though the current work
around would be ok for now. simply breaking netstat -i is not
an acceptable solution.
.mrg.
> On Tue, May 10, 2016 at 12:07:12PM +0900, Ryota Ozaki wrote:
> > On Thu, Apr 28, 2016 at 4:04 PM, Ryota Ozaki <ozaki-r%netbsd.org@localhost> 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:
> > > http://www.netbsd.org/~ozaki-r/psref-ifnet.diff
> >
> > 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.
> >
> > Objection?
> >
> > ozaki-r
> >
> > >
> > > 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.
>
> --
> Thor Lancelot Simon tls%panix.com@localhost
>
> "We cannot usually in social life pursue a single value or a single moral
> aim, untroubled by the need to compromise with others." - H.L.A. Hart
>
Home |
Main Index |
Thread Index |
Old Index