From owner-svn-src-head@FreeBSD.ORG Fri Jun 24 11:39:34 2011 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (unknown [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0D0F31065670; Fri, 24 Jun 2011 11:39:34 +0000 (UTC) (envelope-from asmrookie@gmail.com) Received: from mail-gx0-f182.google.com (mail-gx0-f182.google.com [209.85.161.182]) by mx1.freebsd.org (Postfix) with ESMTP id 6C5398FC18; Fri, 24 Jun 2011 11:39:33 +0000 (UTC) Received: by gxk28 with SMTP id 28so1437208gxk.13 for ; Fri, 24 Jun 2011 04:39:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=FfiIKhI1itQWoBkAADFYsVCwDaOxgSoytgKFUHT19/Y=; b=xaLJMJzwRPWRJiW7VA/FkRqpAIjqnuZuIazA7QSY5dqot5zL5PJa6siIrymtfn3v6z 0STGxgEKH7ADb3+FjlBcNcXIt6eCLhdcdSN2u33a9enkKuDR686WnwW6z2A5QhueNnj/ Llu4bM2uToFlqXy6iC9+CCEbPxeM6yhRk99YM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=NLeNIOBAvqXaH408rq8f6j+MtD9eqQeR1IZPtbKQQL8Kff9pIvTkeh6RFT6ScZNDfk F87SUhvrCjLWiCamO4YUIy9DPoRvd1+cOU67TUs2KVEaugHdx89Eaai0PGSn5HMZNCf+ H+Qcho/a+gd95N2o7snQ4B27zDMtmSDUWFW0A= MIME-Version: 1.0 Received: by 10.236.133.39 with SMTP id p27mr2605789yhi.135.1308915572662; Fri, 24 Jun 2011 04:39:32 -0700 (PDT) Sender: asmrookie@gmail.com Received: by 10.236.110.141 with HTTP; Fri, 24 Jun 2011 04:39:32 -0700 (PDT) In-Reply-To: References: <201106230524.p5N5O0Rs084548@svn.freebsd.org> <31243267-5FE1-4104-9B77-4F3EAAD4523B@FreeBSD.org> <4E039C0F.10505@rice.edu> Date: Fri, 24 Jun 2011 13:39:32 +0200 X-Google-Sender-Auth: bthJlVBxI4tt7v_1xn1B1fepZaU Message-ID: From: Attilio Rao To: "Jayachandran C." Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: src-committers@freebsd.org, Alan Cox , 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-head@freebsd.org X-Mailman-Version: 2.1.5 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: Fri, 24 Jun 2011 11:39:34 -0000 2011/6/24 Jayachandran C. : > 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. =C2=A0(At present, although atomic_clear_char() is defined by a= tomic.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... =C2=A0Not sure we can even = fix some >>> of them atomically... >>> >> >> I'm not sure that I understand what you mean by the second statement. = =C2=A0Can >> you elaborate? =C2=A0The 8- and 16-bit operations should be no less "ato= mic" than >> the 32- and 64-bit operations. =C2=A0In 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, ca= che >> coherent store to the same location (or even cache line) as the "ll" and >> "sc" instructions are operating on. =C2=A0On the other hand, if the "sc" >> instruction succeeds, whether you used it to change all of the 32 bits o= r >> 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 There is a chance we can leave all the atomic support inlined in atomic.h? When I looked into it, my opinion is that support.S part is just in the wrong place (and Warner didn't have a good explanation for it, so I don't see a problem about moving anything to atomic.h). Attilio --=20 Peace can only be achieved by understanding - A. Einstein