Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752346AbdHNNU4 (ORCPT ); Mon, 14 Aug 2017 09:20:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47132 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752270AbdHNNUz (ORCPT ); Mon, 14 Aug 2017 09:20:55 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 88B1710F5C2 Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx09.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=vkuznets@redhat.com From: Vitaly Kuznetsov To: Peter Zijlstra Cc: Linus Torvalds , Jork Loeser , KY Srinivasan , Simon Xiao , Haiyang Zhang , Stephen Hemminger , "luto\@kernel.org" , "hpa\@zytor.com" , "linux-kernel\@vger.kernel.org" , "rostedt\@goodmis.org" , "andy.shevchenko\@gmail.com" , "tglx\@linutronix.de" , "mingo\@kernel.org" , "linux-tip-commits\@vger.kernel.org" , "Kirill A. Shutemov" Subject: Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush References: <20170802160921.21791-8-vkuznets@redhat.com> <20170810185646.GI6524@worktop.programming.kicks-ass.net> <20170810192742.GJ6524@worktop.programming.kicks-ass.net> <20170811090336.lfznz6qzrbhiqwvi@hirez.programming.kicks-ass.net> <20170811162605.tr4tig4av3q4fll6@hirez.programming.kicks-ass.net> Date: Mon, 14 Aug 2017 15:20:49 +0200 In-Reply-To: <20170811162605.tr4tig4av3q4fll6@hirez.programming.kicks-ass.net> (Peter Zijlstra's message of "Fri, 11 Aug 2017 18:26:05 +0200") Message-ID: <87fucup9ou.fsf@vitty.brq.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Mon, 14 Aug 2017 13:20:54 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1811 Lines: 49 Peter Zijlstra writes: > On Fri, Aug 11, 2017 at 09:16:29AM -0700, Linus Torvalds wrote: >> On Fri, Aug 11, 2017 at 2:03 AM, Peter Zijlstra wrote: >> > >> > I'm sure we talked about using HAVE_RCU_TABLE_FREE for x86 (and yes that >> > would make it work again), but this was some years ago and I cannot >> > readily find those emails. >> >> I think the only time we really talked about HAVE_RCU_TABLE_FREE for >> x86 (at least that I was cc'd on) was not because of RCU freeing, but >> because we just wanted to use the generic page table lookup code on >> x86 *despite* not using RCU freeing. >> >> And we just ended up renaming HAVE_GENERIC_RCU_GUP as HAVE_GENERIC_GUP. >> >> There was only passing mention of maybe making x86 use RCU, but the >> discussion was really about why the IF flag meant that x86 didn't need >> to, iirc. >> >> I don't recall us ever discussing *really* making x86 use RCU. > > Google finds me this: > > https://lwn.net/Articles/500188/ > > Which includes: > > http://www.mail-archive.com/kvm@vger.kernel.org/msg72918.html > > which does as was suggested here, selects HAVE_RCU_TABLE_FREE for > PARAVIRT_TLB_FLUSH. > > But yes, this is very much virt specific nonsense, native would never > need this. In case we decide to go HAVE_RCU_TABLE_FREE for all PARAVIRT-enabled kernels (as it seems to be the easiest/fastest way to fix Xen PV) - what do you think about the required testing? Any suggestion for a specifically crafted micro benchmark in addition to standard ebizzy/kernbench/...? Additionally, I see another option for us: enable 'rcu table free' on boot (e.g. by taking tlb_remove_table to pv_ops and doing boot-time patching for it) so bare metal and other hypervisors are not affected by the change. -- Vitaly