Source-Changes archive

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

CVS commit: src/sys



Module Name:    src
Committed By:   ozaki-r
Date:           Mon Jul 11 07:37:00 UTC 2016

Modified Files:
        src/sys/net: route.c
        src/sys/netinet: ip_flow.c
        src/sys/netinet6: ip6_flow.c nd6.c

Log Message:
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.169 -r1.170 src/sys/net/route.c
cvs rdiff -u -r1.72 -r1.73 src/sys/netinet/ip_flow.c
cvs rdiff -u -r1.27 -r1.28 src/sys/netinet6/ip6_flow.c
cvs rdiff -u -r1.202 -r1.203 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