Received: by 10.223.164.202 with SMTP id h10csp1648634wrb; Thu, 16 Nov 2017 01:46:45 -0800 (PST) X-Google-Smtp-Source: AGs4zMY21hpysqRFvF7mdPt+85bBReKUTwRifksBLKx3wLDoPrRQsbzzbHL0nmrafGzU5nYfM74I X-Received: by 10.101.100.77 with SMTP id s13mr1098663pgv.15.1510825605603; Thu, 16 Nov 2017 01:46:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510825605; cv=none; d=google.com; s=arc-20160816; b=KU2gIFBy0wkdw6T8bz+/lsaw5s5C7YgtEfYPcaP7hG3YxkR6MBmevymkQwZePLtdPj UDOkonFtiqN7EaBVWOoOBpnQ4hFxh8WIDK1RjuIsPqrvh5bTT1MCdVt7lz9Rpr8Ds/T/ pUAQiaRzgdYgwlbwEX+LO2Q3+sZCo66xhUwFJgdRNbEAfXDasbHFSQ6s8cLwAsOlOvKb mQGs1mEW1UHneuuHjbT7m8B4Aituk1rZANjieBOH/1NnEctbfGzcWYkjj/HpqyODMw8V DORIpMnNLydLRzAu+Q+rXcnYTI5++r2IGsjbMCv1+/xRNh3yKcFxj0VJt/YAltPEsyYK Juqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=9Sp2pTr6OS4Rxb3QDB4Ji9+xPbDYflY5svWU6sruuHg=; b=D0lJ6Ws2BrL6layvTY+kAcTvKEWW7hLYh7nvmJC+ENKE3FgiDEGxX2PQS0bPHTyWmK ZdvlrSs+eC4VPcWrbp4m5byFu3tZ4HAy9jU6z9yWKr8AR/si9buBIaBAb1jl/HAejW5/ Vr+ORDTx5PT6aNNIsNSSAXw2aZpRqztkYY+IVI+GPQTwj3kvBNL+m2vRKgQSxyMgq27w rBaitTd1eYxjdy1r8UO+skCpUNFaQpcyywyMd9Cuyy1JINhGQTMNGrvQ0kx9z+xVPVMp X1gHwATeKwToQGYZr9EbyYl7rt6OcNAFTUO5ezba7YOGh/qaMfBF9P3rz3v9mSzIxyj7 qGLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=UXpnwTLF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 88si595539plf.291.2017.11.16.01.46.33; Thu, 16 Nov 2017 01:46:45 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=merlin.20170209 header.b=UXpnwTLF; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933907AbdKPJIL (ORCPT + 91 others); Thu, 16 Nov 2017 04:08:11 -0500 Received: from merlin.infradead.org ([205.233.59.134]:57826 "EHLO merlin.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758221AbdKPJIB (ORCPT ); Thu, 16 Nov 2017 04:08:01 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=merlin.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=9Sp2pTr6OS4Rxb3QDB4Ji9+xPbDYflY5svWU6sruuHg=; b=UXpnwTLFj3LXmd8JSemz/pQOh vSSUCusIn+OZUmObvZGG4Awt40T2a4ajrl4XCWj6vrVIcBt4fqKmR9GJhtx3fDVPQck5Gx7N1OBFM UG/6zI37qGudcvLmeUXNGcG2VEYHiK7Ed1stYNN7VcG3zLPOhhXRPVixJDYWPc4trh/kiJN1z3jkW K7iCjmXEX05+mfwqo1L5d+vi7oCuTKHzHm0hOKmP8ftsnHndeOwP27rVbI/oRPD4DdstJUy7YKXn3 /K3LijWhNth1KUgR/2LtmRhKcV2XaVl1mec9c8uVF8P7xY3w/XWe2jzLOkorYA5sJ/VTxWbHH3My+ C54MFF9dg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by merlin.infradead.org with esmtpsa (Exim 4.87 #1 (Red Hat Linux)) id 1eFG9O-00027S-CQ; Thu, 16 Nov 2017 09:07:58 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 162CE20292D24; Thu, 16 Nov 2017 10:07:57 +0100 (CET) Date: Thu, 16 Nov 2017 10:07:57 +0100 From: Peter Zijlstra To: Wanpeng Li Cc: "linux-kernel@vger.kernel.org" , kvm , Paolo Bonzini , Radim Kr??m???? , Wanpeng Li Subject: Re: [PATCH v5 2/4] KVM: X86: Add paravirt remote TLB flush Message-ID: <20171116090757.2lgjdrzdclppiiwm@hirez.programming.kicks-ass.net> References: <1510567280-19376-1-git-send-email-wanpeng.li@hotmail.com> <1510567280-19376-3-git-send-email-wanpeng.li@hotmail.com> <20171116083849.tvvxhu764uy5lryx@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20170609 (1.8.3) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Nov 16, 2017 at 04:51:39PM +0800, Wanpeng Li wrote: > 2017-11-16 16:38 GMT+08:00 Peter Zijlstra : > > On Thu, Nov 16, 2017 at 01:30:57PM +0800, Wanpeng Li wrote: > >> -static DEFINE_PER_CPU(cpumask_var_t, __pv_tlb_mask); > >> +static DEFINE_PER_CPU(cpumask_t, __pv_tlb_mask); > > > > NR_CPUS=512 is a fairly common distro setting, that means cpumask_t is > > 64 bytes. So for my 144 CPU system, that is 9216 bytes I'll never see > > again. > > > > Not nice :/ > > Refer to "DECLARE_PER_CPU_SHARED_ALIGNED(cpumask_t, cpu_sibling_map)" > in arch/ia64/include/asm/smp.h, it also defines variable directly, > however, some other archs are not. kvmclock_init() is also called very > early during boot, it utilizes memblock to alloc some memory. So the difference is that the sibling map is guaranteed to be used. This map of yours is only ever used if you run a paravirt kernel on a new enough host to advertise the capability etc. As said on IRC; I'm forever lost in the whole init / paravirt setup maze, but can't you simply do things later when the allocators work? ISTR we don't in fact run the alternative stuff _that_ early anyway. From 1584205961529214889@xxx Thu Nov 16 07:15:37 +0000 2017 X-GM-THRID: 1583909069046568739 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread