From owner-svn-src-all@freebsd.org Fri Apr 26 06:05:10 2019 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 6099B158A500; Fri, 26 Apr 2019 06:05:10 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id C8FD484B60; Fri, 26 Apr 2019 06:05:09 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-pl1-x631.google.com with SMTP id x15so995727pln.9; Thu, 25 Apr 2019 23:05:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=F88BkHvr1bWX8eSRoYfCHcwUo9jqxFOAd+ta9G+dnMw=; b=EuwZAWOQBjBDZDBTe5GG3khmT1kMzwp01EwsfrEaEPKZKQlbHiRGn2ey4me4ofAPOV PqPAADaZKwWxdQWs5sHjPbHV+yt13k0NiE9dsSgpjwkCYxSAxBSUlYqI0Sim7tFiDEo7 G50jD+Y4XqwnRSWs652VQpIliSuRSwZduMc3sIEf9ZCmk6g+/LYstuCcDAIwNF8TZ9h6 qVpA1q8dHk1KwtncYf7O8Q3ZUlS4JQ7bEMxQIG6tgc8s8MyH5cdTnwGuY31OM95De6et Bjc+r9hmL/DmYPaBJFUve/TrJ4jpTGwhW3uZhNAK3wfd/nJucEPQNtlasrIL+0lrpLCU bOmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=F88BkHvr1bWX8eSRoYfCHcwUo9jqxFOAd+ta9G+dnMw=; b=UyzpZ0YiNBiBBKONV4llLGMwqJiAxZrlpRm2IliwNkfn9PE51+I0pce7SpFIkD1DrH jJTpeDeYiw4sM7k6S02GwmC7Vn1GhgNYDpIUU4vFf/CgW76PgbjValXmm6ydatmy9wDo VaWUXdmWG0oKPF9kW6idrFj8Je9hy5WIJKnHnXO7JX5NL4OeWw62NWc6Z0cMYiEvah9y rGByxQMbkiGWdKSio3CRzdxLn515LhtCKoVc2xvyMblBBlAC/yIDlQzjgqgcelRpnBQ9 FIsCkm1D3CiAkgGrbrF7xJMC+tpPLQTM8e2S3OsbLwpLkS7aCetqYOwUFUVJuB89vt99 XHKA== X-Gm-Message-State: APjAAAU6oE4buTu9FWpKl1AhDUdb1bWZTIlKp0KlkaqwdUv8KcYkFkfO hZsYP4JU5ncn4impxyjdlqyN1tul X-Google-Smtp-Source: APXvYqyLNGbyBlXkv1v/OGyXxegLUmdUh55mbjaPE8afNvRy1AhU0UBX+iZkcLtDM0N723DVb/oeVg== X-Received: by 2002:a17:902:266:: with SMTP id 93mr44175236plc.201.1556258707871; Thu, 25 Apr 2019 23:05:07 -0700 (PDT) Received: from spy ([180.217.236.228]) by smtp.gmail.com with ESMTPSA id n65sm58618407pfb.160.2019.04.25.23.05.04 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 25 Apr 2019 23:05:06 -0700 (PDT) Sender: Mark Johnston Date: Fri, 26 Apr 2019 02:04:56 -0400 From: Mark Johnston To: Konstantin Belousov Cc: Wojciech Macek , Wojciech Macek , src-committers , svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r346593 - head/sys/sys Message-ID: <20190426060456.GA59853@spy> References: <201904230636.x3N6aWQK057863@repo.freebsd.org> <20190425040817.GA3789@spy> <20190425082222.GJ12936@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190425082222.GJ12936@kib.kiev.ua> User-Agent: Mutt/1.11.4 (2019-03-13) X-Rspamd-Queue-Id: C8FD484B60 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.95 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-0.998,0]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_SHORT(-0.95)[-0.952,0] X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.29 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, 26 Apr 2019 06:05:10 -0000 On Thu, Apr 25, 2019 at 11:22:22AM +0300, Konstantin Belousov wrote: > On Thu, Apr 25, 2019 at 07:38:21AM +0200, Wojciech Macek wrote: > > Intel does not reorder reads against the condition "if" here. I know for > > sure that ARM does, but therestill might be some other architectures that > > also suffers such behavior - I just don't have any means to verify. > > I remember the discussion for rS302292 where we agreed that this kind of > > patches should be the least impacting in perfomrance as possible. Adding > > unconditional memory barrier causes significant performance drop on Intel, > > where in fact, the issue was never seen. > > > Atomic_thread_fence_acq() is nop on x86, or rather, it is compiler memory > barrier. If you need read/read fence on some architectures, I am sure > that you need compiler barrier on all. To add a bit, one reason to prefer atomic(9) to explicit fences is precisely because it issues fences only when required by a given CPU architecture. There is no "unconditional memory barrier" added by the diff even without the #ifdef.