From owner-svn-src-head@FreeBSD.ORG Sun Jun 23 07:33:47 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 615EE30F; Sun, 23 Jun 2013 07:33:47 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id E21691259; Sun, 23 Jun 2013 07:33:46 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.7/8.14.7) with ESMTP id r5N7XhG0013437; Sun, 23 Jun 2013 10:33:43 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.8.3 kib.kiev.ua r5N7XhG0013437 Received: (from kostik@localhost) by tom.home (8.14.7/8.14.7/Submit) id r5N7Xh9C013436; Sun, 23 Jun 2013 10:33:43 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sun, 23 Jun 2013 10:33:43 +0300 From: Konstantin Belousov To: Bruce Evans Subject: Re: svn commit: r252032 - head/sys/amd64/include Message-ID: <20130623073343.GY91021@kib.kiev.ua> References: <201306201430.r5KEU4G5049115@svn.freebsd.org> <20130621065839.J916@besplex.bde.org> <20130621081116.E1151@besplex.bde.org> <20130621090207.F1318@besplex.bde.org> <20130621064901.GS1214@FreeBSD.org> <20130621184140.G848@besplex.bde.org> <20130621135427.GA1214@FreeBSD.org> <20130622110352.J2033@besplex.bde.org> <20130622124832.S2347@besplex.bde.org> <20130622174921.I3112@besplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="to1uSGBmQtEag2WO" Content-Disposition: inline In-Reply-To: <20130622174921.I3112@besplex.bde.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, Gleb Smirnoff , src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 23 Jun 2013 07:33:47 -0000 --to1uSGBmQtEag2WO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sat, Jun 22, 2013 at 06:58:15PM +1000, Bruce Evans wrote: > So the i386 version be simply "addl; adcl" to memory. Each store in > this is atomic at the per-CPU level. If there is no carry, then the > separate stores are equivalent to adding separate nonnegative values and > the counter value is valid at all times. If there is carry, then the > separate stores are equivalent to adding a negative value followed by > a larger positive value. The counter transiently goes backwards, but > no information is lost and the counter is eventually set to the correct > forward-going value. This is quite interesting idea, but I still did not decided if it acceptable. The issue is that we could add the carry to the other processor counter, if the preemption kicks in at right time between two instructions. I did not found any argument why would it be wrong, the races for fetch operation seems to be the same with either local update method. On the other hand, for debugging it would be quite confusing state of the counters array to observe. --to1uSGBmQtEag2WO Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iQIcBAEBAgAGBQJRxqTWAAoJEJDCuSvBvK1ByLQP/2foifYLfz0tYSdbcwQIGafb iuJYFO2RLJTTA1+doHSOuYV2LlaqOQb/TmdfRWOuXm+XU5p77T/WBqZnXab68GUO /MB7XLCuWl1FNm4zFVV/0VF9aDxY6aJZwTL/t+gsML3huTGJqB04aD0XCmy18TBa fNSiF7KU/EyPeQtY2TR9UYx2fsg7DEnaLFMbyEJR4Adg2mEU0qdheWDO5YhvoS9Z tHiPwC5D8ZGrP9XI3Mb0XUtN74qN8CLbvgylTk/5YWTYAOIlHf9ZzMviExhwkbPs Y1RQxjHOHxw0TKD5OjaVqWaEfHD817VFFDjbkUX9jMaOW+Arrzwik4zC4a6h0ef6 6PviqvuRb0DGO7aXw1qXnm0iUh75U7spiKFlrOA0Nd/OoXAoC8iD/E+LOcoe0mNR N7hPPd1ejqny6suBlOiLNCwQ9jlkGnYkyywkl5suZOKw/KNee9TW1ADhgmpkqhzQ 1vK1YL4syTC8wm+w9MG4xDyh+sNL0hY9z5jfAzfdl/hycUkxORxPLst6lEyYz/97 yhWQ8P7j2MzQ3j9q0x3c6Kkb7f9c6a0YLWS3glHAdGTADnGSXXFdhmvAplRWhgXq zS1FQNMQsQ61CUvu2t302lUucdIAFrB9ZYOHnR1nllO7gVvIPTrGphwQTNzFnPmo /D/a6GERTF/btw0bWj2S =ZPHv -----END PGP SIGNATURE----- --to1uSGBmQtEag2WO--