Thanks to removal of LIST_ENTRY of struct route, rtcaches are accessed only by
their users. And in existing usages a rtcache is guranteed to be not accessed
simultaneously. So the rtcache framework doesn't need any exclusion controls
in itself.
correctly, in particular %%f does not contain the %f format, and like
all strftime conversions, %f can occur more than once (not that it is
likely to happen, but just in case...)
handling into the backend and doing an optimistic (unlocked) check
first. Always taking the vnode interlock makes this assertion otherwise
very heavy for multi-processor machines. Ride the kernel version bump.
loop_clone_create() uses ncpu in the following call-path.
- loop_clone_create()
- if_attach()
- if_percpuq_create()
- softint_establish() // use ncpu
- percpu_foreach() // use ncpu
However, loopinit() of built-in module is called from
module_init_class(MODULE_CLASS_DRIVER) which is called before ncpu is counted
up in some architectures. So, It is too fast.
On the other hand, it is too late for rump netinet component to call
loop_clone_create() in config_finalize().
As the result, loop_clone_create() shuld be called in loopattach() for built-in
module, and in loopinit() for dynamic module.
XXX need pullup -8 branch
The change introduces a global generation counter that is incremented when any
routes have been added or deleted. When a rtcache caches a rtentry into itself,
it also stores a snapshot of the generation counter. If the snapshot equals to
the global counter, the cache is still valid, otherwise invalidated.
One drawback of the change is that all rtcaches of all protocol families are
invalidated when any routes of any protocol families are added or deleted.
If that matters, we should have separate generation counters based on
protocol families.
This change removes LIST_ENTRY from struct route, which fixes a part of
PR kern/52515.