]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC of r278469, r278623
authorrrs <rrs@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 15 Feb 2015 13:24:32 +0000 (13:24 +0000)
committerrrs <rrs@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Sun, 15 Feb 2015 13:24:32 +0000 (13:24 +0000)
commit036ebf4f15985331e6a41e7f4108bfe0ff8eaa2d
tree7ad9c96aab347c2281a8bba6ada7c43d66b3d09b
parentf68c48f9924a9146996325e643e7fae8f6654f6c
MFC of r278469, r278623

278469:
This fixes two conditions that can incur when migration
is being done in the callout code and harmonizes the macro
use.:
1) The callout_active() will lie. Basically if a migration
   is occuring and the callout is about to expire and the
   migration has been deferred, the callout_active will no
   longer return true until after the migration. This confuses
   and breaks callers that are doing callout_init(&c, 1); such
   as TCP.
2) The migration code had a bug in it where when migrating, if
   a two calls to callout_reset came in and they both collided with
   the callout on the wheel about to run, then the second call to
   callout_reset would corrupt the list the callout wheel uses
   putting the callout thread into a endless loop.
3) Per imp, I have fixed all the macro occurance in the code that
   were for the most part being ignored.

278623:

This fixes a bug I in-advertantly inserted when I updated the callout
code in my last commit. The cc_exec_next is used to track the next
when a direct call is being made from callout. It is *never* used
in the in-direct method. When macro-izing I made it so that it
would separate out direct/vs/non-direct. This is incorrect and can
cause panics as Peter Holm has found for me (Thanks so much Peter for
all your help in this). What this change does is restore that behavior
but also get rid of the cc_next from the array and instead make it
be part of the base callout structure. This way no one else will get
confused since we will never use it for non-direct.

Sponsored by: Netflix Inc.

git-svn-id: svn://svn.freebsd.org/base/stable/10@278800 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/kern/kern_timeout.c
sys/sys/callout.h