From owner-svn-src-all@FreeBSD.ORG Fri Jun 24 03:31:40 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 BED41106564A; Fri, 24 Jun 2011 03:31:40 +0000 (UTC) (envelope-from c.jayachandran@gmail.com) Received: from mail-ww0-f50.google.com (mail-ww0-f50.google.com [74.125.82.50]) by mx1.freebsd.org (Postfix) with ESMTP id 99A038FC13; Fri, 24 Jun 2011 03:31:39 +0000 (UTC) Received: by wwe6 with SMTP id 6so2337520wwe.31 for ; Thu, 23 Jun 2011 20:31:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=do5RqvBDQw9GB9Q2JhbOs2FAoI9AbgMvtrcnRXGIclw=; b=mm8XmdY9go+WXAU3hxrYSb9vVwGnuCBzs+LaclGL4xs0B7colfPyZlcyq86CV3WGri Pe219AF7m26N/8JgtNIo14XuBj5IvmPZF2rtMCzyCEMvjsZRqnL2I6vfdIYO6aaZxId7 7kVunW+yJA0pAQEYrh/iahcSCuZeXC8temaWo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=H1PcGOSWuBEViee/LRXhP3Rht6V5l0PqpqC0hZAANYBzh2StDmntxWswCFOx5GE0FZ xJlbYfLh37JTl7rI3fqgRsqPMH1eubteuGqskCMgpqwG1rKUbJ7XEXWNVIypu3i9fFEF QNDL1QPVcTM5JbHBEVpqIJNx/PyptW3CBJvs0= MIME-Version: 1.0 Received: by 10.216.68.6 with SMTP id k6mr6237wed.85.1308884697347; Thu, 23 Jun 2011 20:04:57 -0700 (PDT) Received: by 10.216.166.195 with HTTP; Thu, 23 Jun 2011 20:04:57 -0700 (PDT) In-Reply-To: <4E039C0F.10505@rice.edu> References: <201106230524.p5N5O0Rs084548@svn.freebsd.org> <31243267-5FE1-4104-9B77-4F3EAAD4523B@FreeBSD.org> <4E039C0F.10505@rice.edu> Date: Fri, 24 Jun 2011 08:34:57 +0530 Message-ID: From: "Jayachandran C." To: Alan Cox Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: src-committers@freebsd.org, Alan Cox , svn-src-all@freebsd.org, "Bjoern A. Zeeb" , svn-src-head@freebsd.org, Warner Losh 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: Fri, 24 Jun 2011 03:31:40 -0000 On Fri, Jun 24, 2011 at 1:33 AM, 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: >> >>> 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. =A0(At present, although atomic_clear_char() is defined by atomi= c.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... =A0Not sure we can even fix = some >> of them atomically... >> > > I'm not sure that I understand what you mean by the second statement. =A0= Can > you elaborate? =A0The 8- and 16-bit operations should be no less "atomic"= than > the 32- and 64-bit operations. =A0In general, regardless of the size of t= he > operation, the "sc" instruction may fail and the whole operation has to b= e > restarted if another processor (or I/O device) performs a concurrent, cac= he > coherent store to the same location (or even cache line) as the "ll" and > "sc" instructions are operating on. =A0On 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 will try out an implementation and see if this works on XLR, if so this is something we can add to support.S JC.