Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750835AbbLTT7w (ORCPT ); Sun, 20 Dec 2015 14:59:52 -0500 Received: from casper.infradead.org ([85.118.1.10]:38589 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750714AbbLTT7v (ORCPT ); Sun, 20 Dec 2015 14:59:51 -0500 Date: Sun, 20 Dec 2015 20:59:44 +0100 From: Peter Zijlstra To: Andrew Cooper Cc: "Michael S. Tsirkin" , Jason Wang , Rusty Russell , qemu-devel@nongnu.org, Alexander Duyck , linux-kernel@vger.kernel.org, David Vrabel , xen-devel@lists.xenproject.org, Boris Ostrovsky , virtualization@lists.linux-foundation.org Subject: Re: [Xen-devel] new barrier type for paravirt (was Re: [PATCH] virtio_ring: use smp_store_mb) Message-ID: <20151220195944.GT6344@twins.programming.kicks-ass.net> References: <1450347932-16325-1-git-send-email-mst@redhat.com> <20151217105238.GA6375@twins.programming.kicks-ass.net> <20151217131554-mutt-send-email-mst@redhat.com> <20151217135726.GA6344@twins.programming.kicks-ass.net> <20151217161124-mutt-send-email-mst@redhat.com> <20151217143910.GD6344@twins.programming.kicks-ass.net> <20151220105146-mutt-send-email-mst@redhat.com> <5676E047.3010808@citrix.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5676E047.3010808@citrix.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1119 Lines: 28 On Sun, Dec 20, 2015 at 05:07:19PM +0000, Andrew Cooper wrote: > > Very much +1 for fixing this. > > Those names would be fine, but they do add yet another set of options in > an already-complicated area. > > An alternative might be to have the regular smp_{w,r,}mb() not revert > back to nops if CONFIG_PARAVIRT, or perhaps if pvops have detected a > non-native environment. (I don't know how feasible this suggestion is, > however.) So a regular SMP kernel emits the LOCK prefix and will patch it out with a DS prefix (iirc) when it finds but a single CPU. So for those you could easily do this. However an UP kernel will not emit the LOCK and do no patching. So if you're willing to make CONFIG_PARAVIRT depend on CONFIG_SMP or similar, this is doable. I don't see people going to allow emitting the LOCK prefix (and growing the kernel text size) for UP kernels. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/