Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1635328imm; Fri, 6 Jul 2018 03:52:11 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfmoduxvPcwLXhpUFJ0l+dNYxboHeLLRw6Cs1UzYMw7Mw5o949f1klRrlFdw3C2rcVWJ7Ca X-Received: by 2002:a17:902:262:: with SMTP id 89-v6mr9892515plc.252.1530874331791; Fri, 06 Jul 2018 03:52:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530874331; cv=none; d=google.com; s=arc-20160816; b=MXaOlod6cZILWJWroHxsjiOMYFEtXow8rSA8t3oafHnrxxdMiAO/eA95xQFYDHlswl Ykh8Ch/8nFwEaMsVm0DX+yxZMFOrRDjrxtXkDYZH/WhVZuUhqxQ4D1FtkRvQ12FAuwMm vg7bjrSaM+4Jo143FBwhpplCsto/smnPnDjSigH+EFgq9VFKrmvNVc3lWMdUylR/X5av b7zwih64dHk9K506jMtkJBDdvgzAzSjS210LgE5hIPmKysJFuwXZ/oRiVkMJTdTsXTZt WJicm5Hye4FRdByVY9AXAfc5gshS8DBn4bPKjGcuTgVJJ2VNxriZtBK6sdK147t7YuLn aGpg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date :arc-authentication-results; bh=XS5zk5SVdFtswaH7vPKY1uH0nYqoT/rLaS9gIT1YJ40=; b=Q6MgthzYEfCpM6TvybQ3u0CYvofHZeiq4ppnmnv3JNvkhyR8p2yy4D0YtRyNbz3mx9 KIVBXaVjPAPchBJggPc0+C6xr2VPiH8j8Y6DLwtnKwoOeijrP9hE4xoB0J4Z2snfd3VA 3Rqnbtnka99FPF9HtIkg4ZtPfBBXnhhGUCbQIQBM3do/C8SSgokbMUXPAZ9hZZ9zZ46/ c5Amhw8j/9R0Qb8MKt5msPnFNVUO5WfC4N+vS5/WQs/lvBuWvw5C64Kxkz0pse2jv1XZ 98g5g5wPUaO7YshG+LRvlZrxLpMyBGfGWd5ci/YuHulAo9PVdT7bNyckMDBJrvPj+PmS e22Q== ARC-Authentication-Results: i=1; mx.google.com; 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 79-v6si8309196pfs.40.2018.07.06.03.51.56; Fri, 06 Jul 2018 03:52:11 -0700 (PDT) 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; 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 S1754100AbeGFKvK (ORCPT + 99 others); Fri, 6 Jul 2018 06:51:10 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:54059 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754048AbeGFKvJ (ORCPT ); Fri, 6 Jul 2018 06:51:09 -0400 Received: from hsi-kbw-5-158-153-52.hsi19.kabel-badenwuerttemberg.de ([5.158.153.52] helo=nanos) by Galois.linutronix.de with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1fbOJU-0005yx-Bj; Fri, 06 Jul 2018 12:50:08 +0200 Date: Fri, 6 Jul 2018 12:50:07 +0200 (CEST) From: Thomas Gleixner To: Paolo Bonzini cc: Pavel Tatashin , steven.sistare@oracle.com, daniel.m.jordan@oracle.com, linux@armlinux.org.uk, schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, john.stultz@linaro.org, sboyd@codeaurora.org, x86@kernel.org, linux-kernel@vger.kernel.org, mingo@redhat.com, hpa@zytor.com, douly.fnst@cn.fujitsu.com, peterz@infradead.org, prarit@redhat.com, feng.tang@intel.com, pmladek@suse.com, gnomes@lxorguk.ukuu.org.uk, linux-s390@vger.kernel.org Subject: Re: [PATCH v12 04/11] kvm/x86: remove kvm memblock dependency In-Reply-To: Message-ID: References: <20180621212518.19914-1-pasha.tatashin@oracle.com> <20180621212518.19914-5-pasha.tatashin@oracle.com> <52117b6e-cbdc-8583-494b-5e8e5d6d4265@redhat.com> <585b3646-5515-240a-db57-406d6c311a43@redhat.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 6 Jul 2018, Thomas Gleixner wrote: > On Fri, 6 Jul 2018, Paolo Bonzini wrote: > > On 06/07/2018 11:45, Thomas Gleixner wrote: > > >> One possibility is to introduce another layer of indirection: in > > >> addition to the percpu pvclock data, add a percpu pointer to the pvclock > > >> data and initialize it to point to a page-aligned variable in BSS. CPU0 > > >> (used by vDSO) doesn't touch the pointer and keeps using the BSS > > >> variable, APs instead redirect the pointer to the percpu data. > > > Yeah, thought about that, but the extra indirection is ugly. Instead of > > > using per cpu data, I just can allocate the memory _after_ the allocators > > > are up and running and use a single page sized static __initdata for the > > > early boot. > > > > Either works for me. Assembly-wise, the indirection should be more or > > less the same as what we have now; even more efficient because it > > accesses a percpu pointer instead of computing it based on > > smp_processor_id(). > > Good point. Let me try that. Duh, that either requires a static key or a static PER_CPU pointer thingy, which then wastes 8 bytes per cpu instead of 64 byte if unused. Thanks, tglx