From owner-svn-src-all@freebsd.org Tue Jul 5 18:48:59 2016 Return-Path: Delivered-To: svn-src-all@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 8B7A8B20762; Tue, 5 Jul 2016 18:48:59 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: from mail-pa0-x232.google.com (mail-pa0-x232.google.com [IPv6:2607:f8b0:400e:c03::232]) (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 58F441927; Tue, 5 Jul 2016 18:48:59 +0000 (UTC) (envelope-from yaneurabeya@gmail.com) Received: by mail-pa0-x232.google.com with SMTP id uj8so9829778pab.3; Tue, 05 Jul 2016 11:48:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:mime-version:from:in-reply-to:date:cc:message-id:references :to; bh=cSQIfAWTnz1s2+8EHbpPAb3YJXIvZSH1GLPiEMF9SwY=; b=oF3kDRoqlRosQ5gyGKA8V5EJ2VDNI0aqKDGEeZd7AxPYATRyFTk1t8R8DmmgI1R6M5 lkL4pds6wGED//XpozvEPfqnFAWAisBZ4ERFmTvl7xFox8sRHIFBQ72XAp6fGf/pjs2/ 1eLz8uce0Drw/UpmGMK0OZ+O1gtMjDoOXknnyWwN0SpMTivpNaIctClJxJsf6ad9YWig hXlLzevsomwIR8b1IHqyhg3daJVDExLDx9UqMLCj/seKk16a3OT0NFo0d8TyBziM66GZ 2cpQgv9vrLmnk4nDLpNlhJ9UNXOp/0LKB9g5JvqmMCVoqX+cDRvcuG0JNdzbazRbg1x6 eLqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:mime-version:from:in-reply-to:date:cc :message-id:references:to; bh=cSQIfAWTnz1s2+8EHbpPAb3YJXIvZSH1GLPiEMF9SwY=; b=PACKl/edZoD2c2sBSWac9qC2ehd3QyPkU3v/hVBcaPb5OmAk15l6ffwGDu/W25civX JCoIB5blXt5wOOFcC42EOUUH3zO/33DHq8IYARa8ZjH4QwpDWVIJVVWD0/YTd6ACmglm Fm3elI6jUE8qbt9prEhUVHykfkeHAhGjd4WTlNp1DxJGKYiRlXWaw89kOZMaPB8lZJ4i hc6STY4EfZIEXgpHtX4fm3HAAla/z2AuLZtVeaAWG/zlW20g/C6+nQnJiuqo3GP3t1BB wmkWvhtl4vFMBhp8C4daPEnBcfqGFqD3dFJ+rGfBL2OKT60M1l7Qg5ZLtDB0HA5MmZpn ay7Q== X-Gm-Message-State: ALyK8tLuJPDoikOwPAb7CrcRH0SVzLN4gIVs9M59LQFwGRBtvTvmdFYHxhxou7mVNcRVag== X-Received: by 10.66.80.3 with SMTP id n3mr34442361pax.92.1467744538742; Tue, 05 Jul 2016 11:48:58 -0700 (PDT) Received: from [192.168.20.18] (c-73-19-52-228.hsd1.wa.comcast.net. [73.19.52.228]) by smtp.gmail.com with ESMTPSA id z127sm6547537pfz.20.2016.07.05.11.48.57 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 05 Jul 2016 11:48:57 -0700 (PDT) Subject: Re: svn commit: r302350 - in head: share/man/man9 sys/kern sys/sys Mime-Version: 1.0 (Mac OS X Mail 9.3 \(3124\)) Content-Type: multipart/signed; boundary="Apple-Mail=_86C4A518-F9DB-4996-9D53-22FCCDF80018"; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Pgp-Agent: GPGMail 2.6b2 From: "Ngie Cooper (yaneurabeya)" In-Reply-To: <201607051847.u65IlIYf000901@repo.freebsd.org> Date: Tue, 5 Jul 2016 11:48:56 -0700 Cc: src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-Id: References: <201607051847.u65IlIYf000901@repo.freebsd.org> To: Gleb Smirnoff X-Mailer: Apple Mail (2.3124) X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Jul 2016 18:48:59 -0000 --Apple-Mail=_86C4A518-F9DB-4996-9D53-22FCCDF80018 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On Jul 5, 2016, at 11:47, Gleb Smirnoff wrote: >=20 > Author: glebius > Date: Tue Jul 5 18:47:17 2016 > New Revision: 302350 > URL: https://svnweb.freebsd.org/changeset/base/302350 >=20 > Log: > The paradigm of a callout is that it has three consequent states: > not scheduled -> scheduled -> running -> not scheduled. The API and = the > manual page assume that, some comments in the code assume that, and = looks > like some contributors to the code also did. The problem is that this > paradigm isn't true. A callout can be scheduled and running at the = same > time, which makes API description ambigouous. In such case = callout_stop() > family of functions/macros should return 1 and 0 at the same time, = since it > successfully unscheduled future callout but the current one is = running. > Before this change we returned 1 in such a case, with an exception = that > if running callout was migrating we returned 0, unless CS_MIGRBLOCK = was > specified. >=20 > With this change, we now return 0 in case if future callout was = unscheduled, > but another one is still in action, indicating to API users that = resources > are not yet safe to be freed. >=20 > However, the sleepqueue code relies on getting 1 return code in that = case, > and there already was CS_MIGRBLOCK flag, that covered one of the edge = cases. > In the new return path we will also use this flag, to keep sleepqueue = safe. >=20 > Since the flag CS_MIGRBLOCK doesn't block migration and now isn't = limited to > migration edge case, rename it to CS_EXECUTING. >=20 > This change fixes panics on a high loaded TCP server. >=20 > Reviewed by: jch, hselasky, rrs, kib > Approved by: re (gjb) > Differential Revision: https://reviews.freebsd.org/D7042 >=20 > Modified: > head/share/man/man9/timeout.9 > head/sys/kern/kern_timeout.c > head/sys/kern/subr_sleepqueue.c > head/sys/sys/callout.h Should __FreeBSD_version be bumped for the change? Thanks, -Ngie --Apple-Mail=_86C4A518-F9DB-4996-9D53-22FCCDF80018 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP using GPGMail -----BEGIN PGP SIGNATURE----- Comment: GPGTools - https://gpgtools.org iQIcBAEBCgAGBQJXfAEYAAoJEPWDqSZpMIYVdvUP/jwdy5lq8SLLHslu4LQPXhkH 4SeKq/2uo3kajYGyyOq2MEZUwG5mMnL3YdAI0H/wPio9moml+0wscbCI4rZyGXdl /gaG1KLtR/TUsfPwzC3lTRekasaQcZUkUL+fPPlRD0UDz1+tSFOKBWzp33kjGtAW J4e57o999gNSn8JtImjOaIbIa9skdh7BAqxHQIGl13dEWmA3AM//SfsJEhL0cBI7 vKf9ew785PLy1ptuyLk9PQMKe/3zLMrXBsVnkTBPar6JjM8zAU5jX7BGnVg5Qy0k NzyTGoGcQ2rkZBe1r5F4dVAnJwvH45/JqybWTA8mGSrx24h9wOpRTLZcX30dV8IF MTcbB2VHeW+yT2j6GdQyAgZ+eYQWfPQpaHtJvTSBbuVAdHUeNupQu1XrU7joCYJY 3qswVjwnzpItj974ZmTBP3h34GYJc0L0gd1JF4FqpOhN7U1ZLEzWBcATalQFs0mw cpyl2mSKJIqqkYEejpfykJtSAO7lH3ga0GPtMeMa8P8+gL7jKwAjA2FPeSW85DsB 0/K3OlBivvk7hR/AaHO4by4qnztAJCJIfGLOUD/tFZAFVVEX95ZjDmz9KV8oeSay 1z1caW1NgOY5AMzuOmTv7hHYWiJJ8axAqbO3dC5VSvvap23X24qxBrZVlKVYPZtn 6vRLmvx3GuWUXkzPc53P =KISx -----END PGP SIGNATURE----- --Apple-Mail=_86C4A518-F9DB-4996-9D53-22FCCDF80018--