Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1631216imm; Fri, 6 Jul 2018 03:46:38 -0700 (PDT) X-Google-Smtp-Source: AAOMgpeGMIdbsS+Z4TaG2R6g//qJJQr4tO7bbVXXjx6wJ+qjQV0cJqT4diHSiz5jyWw9b+F9ZLsa X-Received: by 2002:a63:6ac6:: with SMTP id f189-v6mr1362827pgc.170.1530873998509; Fri, 06 Jul 2018 03:46:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530873998; cv=none; d=google.com; s=arc-20160816; b=VrXZyOR1VydhEQKjN0TVvlaO16XDfY4728X/AV1Rwmi7X/9yueVyaub2BfpwsAr05M amZwtlkhp0nUG85i0iZULYuu6ytL/JJ18EnEcaU9eQaJFJ3pUuUqrAqc6mdeJQUlUUlW AqY1lyC49TMzeyfPYG+aLjsHHW2lu2LRt2yLaN0i+twbF1vW3ZkZ94MyJkJR8953f8oC uwUPJm8ci6OI3hbamKOEJhx3cfxJNGAr3Kecnb5CWuTm/za/KbcwXeYax5oJCpc62ftq tGb9HpE6ilV5A46cYZsxmkeLsSXRkTxbiqVHbWsg3oNHCreOTU0cp3NQXqQNFy/IMonB nFjg== 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=lAuXBsDLZzuKXOpl4V4BlAKrE15NguFpzTHZQeV4vng=; b=En/QwKaIvsih0OBtz9I9QWTuuFIBQI1TjZRaeqzc9ibSctOjmXTW7LvC9PrjQTRI6r 8rRUKdP49DijCZEkI32dlNThJACKJlE8f4gr/mEZTTUmHi9/QtLeEnCM4RrlD6Abz3Iu Zj7pjpjkMTG3DgWRu4cZqw0xVM7n4hrlrD0KzgAbUzrTs7CM9F5LUTtV8RHdgp4aH5au +N5dDgsfBt7As/88APRZ1edPeu6Ld5p59mrhOk0KWrZnU3OmUj76zj3DL1Z4i/O4hkTi k8HGayPlCO3Ban9Q74J9PMYLWVBJDx2xNUWgdzwWBSoo+WjPXfq0sEE/NO/fpEDhR8Dt 3FJg== 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 v17-v6si6400869pgk.135.2018.07.06.03.46.23; Fri, 06 Jul 2018 03:46:38 -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 S1753702AbeGFKos (ORCPT + 99 others); Fri, 6 Jul 2018 06:44:48 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:54033 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753467AbeGFKor (ORCPT ); Fri, 6 Jul 2018 06:44:47 -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 1fbODb-0005sj-H4; Fri, 06 Jul 2018 12:44:03 +0200 Date: Fri, 6 Jul 2018 12:44:02 +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: <585b3646-5515-240a-db57-406d6c311a43@redhat.com> 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, 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. Thanks, tglx