From owner-freebsd-net@FreeBSD.ORG Thu Jan 29 02:23:44 2015 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A69A4B3C for ; Thu, 29 Jan 2015 02:23:44 +0000 (UTC) Received: from phabric-backend.isc.freebsd.org (phabric-backend.isc.freebsd.org [IPv6:2001:4f8:3:ffe0:406a:0:50:2]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 67DC6A6E for ; Thu, 29 Jan 2015 02:23:44 +0000 (UTC) Received: from phabric-backend.isc.freebsd.org (phabric-backend.isc.freebsd.org [127.0.1.5]) by phabric-backend.isc.freebsd.org (8.14.9/8.14.9) with ESMTP id t0T2NivJ011765 for ; Thu, 29 Jan 2015 02:23:44 GMT (envelope-from mat@phabric-backend.isc.freebsd.org) Received: (from root@localhost) by phabric-backend.isc.freebsd.org (8.14.9/8.14.9/Submit) id t0T2NiOG011764; Thu, 29 Jan 2015 02:23:44 GMT (envelope-from mat) Date: Thu, 29 Jan 2015 02:23:44 +0000 To: freebsd-net@freebsd.org From: "rrs (Randall Stewart)" Subject: [Differential] [Commented On] D1711: Changes to the callout code to restore active semantics and also add a test-framework and test to validate thecallout code (and potentially for use by other tests). Message-ID: <03037b55642e637b0123a296025a5ab8@localhost.localdomain> X-Priority: 3 Thread-Topic: D1711: Changes to the callout code to restore active semantics and also add a test-framework and test to validate the callout code (and potentially for use by other tests). X-Herald-Rules: none X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-To: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: X-Phabricator-Cc: In-Reply-To: References: Thread-Index: Y2JjMTcyODJkYzgxM2NkZDFjY2RhOGRmMTlkIFTJmbA= X-Phabricator-Sent-This-Message: Yes X-Mail-Transport-Agent: MetaMTA X-Auto-Response-Suppress: All X-Phabricator-Mail-Tags: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 29 Jan 2015 02:23:44 -0000 rrs added a comment. Hans: We have discussed that, and *no* it will *not* return the incorrect thing once it can't be stopped. There is code in the callout_reset_sbt_on() that makes sure zero is returned. The only way that zero will *not* be returned is if the PENDING flag is set. That won't happen if the callout is the one waiting on a lock. So the answer will be 0, and the new callout will be scheduled at the end of the current one. However if before that can return (the callout) yes you will get a 1, since the rescheduled callout from the first one that set the migration will see the subsequent migration flag and return one since that *was* rescheduled. The exec_cancel flag is only valid or looked at in the case where the lock is set on the callout. REVISION DETAIL https://reviews.freebsd.org/D1711 To: rrs, gnn, rwatson, adrian, sbruno, lstewart, hselasky, imp Cc: delphij, neel, erj, freebsd-net