linux-s390.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Cornelia Huck <cohuck@redhat.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>
Cc: Janosch Frank <frankja@linux.vnet.ibm.com>,
	KVM <kvm@vger.kernel.org>,
	linux-s390 <linux-s390@vger.kernel.org>,
	David Hildenbrand <david@redhat.com>
Subject: Re: [PATCH 1/2] KVM: s390: use switch vs jump table in priv.c
Date: Tue, 6 Feb 2018 13:02:12 +0100	[thread overview]
Message-ID: <20180206130212.7d6fe46b.cohuck@redhat.com> (raw)
In-Reply-To: <20180206112127.19014-2-borntraeger@de.ibm.com>

On Tue,  6 Feb 2018 11:21:26 +0000
Christian Borntraeger <borntraeger@de.ibm.com> wrote:

> instead of having huge jump tables for function selection,

s/instead/Instead/

> lets use normal switch/case statements for the instruction

s/lets/let's/

> handlers in priv.c
> 
> bloat-o-meter shows that the saving are even bigger than
> just the removed jump tables.
> 
> add/remove: 0/11 grow/shrink: 8/0 up/down: 1934/-10246 (-8312)
> Function                                     old     new   delta
> kvm_s390_handle_b2                            42     958    +916
> handle_iske                                  178     558    +380
> handle_rrbe                                  178     546    +368
> kvm_s390_handle_b9                            42     222    +180
> kvm_s390_handle_01                            42      74     +32
> kvm_s390_handle_eb                            42      70     +28
> handle_sckpf                                 176     204     +28
> handle_lctlg                                 628     630      +2
> handle_ptff                                   36       -     -36
> handle_sckpf.part                             78       -     -78
> handle_epsw                                  154       -    -154
> handle_stfl                                  316       -    -316
> handle_rrbe.part                             470       -    -470
> handle_iske.part                             482       -    -482
> handle_io_inst                               518       -    -518
> x01_handlers                                2048       -   -2048
> eb_handlers                                 2048       -   -2048
> b9_handlers                                 2048       -   -2048
> b2_handlers                                 2048       -   -2048

Neat.

> 
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
> ---
>  arch/s390/kvm/priv.c | 183 +++++++++++++++++++++++++--------------------------
>  1 file changed, 91 insertions(+), 92 deletions(-)

Reviewed-by: Cornelia Huck <cohuck@redhat.com>

  reply	other threads:[~2018-02-06 12:02 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-06 11:21 [PATCH 0/2] KVM: s390: avoid jump tables Christian Borntraeger
2018-02-06 11:21 ` [PATCH 1/2] KVM: s390: use switch vs jump table in priv.c Christian Borntraeger
2018-02-06 12:02   ` Cornelia Huck [this message]
2018-02-06 12:32   ` David Hildenbrand
2018-02-08  8:01   ` Heiko Carstens
2018-02-08  9:16   ` Janosch Frank
2018-02-06 11:21 ` [PATCH 2/2] KVM: s390: use switch vs jump table in intercept.c Christian Borntraeger
2018-02-06 12:04   ` Cornelia Huck
2018-02-06 12:05     ` Christian Borntraeger
2018-02-06 12:34   ` David Hildenbrand
2018-02-06 12:47   ` [PATCH v2 " Christian Borntraeger
2018-02-06 12:51     ` Cornelia Huck
2018-02-08  8:30     ` Janosch Frank
2018-02-06 12:30 ` [PATCH 0/2] KVM: s390: avoid jump tables David Hildenbrand
2018-02-06 12:36   ` Christian Borntraeger
2018-02-06 12:42     ` David Hildenbrand
2018-02-08  8:58   ` Heiko Carstens
2018-02-08  9:07     ` Christian Borntraeger
2018-02-08  9:18       ` Christian Borntraeger
2018-02-08 10:09     ` Christian Borntraeger
2018-02-08 10:18       ` Cornelia Huck

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=20180206130212.7d6fe46b.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 \
    /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).