From: Cornelia Huck <cohuck@redhat.com>
To: Michael Mueller <mimu@linux.ibm.com>
Cc: borntraeger@de.ibm.com, frankja@linux.vnet.ibm.com,
kvm@vger.kernel.org, david@redhat.com, thuth@redhat.com,
linux-s390@vger.kernel.org
Subject: Re: [PATCH] KVM: s390: introduce module parameter kvm.use_gisa
Date: Thu, 27 Feb 2020 10:47:31 +0100 [thread overview]
Message-ID: <20200227104731.17166768.cohuck@redhat.com> (raw)
In-Reply-To: <20200227091031.102993-1-mimu@linux.ibm.com>
On Thu, 27 Feb 2020 10:10:31 +0100
Michael Mueller <mimu@linux.ibm.com> wrote:
> The boolean module parameter "kvm.use_gisa" controls if newly
> created guests will use the GISA facility if provided by the
> host system. The default is yes.
>
> # cat /sys/module/kvm/parameters/use_gisa
> Y
>
> The parameter can be changed on the fly.
>
> # echo N > /sys/module/kvm/parameters/use_gisa
>
> Already running guests are not affected by this change.
>
> The kvm s390 debug feature shows if a guest is running with GISA.
>
> # grep gisa /sys/kernel/debug/s390dbf/kvm-$pid/sprintf
> 00 01582725059:843303 3 - 08 00000000e119bc01 gisa 0x00000000c9ac2642 initialized
> 00 01582725059:903840 3 - 11 000000004391ee22 00[0000000000000000-0000000000000000]: AIV gisa format-1 enabled for cpu 000
> ...
> 00 01582725059:916847 3 - 08 0000000094fff572 gisa 0x00000000c9ac2642 cleared
Maybe log something as well if it is off due to this kernel parameter?
>
> In general, that value should not be changed as the GISA facility
> enhances interruption delivery performance.
>
> A reason to switch the GISA facility off might be a performance
> comparison run or debugging.
>
> Signed-off-by: Michael Mueller <mimu@linux.ibm.com>
> ---
> arch/s390/kvm/kvm-s390.c | 8 +++++++-
> 1 file changed, 7 insertions(+), 1 deletion(-)
>
> diff --git a/arch/s390/kvm/kvm-s390.c b/arch/s390/kvm/kvm-s390.c
> index d7ff30e45589..5c2081488024 100644
> --- a/arch/s390/kvm/kvm-s390.c
> +++ b/arch/s390/kvm/kvm-s390.c
> @@ -184,6 +184,11 @@ static u8 halt_poll_max_steal = 10;
> module_param(halt_poll_max_steal, byte, 0644);
> MODULE_PARM_DESC(halt_poll_max_steal, "Maximum percentage of steal time to allow polling");
>
> +/* if set to true, the GISA will be initialized and used if available */
> +static bool use_gisa = true;
> +module_param(use_gisa, bool, 0644);
> +MODULE_PARM_DESC(use_gisa, "Use the GISA if the host supports it.");
I probably would have inverted the logic (i.e. introduce a disable_gisa
parameter that is off by default), as you want KVM to use the gisa,
except in special circumstances.
> +
> /*
> * For now we handle at most 16 double words as this is what the s390 base
> * kernel handles and stores in the prefix page. If we ever need to go beyond
> @@ -2504,7 +2509,8 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
> kvm->arch.use_skf = sclp.has_skey;
> spin_lock_init(&kvm->arch.start_stop_lock);
> kvm_s390_vsie_init(kvm);
> - kvm_s390_gisa_init(kvm);
> + if (use_gisa)
> + kvm_s390_gisa_init(kvm);
I assume we're fine with no gisa but a gib (i.e. doesn't hurt?)
> KVM_EVENT(3, "vm 0x%pK created by pid %u", kvm, current->pid);
>
> return 0;
next prev parent reply other threads:[~2020-02-27 9:47 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-27 9:10 [PATCH] KVM: s390: introduce module parameter kvm.use_gisa Michael Mueller
2020-02-27 9:26 ` David Hildenbrand
2020-02-27 12:04 ` Michael Mueller
2020-02-27 12:31 ` David Hildenbrand
2020-02-27 12:57 ` Michael Mueller
2020-02-27 9:47 ` Cornelia Huck [this message]
2020-02-27 12:19 ` Michael Mueller
2020-02-27 12:27 ` Christian Borntraeger
2020-02-27 12:43 ` Michael Mueller
2020-02-27 13:24 ` Christian Borntraeger
2020-02-27 16:10 ` Michael Mueller
2020-02-27 12:48 ` Cornelia Huck
2020-02-27 12:56 ` Michael Mueller
2020-02-27 16:23 ` 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=20200227104731.17166768.cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=borntraeger@de.ibm.com \
--cc=david@redhat.com \
--cc=frankja@linux.vnet.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=mimu@linux.ibm.com \
--cc=thuth@redhat.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).