From owner-svn-src-head@freebsd.org Tue Oct 1 19:53:11 2019 Return-Path: Delivered-To: svn-src-head@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1435913EF75 for ; Tue, 1 Oct 2019 19:53:11 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from outbound2m.ore.mailhop.org (outbound2m.ore.mailhop.org [54.149.155.156]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 46jVLZ30p4z4KDm for ; Tue, 1 Oct 2019 19:53:10 +0000 (UTC) (envelope-from ian@freebsd.org) ARC-Seal: i=1; a=rsa-sha256; t=1569959588; cv=none; d=outbound.mailhop.org; s=arc-outbound20181012; b=hbn3ppRSOfPrbq9kR+0/LjCDcpY3dZjg8F1/7Q0MyUkyNhEcWIDwkzqY04RGCKNnJzxhKMoJxms6e ibsXLXt3yD1d3DRis9/uW+U+CRTcoutPdflcoHhXqDHkGdpbvPBc8qs8/EJvXwoXjqPWZa4+uvr95F wiRi2mu/J4KN4ldfay2QaEA7zAEfgJ7r5PzJ/h+W/Apx1Eq+Tnz+gkuUFNI+jb1wxgxSM9xeV1snZN A0pzV1ot1xlgUU7lax661oY6cS/Nb4TodDWocJY1rW1uNahcB0sBu82Y05ERqiDmcPGSPwbdZx0cu8 79iihhGAsc5t4o+5WH49CP5L08dEPIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=arc-outbound20181012; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:dkim-signature:from; bh=QWdjeUDQxJ7SdJtwUpUQ7w1K+eU6EfDm0w9Gvq4jWoo=; b=ZVvvBr63qWJV3sMjrVZz33nqnlvpTyHYrbPDU09iF6A/rKQkNnTIcpYWuY7GaTdZvnj4H5REgzCCS BFs6/Ur2QzGYLeLkznH/Q9q9BqjXW+pH1VJ+q1+3p1bQoYpc1ySM+8PPSHVCafZ7czqx8KrOZ686C0 vKNkx+K9Izxy1Lvwpwe9lyIGDg5tL0/qd2NsOxO3bJKwsQXWCJGeWi6vNv4IjoAqhRsweYRFVSWt90 TwCNs3EfH3wWT5mMHrJO7uHJv91wjhKFoE+ouf6/OiS8X/VNVO3DVt3lIdwkJ0uUznAV0Fo9vAWVTe mhO5GKvPWng2pzoJC2OZfz7/OAYU+nQ== ARC-Authentication-Results: i=1; outbound4.ore.mailhop.org; spf=softfail smtp.mailfrom=freebsd.org smtp.remote-ip=67.177.211.60; dmarc=none header.from=freebsd.org; arc=none header.oldest-pass=0; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outbound.mailhop.org; s=dkim-high; h=content-transfer-encoding:mime-version:content-type:references:in-reply-to: date:cc:to:from:subject:message-id:from; bh=QWdjeUDQxJ7SdJtwUpUQ7w1K+eU6EfDm0w9Gvq4jWoo=; b=tPKoHCd4GRrxni89O7L7qcXdYQKJmHsmRJPSN+8tYO5/w315En/h/OFYUSjzPYKsf4rwgbBGnCpGe yYNbmetXQD6bDGFXr5pIoiglwPRfdDvpLTSVbjr18IPBmj00Fvd8LNxX2mjcPZ/K2lKdg2AYCBvEx+ hawPOk16VBm734LbNGHmgzG20XvQv6HyX2aVWcEZfC++bcj/IcaagbjlRK+QB9vtkvDpkDwCweoy1H JQGnx9/UJXgS+Y3pXiG0UTEYr06mEcxXhw3CUHwYrtHzHvfNkCuKZLPRxiaLn4CBUg9YFgVCIwadeu q5mrkGSB5/iQ1gN6wNmpzstgZrs8CQA== X-MHO-RoutePath: aGlwcGll X-MHO-User: 15804196-e485-11e9-85ed-13b9aae3a1d2 X-Report-Abuse-To: https://support.duocircle.com/support/solutions/articles/5000540958-duocircle-standard-smtp-abuse-information X-Originating-IP: 67.177.211.60 X-Mail-Handler: DuoCircle Outbound SMTP Received: from ilsoft.org (unknown [67.177.211.60]) by outbound4.ore.mailhop.org (Halon) with ESMTPSA id 15804196-e485-11e9-85ed-13b9aae3a1d2; Tue, 01 Oct 2019 19:53:06 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.15.2/8.15.2) with ESMTP id x91Jr5dF056663; Tue, 1 Oct 2019 13:53:05 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: Subject: Re: svn commit: r352938 - head/sys/arm/include From: Ian Lepore To: Konstantin Belousov Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Date: Tue, 01 Oct 2019 13:53:05 -0600 In-Reply-To: <20191001194932.GZ44691@kib.kiev.ua> References: <201910011939.x91Jd0tK010821@repo.freebsd.org> <20191001194932.GZ44691@kib.kiev.ua> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5 FreeBSD GNOME Team Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 46jVLZ30p4z4KDm X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-1.96 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.96)[-0.964,0]; ASN(0.00)[asn:16509, ipnet:54.148.0.0/15, country:US]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.29 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: Tue, 01 Oct 2019 19:53:11 -0000 On Tue, 2019-10-01 at 22:49 +0300, Konstantin Belousov wrote: > On Tue, Oct 01, 2019 at 07:39:00PM +0000, Ian Lepore wrote: > > Author: ian > > Date: Tue Oct 1 19:39:00 2019 > > New Revision: 352938 > > URL: https://svnweb.freebsd.org/changeset/base/352938 > > > > Log: > > Add 8 and 16 bit versions of atomic_cmpset and atomic_fcmpset for arm. > > > > This adds 8 and 16 bit versions of the cmpset and fcmpset functions. Macros > > are used to generate all the flavors from the same set of instructions; the > > macro expansion handles the couple minor differences between each size > > variation (generating ldrexb/ldrexh/ldrex for 8/16/32, etc). > > > > In addition to handling new sizes, the instruction sequences used for cmpset > > and fcmpset are rewritten to be a bit shorter/faster, and the new sequence > > will not return false when *dst==*old but the store-exclusive fails because > > of concurrent writers. Instead, it just loops like ldrex/strex sequences > > normally do until it gets a non-conflicted store. The manpage allows LL/SC > > architectures to bogusly return false, but there's no reason to actually do > > so, at least on arm. > > The reason is to avoid nested loops. The outer control for retry was the > initial design decision for fcmpset() comparing to cmpset(). casueword() > also started following this approach after the fixes for ll/sc looping > after the external control. If the implementation is forbidden from looping, then the manpage should say so. What I commited meets the requirements currently stated in the manpage. Until somebody explains to me why it is somehow harmful to return the RIGHT information at a cost of either 0 or 1 extra cpu cycle, it's staying the way it is. -- Ian