From owner-freebsd-current@freebsd.org Thu Dec 10 15:35:47 2015 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EA73D9D50AB for ; Thu, 10 Dec 2015 15:35:47 +0000 (UTC) (envelope-from rrs@netflix.com) Received: from mail-pf0-x229.google.com (mail-pf0-x229.google.com [IPv6:2607:f8b0:400e:c00::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id BB33B1539 for ; Thu, 10 Dec 2015 15:35:47 +0000 (UTC) (envelope-from rrs@netflix.com) Received: by pfu207 with SMTP id 207so49790525pfu.2 for ; Thu, 10 Dec 2015 07:35:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netflix.com; s=google; h=content-type:mime-version:subject:from:in-reply-to:date:cc :message-id:references:to; bh=QpbrlU7/zpaHCEIPG7lrq/sXHtnSjTwnW8qIaM/QsFk=; b=oFxKkkPaI3V8Pc4oq/o07kCCE54osSIeJgrH4+d5JjQMm5Nj+xVMwCc/k81/EiNA9i iPnwanWgTOue4ZRK17qKnCAHZInSlfMXT7RxxYNzFRlU+qA0eQDqS4XErc157e2erP8N JfWzB6AsJ16i8uvksFS/aRaBpNED9aaOJkYEs= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=QpbrlU7/zpaHCEIPG7lrq/sXHtnSjTwnW8qIaM/QsFk=; b=Z23mTgTrZ4EOiLfqrdAmKzQF74qsvuI5yR4ez5zgnyZixuvyAifd29ZG1ZKmcVYwbo leUUSIsNJSUN4JfGru5WDZousvGDEz278Tl9qw8le59TYiHGi76C4gSaA4eQjXBV7eBu yeTpJ6EaARfjAwi1kWbtUzNdMlYIhg2T4JglH0CNTW1B80qI6Jee9ed0iTArP9479O9d IxZdUAqB0mmP5X27PEl+5R7yn9FrxfmJL61D9v/cDLy+ZP6Jr09yMFjZrn6N3JsrgO5i /0rjHuuoFUCXU4TwSYw1U0phNdEUlnQLzapPZ7tpx8bmfyTd+jEGR4Gfb1+10kp6hXe7 01eg== X-Gm-Message-State: ALoCoQnEyqajEOztWHYgPgFPJhBAWmCvExvZ9pZrfB2TuJbReHBk/SyNFvSbTH/4gy4sSwsukJA4rOvRkKTsTucj3rKO9zWFrg== X-Received: by 10.98.7.129 with SMTP id 1mr7773816pfh.70.1449761747194; Thu, 10 Dec 2015 07:35:47 -0800 (PST) Received: from lgml-rrs-2.corp.netflix.com ([69.53.232.0]) by smtp.gmail.com with ESMTPSA id e14sm17226630pap.24.2015.12.10.07.35.45 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 10 Dec 2015 07:35:46 -0800 (PST) Mime-Version: 1.0 (Mac OS X Mail 7.3 \(1878.6\)) Subject: Re: panic in arptimer in r289937 From: Randall Stewart In-Reply-To: <56699BAD.9090208@selasky.org> Date: Thu, 10 Dec 2015 07:35:44 -0800 Cc: "Alexander V. Chernikov" , Adrian Chadd , freebsd-net , freebsd-current Message-Id: <0D974796-6166-48DB-BB66-72236E0B50AF@netflix.com> References: <2739461446298483@web2h.yandex.ru> <1733241446303675@web19h.yandex.ru> <5661EAAF.1010906@selasky.org> <5661EF10.8060300@selasky.org> <96B619F6-489C-4931-B306-1E1DE03F09B4@netflix.com> <56699BAD.9090208@selasky.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.1878.6) X-Mailman-Approved-At: Thu, 10 Dec 2015 16:22:03 +0000 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Dec 2015 15:35:48 -0000 If you did that it would change the KPI a bit meaning lots of thrashing in the code. And on top of that you now would no longer return 0.. You would get 1 it was restarted or -1 it was not running but is now = started. Makes no sense to me sorry.. R On Dec 10, 2015, at 7:35 AM, Hans Petter Selasky = wrote: > On 12/10/15 16:25, Randall Stewart wrote: >> For callout_stop/drain you get >>=20 >> -1 =3D=3D Callout as already gone off or is not running (usually the = latter) else the caller iks >> not using locking properly or did not lock and check the = active() value (which would have returned not active so no stop >> would have been needed); >> 0 =3D=3D we could not stop the callout, it was in process.. >> 1 =3D=3D it was stopped successfully >>=20 >>=20 >> For callout_reset() you get >>=20 >> 0 =3D=3D it was started >> 1 =3D=3D it was restarted. >>=20 >> There is no -1 since it is either started or restarted never left in = a not-running state... >>=20 >=20 > Hi, >=20 > Correct, though if the return values would be the same, it might = simplify the callout API and manual page a bit: >=20 > /* return values for all callout_xxx() functions */ > #define CALLOUT_RET_DRAINING 0 /* callout cannot be stopped, need = drain */ > #define CALLOUT_RET_CANCELLED 1 /* callout was successfully stopped = */ > #define CALLOUT_RET_STOPPED -1 /* callout was already stopped */ >=20 > Then callout_reset() would return -1, if it was started from the = stopped state. >=20 > --HPS -------- Randall Stewart rrs@netflix.com 803-317-4952