From: Paolo Bonzini <pbonzini@redhat.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: KVM <kvm@vger.kernel.org>,
linux-s390 <linux-s390@vger.kernel.org>,
Cornelia Huck <cornelia.huck@de.ibm.com>
Subject: Re: [PULL 1/4] KVM: s390: randomize sca address
Date: Tue, 25 Mar 2014 14:53:56 +0100 [thread overview]
Message-ID: <53318A74.9010504@redhat.com> (raw)
In-Reply-To: <1395754523-43697-2-git-send-email-borntraeger@de.ibm.com>
Il 25/03/2014 14:35, Christian Borntraeger ha scritto:
> We allocate a page for the 2k sca, so lets use the space to improve
> hit rate of some internal cpu caches. No need to change the freeing
> of the page, as this will shift away the page offset bits anyway.
>
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> Reviewed-by: David Hildenbrand <dahi@linux.vnet.ibm.com>
> ---
> arch/s390/kvm/kvm-s390.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index 7337c57..a02979f 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -215,6 +215,7 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
> {
> int rc;
> char debug_name[16];
> + static unsigned long sca_offset;
>
> rc = -EINVAL;
> #ifdef CONFIG_KVM_S390_UCONTROL
> @@ -236,6 +237,10 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
> kvm->arch.sca = (struct sca_block *) get_zeroed_page(GFP_KERNEL);
> if (!kvm->arch.sca)
> goto out_err;
> + spin_lock(&kvm_lock);
> + sca_offset = (sca_offset + 16) & 0x7f0;
> + kvm->arch.sca = (struct sca_block *) ((char *) kvm->arch.sca + sca_offset);
> + spin_unlock(&kvm_lock);
>
> sprintf(debug_name, "kvm-%u", current->pid);
>
>
Does this have to remain the same across migration?
Paolo
next prev parent reply other threads:[~2014-03-25 13:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-25 13:35 [PULL 0/4] KVM: s390: last fixes for next merge window Christian Borntraeger
2014-03-25 13:35 ` [PULL 1/4] KVM: s390: randomize sca address Christian Borntraeger
2014-03-25 13:53 ` Paolo Bonzini [this message]
2014-03-25 14:04 ` Christian Borntraeger
2014-03-25 13:35 ` [PULL 2/4] KVM: s390: fix calculation of idle_mask array size Christian Borntraeger
2014-03-25 13:55 ` Paolo Bonzini
2014-03-25 13:35 ` [PULL 3/4] KVM: s390: Fix possible memory leak in SIGP functions Christian Borntraeger
2014-03-25 14:02 ` Paolo Bonzini
2014-03-25 14:39 ` Christian Borntraeger
2014-03-25 14:43 ` Paolo Bonzini
2014-03-25 13:35 ` [PULL 4/4] KVM: s390: clear local interrupts at cpu initial reset Christian Borntraeger
2014-03-25 13:56 ` Paolo Bonzini
2014-03-25 14:18 ` Christian Borntraeger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53318A74.9010504@redhat.com \
--to=pbonzini@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=cornelia.huck@de.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.