tech-kern archive

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


On Fri, Nov 10, 2017 at 6:35 PM, Ryota Ozaki <> wrote:
> Hi,
> I'm going to commit the above change that integrates
> The motivation is to not waste if_extflags bits. I'm now
> trying to make if_ioctl() hold KERNEL_LOCK selectively
> for some reasons as well as if_start() and if_output().

BTW this is a patch for this plan:

It removes KERNEL_LOCK for if_ioctl from soo_ioctl and
selectively takes it in doifioctl. To this end, some fine-grain
KERNEL_LOCKs have to be added where calling components/functions
that aren't MP-safe.


> But adding one more flag for if_ioctl() is I think
> wasteful. Also there are other functions such as if_init()
> and if_slowtimo() that would also need a flag.
> So I propose to have just one flag for indications of
> MP-safe. If an interface have both MP-safe and non-MP-safe
> operations at a time, we have to set the IFEF_MPSAFE flag
> and let callees of non-MP-safe operations take KERNEL_LOCK.
> This change breaks ABI and need a kernel version bump,
> however, IFEF_*_MPSAFE flags are new to netbsd-8 so it
> doesn't break backward compatibility.
> Any comments or objections?
> Thanks,
>   ozaki-r

Home | Main Index | Thread Index | Old Index