From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754153AbcALW4V (ORCPT ); Tue, 12 Jan 2016 17:56:21 -0500 Received: from terminus.zytor.com ([198.137.202.10]:39065 "EHLO mail.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753320AbcALW4U (ORCPT ); Tue, 12 Jan 2016 17:56:20 -0500 Subject: Re: [PATCH 3/4] x86,asm: Re-work smp_store_mb() To: "Michael S. Tsirkin" , Andy Lutomirski References: <1445975631-17047-4-git-send-email-dave@stgolabs.net> <20151027223744.GB11242@worktop.amr.corp.intel.com> <20151102201535.GB1707@linux-uzut.site> <20160112150032-mutt-send-email-mst@redhat.com> <56956276.1090705@kernel.org> <20160113001824-mutt-send-email-mst@redhat.com> Cc: Linus Torvalds , Andy Lutomirski , Davidlohr Bueso , Davidlohr Bueso , Peter Zijlstra , the arch/x86 maintainers , Linux Kernel Mailing List , virtualization , Thomas Gleixner , "Paul E. McKenney" , Ingo Molnar From: "H. Peter Anvin" Message-ID: <56958467.6010808@zytor.com> Date: Tue, 12 Jan 2016 14:55:35 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <20160113001824-mutt-send-email-mst@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/12/16 14:21, Michael S. Tsirkin wrote: > > OK so I'll have to tweak the test to put something > on stack to measure the difference: my test tweaks a > global variable instead. > I'll try that by tomorrow. > > I couldn't measure any difference between mfence and lock+addl > except in a micro-benchmark, but hey since we are tweaking this, > let's do the optimal thing. > Be careful with this: if it only shows up in a microbenchmark, we may introduce a hard-to-debug regression for no real benefit. -hpa