Date: Tue, 5 Jul 2016 11:48:56 -0700 From: "Ngie Cooper (yaneurabeya)" <yaneurabeya@gmail.com> To: Gleb Smirnoff <glebius@FreeBSD.org> Cc: src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r302350 - in head: share/man/man9 sys/kern sys/sys Message-ID: <D511EFD0-9CA7-49D3-A891-98C7F03A9FE0@gmail.com> In-Reply-To: <201607051847.u65IlIYf000901@repo.freebsd.org> References: <201607051847.u65IlIYf000901@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <glebius@FreeBSD.org> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D511EFD0-9CA7-49D3-A891-98C7F03A9FE0>