From owner-freebsd-mips@FreeBSD.ORG Tue Jun 4 03:57:52 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 77B1F235; Tue, 4 Jun 2013 03:57:52 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qe0-f48.google.com (mail-qe0-f48.google.com [209.85.128.48]) by mx1.freebsd.org (Postfix) with ESMTP id B56F01918; Tue, 4 Jun 2013 03:57:51 +0000 (UTC) Received: by mail-qe0-f48.google.com with SMTP id 2so1352401qea.7 for ; Mon, 03 Jun 2013 20:57:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=wzZzWKsOzqixlVirXSFfSMCMvKvuBGyXjgtmRkySlFw=; b=hFV5iuxDYtq+KoiaW1e0xIeGfbw9XHuf3LEaSnSIjsPZsTWiuidnYpA3dYo37sjW7/ gD1ZMDJsJ1qPdJ7GhsTSkGu92GPVSirmKYTCsrn7ZPJ9n/9Do5S7zTzy8Smc6sCDW967 kYvpZUTnNpdzHqUSLYTlpNHDGNTqIIol7WjBuzQCrxqxOeQ2n4te3okfJl8Rom0GPU1S Fg4Fe7NVkyW28dhLZ2AY91suKYzGEuguC4g5YeqsIFuCJVlTuo2Ys6rXyoS4MdwsOugv 5pcnRQwQxhZkKM7f2VvzLul4lOM/vXi+ZJ+SY+ZJyoDFKkNxBMaTStYfJpKyHibzeg6Q leiA== MIME-Version: 1.0 X-Received: by 10.229.149.14 with SMTP id r14mr5802450qcv.59.1370318265612; Mon, 03 Jun 2013 20:57:45 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.71.12 with HTTP; Mon, 3 Jun 2013 20:57:45 -0700 (PDT) In-Reply-To: References: Date: Mon, 3 Jun 2013 20:57:45 -0700 X-Google-Sender-Auth: 4aJjyK5RjzXSjOg7ZrQc72CBkFU Message-ID: Subject: Re: Kernelspace C11 atomics for MIPS From: Adrian Chadd To: Juli Mallett Content-Type: text/plain; charset=ISO-8859-1 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:57:52 -0000 On 3 June 2013 20:55, Juli Mallett wrote: > 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. How can I turn it off for my compiles? > 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.) Right. Well, since it's happening on every inlined lock, it's a bit silly. > 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. I've checked the diassembly from gcc-4.mumble on linux; it doesn't include NOPs like this as far as I can tell. Adrian