From owner-svn-src-all@FreeBSD.ORG Thu Jun 23 21:18:36 2011 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE8E6106564A; Thu, 23 Jun 2011 21:18:36 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 869528FC15; Thu, 23 Jun 2011 21:18:36 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p5NLG8Nh011366 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Thu, 23 Jun 2011 15:16:09 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <4E039C0F.10505@rice.edu> Date: Thu, 23 Jun 2011 15:15:26 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <80DB2C1D-8C66-440D-ADF3-1FBD24D4D116@bsdimp.com> References: <201106230524.p5N5O0Rs084548@svn.freebsd.org> <31243267-5FE1-4104-9B77-4F3EAAD4523B@FreeBSD.org> <4E039C0F.10505@rice.edu> To: Alan Cox X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Thu, 23 Jun 2011 15:16:10 -0600 (MDT) Cc: Alan Cox , svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, "Bjoern A. Zeeb" , src-committers@FreeBSD.org Subject: Re: svn commit: r223464 - head/sys/vm X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Thu, 23 Jun 2011 21:18:36 -0000 On Jun 23, 2011, at 2:03 PM, Alan Cox wrote: > On 6/23/2011 1:30 PM, Warner Losh wrote: >> On Jun 23, 2011, at 2:17 AM, Bjoern A. Zeeb wrote: >>=20 >>> On Jun 23, 2011, at 5:24 AM, Alan Cox wrote: >>>=20 >>>> Author: alc >>>> Date: Thu Jun 23 05:23:59 2011 >>>> New Revision: 223464 >>>> URL: http://svn.freebsd.org/changeset/base/223464 >>>>=20 >>>> Log: >>>> Revert to using the page queues lock in vm_page_clear_dirty_mask() = on >>>> MIPS. (At present, although atomic_clear_char() is defined by = atomic.h >>>> on MIPS, it is not actually implemented by support.S.) >>> Thanks, >>> and good catch on the atomics even if not planned, just in time for = 9.0:) >> Yea, there's some work there to fix them... Not sure we can even fix = some of them atomically... >>=20 >=20 > I'm not sure that I understand what you mean by the second statement. = Can you elaborate? The 8- and 16-bit operations should be no less = "atomic" than the 32- and 64-bit operations. In general, regardless of = the size of the operation, the "sc" instruction may fail and the whole = operation has to be restarted if another processor (or I/O device) = performs a concurrent, cache coherent store to the same location (or = even cache line) as the "ll" and "sc" instructions are operating on. On = the other hand, if the "sc" instruction succeeds, whether you used it to = change all of the 32 bits or just 8 of the 32 bits, it should appear as = an atomic change to any other processor. I was thinking of the unaligned 16-bit case. Properly aligned I suppose = is a requirement, so I retract my statement: those are easy to = implement. Warner=