From owner-svn-src-all@freebsd.org Sun Nov 18 19:56:26 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 686F8110D954; Sun, 18 Nov 2018 19:56:26 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from mx1.scaleengine.net (mx1.scaleengine.net [209.51.186.6]) (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 CE2556D411; Sun, 18 Nov 2018 19:56:25 +0000 (UTC) (envelope-from allanjude@freebsd.org) Received: from [10.1.1.2] (Seawolf.HML3.ScaleEngine.net [209.51.186.28]) (Authenticated sender: allanjude.freebsd@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id B640E1DCC9; Sun, 18 Nov 2018 19:56:19 +0000 (UTC) To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201811151602.wAFG2E4w040161@repo.freebsd.org> From: Allan Jude Openpgp: preference=signencrypt Autocrypt: addr=allanjude@freebsd.org; prefer-encrypt=mutual; keydata= xsFNBFVwZcYBEADwrZDH0xe0ZVjc9ORCc6PcBLwS/RTXA6NkvpD6ea02pZ8lPOVgteuuugFc D34LdDbiWr+479vfrKBh+Y38GL0oZ0/13j10tIlDMHSa5BU0y6ACtnhupFvVlQ57+XaJAb/q 7qkfSiuxVwQ3FY3PL3cl1RrIP5eGHLA9hu4eVbu+FOX/q/XVKz49HaeIaxzo2Q54572VzIo6 C28McX9m65UL5fXMUGJDDLCItLmehZlHsQQ+uBxvODLFpVV2lUgDR/0rDa0B9zHZX8jY8qQ7 ZdCSy7CwClXI054CkXZCaBzgxYh/CotdI8ezmaw7NLs5vWNTxaDEFXaFMQtMVhvqQBpHkfOD 7rjjOmFw00nJL4FuPE5Yut0CPyx8vLj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8e6hPYLIQa4uVx4f1xxxV858PQ7QysSLr9pTV7FAQ18JclCaMc7JWIa3homZQL/MNKOfST0S 2e+msuRwQo7AnnfFKBUtb02KwpA4GhWryhkjUh/kbVc1wmGxaU3DgXYQ5GV5+Zf4kk/wqr/7 KG0dkTz6NLCVLyDlmAzuFhf66DJ3zzz4yIo3pbDYi3HB/BwJXVSKB3Ko0oUo+6/qMrOIS02L s++QE/z7K12CCcs7WwOjfCYHK7VtE0Sr/PfybBdTbuDncOuAyAIeIKxdI2nmQHzl035hhvQX s4CSghsP319jAOQiIolCeSbTMD4QWMK8RL/Pe1FI1jC3Nw9s+jq8Dudtbcj2UwAP/STUEbJ9 5rznzuuhPjE0e++EU/RpWmcaIMK/z1zZDMN+ce2v1qzgV936ZhJ3iaVzyqbEE81gDxg3P+IM kiYh4ZtPB4Q= Subject: Re: svn commit: r340450 - head/sys/sys Message-ID: <595ff2c5-64ea-509d-481e-635499ab173d@freebsd.org> Date: Sun, 18 Nov 2018 14:56:13 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.0 MIME-Version: 1.0 In-Reply-To: <201811151602.wAFG2E4w040161@repo.freebsd.org> Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9ArUz8p4sPUVZlrBUe4qfoizrtxJ54BmJ" X-Rspamd-Queue-Id: CE2556D411 X-Spamd-Result: default: False [-0.13 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.23)[-0.233,0]; NEURAL_SPAM_SHORT(0.11)[0.107,0]; ASN(0.00)[asn:6939, ipnet:209.51.160.0/19, country:US] X-Rspamd-Server: mx1.freebsd.org X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 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: Sun, 18 Nov 2018 19:56:26 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --9ArUz8p4sPUVZlrBUe4qfoizrtxJ54BmJ Content-Type: multipart/mixed; boundary="hFooTVtU2E9Nogpig7yGvGeTI8dkfAzAG"; protected-headers="v1" From: Allan Jude To: Warner Losh , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Message-ID: <595ff2c5-64ea-509d-481e-635499ab173d@freebsd.org> Subject: Re: svn commit: r340450 - head/sys/sys References: <201811151602.wAFG2E4w040161@repo.freebsd.org> In-Reply-To: <201811151602.wAFG2E4w040161@repo.freebsd.org> --hFooTVtU2E9Nogpig7yGvGeTI8dkfAzAG Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: quoted-printable On 2018-11-15 11:02, Warner Losh wrote: > Author: imp > Date: Thu Nov 15 16:02:13 2018 > New Revision: 340450 > URL: https://svnweb.freebsd.org/changeset/base/340450 >=20 > Log: > When converting ns,us,ms to sbt, return the ceil() of the result > rather than the floor(). Returning the floor means that > sbttoX(Xtosbt(y)) !=3D y for almost all values of y. In practice, th= is > results in a difference of at most 1 in the lsb of the sbintime_t. > This difference is meaningless for all current users of these > functions, but is important for the newly introduced sysctl conversio= n > routines which implicitly rely on the transformation being idempotent= =2E > =20 > Sponsored by: Netflix, Inc >=20 This seems to break attaching for my mlxen(4), with or without r340451 I don't understand why at this point. Nov 18 19:28:12 CA-HML3-09 kernel: mlx4_core0: mem 0xfbe00000-0xfbefffff,0xfa800000-0xfaffffff irq 48 at device 0.0 numa-domain 1 on pci11 Nov 18 19:28:12 CA-HML3-09 kernel: mlx4_core: Initializing mlx4_core Nov 18 19:29:12 CA-HML3-09 kernel: mlx4_core0: command 0x4 timed out (go bit not cleared) Nov 18 19:29:12 CA-HML3-09 kernel: mlx4_core0: device is going to be rese= t Nov 18 19:29:12 CA-HML3-09 kernel: mlx4_core0: device was reset successfu= lly Nov 18 19:29:13 CA-HML3-09 kernel: mlx4_core0: QUERY_FW command failed, aborting Nov 18 19:29:13 CA-HML3-09 kernel: mlx4_core0: Failed to init fw, abortin= g. Nov 18 19:29:13 CA-HML3-09 kernel: device_attach: mlx4_core0 attach returned 5 It works fine under r340449: Nov 18 19:46:07 CA-HML3-09 kernel: mlx4_core0: mem 0xfbe00000-0xfbefffff,0xfa800000-0xfaffffff irq 48 at device 0.0 numa-domain 1 on pci11 Nov 18 19:46:07 CA-HML3-09 kernel: mlx4_core: Mellanox ConnectX core driver v3.4.1 (October 2017) Nov 18 19:46:07 CA-HML3-09 kernel: mlx4_core: Initializing mlx4_core Nov 18 19:46:07 CA-HML3-09 kernel: mlx4_core0: Unable to determine PCI device chain minimum BW Nov 18 19:46:07 CA-HML3-09 kernel: mlx4_en mlx4_core0: Activating port:1 Nov 18 19:46:07 CA-HML3-09 kernel: mlxen0: Ethernet address: 00:02:c9:4d:6a:e8 Nov 18 19:46:07 CA-HML3-09 kernel: mlx4_en: mlx4_core0: Port 1: Using 32 TX rings Nov 18 19:46:07 CA-HML3-09 kernel: mlxen0: link state changed to DOWN Nov 18 19:46:07 CA-HML3-09 kernel: mlx4_en: mlx4_core0: Port 1: Using 16 RX rings Nov 18 19:46:07 CA-HML3-09 kernel: mlx4_en: mlxen0: Using 32 TX rings Nov 18 19:46:07 CA-HML3-09 kernel: mlx4_en: mlxen0: Using 16 RX rings Nov 18 19:46:07 CA-HML3-09 kernel: mlx4_en: mlxen0: Initializing port Nov 18 19:46:07 CA-HML3-09 kernel: mlx4_en: mlxen0: Link Down Nov 18 19:46:07 CA-HML3-09 kernel: mlxen0: link state changed to UP > Modified: > head/sys/sys/time.h >=20 > Modified: head/sys/sys/time.h > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D > --- head/sys/sys/time.h Thu Nov 15 08:43:17 2018 (r340449) > +++ head/sys/sys/time.h Thu Nov 15 16:02:13 2018 (r340450) > @@ -161,6 +161,10 @@ sbttobt(sbintime_t _sbt) > * Decimal<->sbt conversions. Multiplying or dividing by SBT_1NS resu= lts in > * large roundoff errors which sbttons() and nstosbt() avoid. Millise= cond and > * microsecond functions are also provided for completeness. > + * > + * These functions return the smallest sbt larger or equal to the numb= er of > + * seconds requested so that sbttoX(Xtosbt(y)) =3D=3D y. The 1 << 32 -= 1 term added > + * transforms the >> 32 from floor() to ceil(). > */ > static __inline int64_t > sbttons(sbintime_t _sbt) > @@ -173,7 +177,7 @@ static __inline sbintime_t > nstosbt(int64_t _ns) > { > =20 > - return ((_ns * (((uint64_t)1 << 63) / 500000000)) >> 32); > + return ((_ns * (((uint64_t)1 << 63) / 500000000) + (1ull << 32) - 1) = >> 32); > } > =20 > static __inline int64_t > @@ -187,7 +191,7 @@ static __inline sbintime_t > ustosbt(int64_t _us) > { > =20 > - return ((_us * (((uint64_t)1 << 63) / 500000)) >> 32); > + return ((_us * (((uint64_t)1 << 63) / 500000) + (1ull << 32) - 1) >> = 32); > } > =20 > static __inline int64_t > @@ -201,7 +205,7 @@ static __inline sbintime_t > mstosbt(int64_t _ms) > { > =20 > - return ((_ms * (((uint64_t)1 << 63) / 500)) >> 32); > + return ((_ms * (((uint64_t)1 << 63) / 500) + (1ull << 32) - 1) >> 32)= ; > } > =20 > /*- >=20 --=20 Allan Jude --hFooTVtU2E9Nogpig7yGvGeTI8dkfAzAG-- --9ArUz8p4sPUVZlrBUe4qfoizrtxJ54BmJ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (MingW32) iQIcBAEBAgAGBQJb8cPiAAoJEBmVNT4SmAt+q7MQAIXh2bOocq8BWdYJHzRpPTwq gnhVO2nznkZecoq5BDDMDqkRPsH8X+AiCGvU79aX7TzwjwmTWpgJosP7fgH+gSaK X3S2BfFjjvqT5wpE1bS4QfV4pvyWU2xVZKMwodYdXorxKpDTN/JNtVXMxwVSus0J 2fTVzOAy1o25cxu7v9WOuydZ9hQ79LkkGKMLmSrCSQlNKgKvrxoi/+UmrTv6COBr xrkb8S3Q/yLSTVwdhFJVDq62yHb/N5bTaZ0PrHhLJHuiRXGEfVjS+NbXTO4XEGuu yUQrOmbf/OBcXVUSRe10KjgAwzDHNwrPThwX+JPRxwloCQelf2hhuuCRSJtDexZN rjbSMkCtbVa0FFLRfwmlHgmeXrTXusalXDI+ZxW+PrsB6MajJgYRkW+pEtbFqhR6 yjSmVFHDrcqRMg1RhL6v1KTTyF5fQy3RKl0Kx5QszfQShe4QvesAlmNAYcN7+TOp 2A7Y3HM4h2HKh6cNATtWFnnBfgahBb9wywg/Jc+uva1uERM+TB76gK+vuM297qPn w3N8Layfy9G4vnLK8Q6tNV2gyqzXxCmx5VlGAmQ39H0L++z1IdJptXf7j4GV1GFh /6+6/w8y4lPdb0ekR3buQGAy8LHqR/xst3km+oD4ejbKeXjH9YO8AHXBDbpDWxk5 U8oGL7G83dzV4kovhTXF =NYD6 -----END PGP SIGNATURE----- --9ArUz8p4sPUVZlrBUe4qfoizrtxJ54BmJ--