Source-Changes archive

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

CVS commit: [netbsd-7] src/sys



Module Name:    src
Committed By:   snj
Date:           Fri May 12 05:44:10 UTC 2017

Modified Files:
        src/sys/net [netbsd-7]: route.c
        src/sys/netinet [netbsd-7]: ip_flow.c
        src/sys/netinet6 [netbsd-7]: ip6_flow.c nd6.c

Log Message:
Pull up following revision(s) (requested by skrll/ozaki-r in ticket #1402):
        sys/net/route.c: revision 1.170 via patch
        sys/netinet/ip_flow.c: revision 1.73 via patch
        sys/netinet6/ip6_flow.c: revision 1.28 via patch
        sys/netinet6/nd6.c: revision 1.203 via patch
Run timers in workqueue
Timers (such as nd6_timer) typically free/destroy some data in callout
(softint). If we apply psz/psref for such data, we cannot do free/destroy
process in there because synchronization of psz/psref cannot be used in
softint. So run timer callbacks in workqueue works (normal LWP context).
Doing workqueue_enqueue a work twice (i.e., call workqueue_enqueue before
a previous task is scheduled) isn't allowed. For nd6_timer and
rt_timer_timer, this doesn't happen because callout_reset is called only
from workqueue's work. OTOH, ip{,6}flow_slowtimo's callout can be called
before its work starts and completes because the callout is periodically
called regardless of completion of the work. To avoid such a situation,
add a flag for each protocol; the flag is set true when a work is
enqueued and set false after the work finished. workqueue_enqueue is
called only if the flag is false.
Proposed on tech-net and tech-kern.


To generate a diff of this commit:
cvs rdiff -u -r1.132 -r1.132.2.1 src/sys/net/route.c
cvs rdiff -u -r1.64 -r1.64.2.1 src/sys/netinet/ip_flow.c
cvs rdiff -u -r1.23 -r1.23.2.1 src/sys/netinet6/ip6_flow.c
cvs rdiff -u -r1.152.2.3 -r1.152.2.4 src/sys/netinet6/nd6.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index