From owner-freebsd-arch@FreeBSD.ORG Tue Jun 4 03:55:26 2013 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id A30F2151 for ; Tue, 4 Jun 2013 03:55:26 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-la0-x232.google.com (mail-la0-x232.google.com [IPv6:2a00:1450:4010:c03::232]) by mx1.freebsd.org (Postfix) with ESMTP id 2A8531902 for ; Tue, 4 Jun 2013 03:55:25 +0000 (UTC) Received: by mail-la0-f50.google.com with SMTP id ed20so4118951lab.23 for ; Mon, 03 Jun 2013 20:55:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :x-gm-message-state; bh=wOTHXKDbCzxubNM6SPoOBUamwHGn0dQNYctqIK7v5SQ=; b=ECDVdEY/lecqUjD3M1D/sYqDA0AVbXw/x9r+B2onTgmHFUMCQ/kaTN5ciI0hgqMxeV HOfvHWt8E6pFGyGLuwyT8tHcHIAwZc80MdnA/oUwnNcsvnsnisTFSEryFHPBIVI6Gpei FcGT+l3Qy6NsB9D1oN33YQHZhF3fTmsQ8q6ZZCxUZfAA76nQ5CoVhNjTyTYELHHYRadw n07XaDhB0CPsD9PIhmKBl9QYamZNFJm48IbMsQgRxTmcYuyUxc2npmnqxaO4lf3VwBhG TeMYssy1oy2rB33j5q161zR6LpwmSjOq44htLiE6oAxKhuL1lEXXfuvjhpK7ITKx3Ft4 hUIg== X-Received: by 10.112.89.8 with SMTP id bk8mr12168340lbb.73.1370318124329; Mon, 03 Jun 2013 20:55:24 -0700 (PDT) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.152.129.195 with HTTP; Mon, 3 Jun 2013 20:55:04 -0700 (PDT) In-Reply-To: References: From: Juli Mallett Date: Mon, 3 Jun 2013 20:55:04 -0700 X-Google-Sender-Auth: 6Wr2OOY81fqP7rhfs45eOMWDZbw Message-ID: Subject: Re: Kernelspace C11 atomics for MIPS To: Adrian Chadd X-Gm-Message-State: ALoCoQlwYa+iFk4MJobdbBUbtoEuVOVA1AZcLPDWlQWaX2ojyyfQDKOwcGIY7AhX3lwg1l0lChRm Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Ed Schouten , "freebsd-mips@FreeBSD.org" , FreeBSD-arch X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Jun 2013 03:55:26 -0000 On Mon, Jun 3, 2013 at 7:45 PM, Adrian Chadd wrote: > Speaking of this; any idea why the SYNC operators have 8 NOPs following > them? > > I noticed that when going through disassemblies of various mips24k .o > files. > To drain the pipeline on certain deficient (and mostly older) CPUs by way of guesswork and a little vague magic. Most CPUs we support, I would guess, do not need this, and it continues to exist solely for hysterical reasons. I've certainly gotten rid of them and some other cargo cult synchronization on Octeon for testing and had it survive under considerable load, and occasionally with some slight speedups (for some more commonly-used or slower things than Just a Bunch Of NOPs.) The trouble is that proving they aren't necessary requires being rigorous and careful in understanding documentation and errata, and FUD about their possible necessity is somewhat-intimidating. It's not an easy kind of corruption/unreliability/etc., to prove the lack of empirically. Juli.