From owner-svn-src-head@FreeBSD.ORG Mon Feb 9 20:34:40 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 0D9F57E1; Mon, 9 Feb 2015 20:34:40 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [IPv6:2001:470:1f11:75::1]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id DBD10AD9; Mon, 9 Feb 2015 20:34:39 +0000 (UTC) Received: from ralph.baldwin.cx (pool-173-54-116-245.nwrknj.fios.verizon.net [173.54.116.245]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 92AA5B97B; Mon, 9 Feb 2015 15:34:38 -0500 (EST) From: John Baldwin To: Randall Stewart Subject: Re: svn commit: r278469 - in head/sys: kern sys Date: Mon, 09 Feb 2015 15:09:46 -0500 Message-ID: <1619204.FQlXD7hmMU@ralph.baldwin.cx> User-Agent: KMail/4.14.2 (FreeBSD/10.1-STABLE; KDE/4.14.2; amd64; ; ) In-Reply-To: <201502091919.t19JJjbg061542@svn.freebsd.org> References: <201502091919.t19JJjbg061542@svn.freebsd.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Mon, 09 Feb 2015 15:34:38 -0500 (EST) Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Feb 2015 20:34:40 -0000 On Monday, February 09, 2015 07:19:45 PM Randall Stewart wrote: > Author: rrs > Date: Mon Feb 9 19:19:44 2015 > New Revision: 278469 > URL: https://svnweb.freebsd.org/changeset/base/278469 > > Log: > 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. > > Phabricator D1711 and looked at by lstewart and jhb and sbruno. > Reviewed by: kostikbel, imp, adrian, hselasky > MFC after: 3 days > Sponsored by: Netflix Inc. Thank you guys for working together to fix the migration race in a way that lets CALLOUT_MPSAFE timers use multiple CPUs still. I do think that callout_drain_async() would also be useful to add. -- John Baldwin