From owner-svn-src-all@FreeBSD.ORG Thu Jun 23 20:03:29 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 5B1FC1065670; Thu, 23 Jun 2011 20:03:29 +0000 (UTC) (envelope-from alc@rice.edu) Received: from mh5.mail.rice.edu (mh5.mail.rice.edu [128.42.199.32]) by mx1.freebsd.org (Postfix) with ESMTP id 2297D8FC15; Thu, 23 Jun 2011 20:03:29 +0000 (UTC) Received: from mh5.mail.rice.edu (localhost.localdomain [127.0.0.1]) by mh5.mail.rice.edu (Postfix) with ESMTP id 7E41829011B; Thu, 23 Jun 2011 15:03:28 -0500 (CDT) X-Virus-Scanned: by amavis-2.6.4 at mh5.mail.rice.edu, auth channel Received: from mh5.mail.rice.edu ([127.0.0.1]) by mh5.mail.rice.edu (mh5.mail.rice.edu [127.0.0.1]) (amavis, port 10026) with ESMTP id pmwLqZW9DZc1; Thu, 23 Jun 2011 15:03:28 -0500 (CDT) Received: from [10.74.20.46] (staff-74-dun20-046.rice.edu [10.74.20.46]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) (Authenticated sender: alc) by mh5.mail.rice.edu (Postfix) with ESMTPSA id 3CDC429011A; Thu, 23 Jun 2011 15:03:28 -0500 (CDT) Message-ID: <4E039C0F.10505@rice.edu> Date: Thu, 23 Jun 2011 15:03:27 -0500 From: Alan Cox User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10 MIME-Version: 1.0 To: Warner Losh References: <201106230524.p5N5O0Rs084548@svn.freebsd.org> <31243267-5FE1-4104-9B77-4F3EAAD4523B@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 20:03:29 -0000 On 6/23/2011 1:30 PM, Warner Losh wrote: > On Jun 23, 2011, at 2:17 AM, Bjoern A. Zeeb wrote: > >> On Jun 23, 2011, at 5:24 AM, Alan Cox wrote: >> >>> Author: alc >>> Date: Thu Jun 23 05:23:59 2011 >>> New Revision: 223464 >>> URL: http://svn.freebsd.org/changeset/base/223464 >>> >>> 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... > 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. Alan > Warner