From owner-freebsd-mips@FreeBSD.ORG Tue Jun 4 03:55:26 2013 Return-Path: Delivered-To: freebsd-mips@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 A6DA8152 for ; Tue, 4 Jun 2013 03:55:26 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-la0-x22e.google.com (mail-la0-x22e.google.com [IPv6:2a00:1450:4010:c03::22e]) by mx1.freebsd.org (Postfix) with ESMTP id 2A7E41901 for ; Tue, 4 Jun 2013 03:55:25 +0000 (UTC) Received: by mail-la0-f46.google.com with SMTP id eg20so833150lab.33 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=RayRgNO3bA3YdxqLcEKTWcROgdfbcyEKn4qpRaf7QHAfPkWklxn2dYS6A46J71PPXF XifBkMXVErv7ymkSbbPYLR0WawTSOTdP6kZs45FxSkXqcn6mjbOsNNKwk8i7Fdg1B8Tx a/eZ4wIe8Y+e8rHL3GDvf9Tl1ZE5lnM9+TiH+nacSaHUZqr1c2orNIkfaBV2Oy/hx9vm mM1Zxo/hot3LkPvyAf3fNSxU0EbujAdbaRfQ9pRHkk4C6FGBnH66SJGLEfllkq2a9v93 C2B2ymzsutq3yX2ZGaEEnmkGQqPi7by4ZKv/bnLb+cOYgdpS5iTqpxP0YVRi9YgDbI/X Vhug== 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: ALoCoQnwwtBnMWmZzwxmJSub7jVkedPyhq2FdqHuFyhzS4IIb851rLjROJXQuulHqRdR4GMlXca9 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-mips@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to MIPS 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.