All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
To: kvm-ppc@vger.kernel.org
Subject: Re: [PATCH 1/3] kvmppc: optimize irq delivery path
Date: Mon, 13 Oct 2008 06:22:54 +0000	[thread overview]
Message-ID: <48F2E93E.50604@linux.vnet.ibm.com> (raw)
In-Reply-To: <1223636372-8946-3-git-send-email-ehrhardt@linux.vnet.ibm.com>

Hollis Blanchard wrote:
> On Fri, 2008-10-10 at 12:59 +0200, ehrhardt@linux.vnet.ibm.com wrote:
>   
>> From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
>>
>> In kvmppc_deliver_interrupt is just one case left in the switch and it is a
>> rare one (less than 8%) when looking at the exit numbers. Therefore we can
>> at least drop the switch/case and if an if. I inserted an unlikely too, but
>> that's open for discussion.
>>
>> In kvmppc_can_deliver_interrupt all frequent cases are in the default case.
>> I know compilers are smart but we can make it easier for them. By writing
>> down all options and removing the default case combined with the fact that
>> ithe values are constants 0..15 should allow the compiler to write an easy
>> jump table.
>> Modifying kvmppc_can_deliver_interrupt pointed me to the fact that gcc seems
>> to be unable to reduce priority_exception[x] to a build time constant.
>> Therefore I changed the usage of the translation arrays in the interrupt
>> delivery path completely. It is now using priority without translation to irq
>> on the full irq delivery path.
>> To be able to do that ivpr regs are stored by their priority now.
>>     
>
> I like this, but a few notes:
>
> Why did you convert exception_priority[] to int? AFAICS it still only
> holds values 0-15, and using chars would shrink it from 2 32-byte
> cachelines (3 unaligned) to half of one.
>   
Your right, I changed it while modifying the code to match the type used 
to call functions for a test and forgot to revert it.
Will be changed in v2.
> It looks like you applied this on top of the pvmem patches. I guess the
> performance benefit is significant enough to apply those, but I'll have
> to find the patches again.
>   
I can rebase them to bring them in pre pvmem, no need you do that work.
This also fixed the dependencies to e.g. the exit timing patches.

Applying pv patches too would be nice, we can talk this week about that 
more in detail (if/when/how to do it).
> I think the IVOR emulation has gotten wide enough that you can add some
> newlines.
>   
I need to run checkpatch once more on the current version anyway - I 
just wanted to put that out for discussion on friday, thats why I missed 
those 80+ lines :-/
> AFAICS the *_PRIO constants aren't used in assembly, so do they need to
> go into kvm_asm.h?
>   
I wanted to place them near the non _PRIO irq constants, not needed for 
the code but nice to understand the code.
But your right, officially I think they should stay in asm/kvm_ppc.h - I 
can relocate them in v2 of the patches.

-- 

Grüsse / regards, 
Christian Ehrhardt
IBM Linux Technology Center, Open Virtualization


  parent reply	other threads:[~2008-10-13  6:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-10 10:59 [PATCH 1/3] kvmppc: optimize irq delivery path ehrhardt
2008-10-10 18:07 ` Hollis Blanchard
2008-10-13  6:22 ` Christian Ehrhardt [this message]
2008-10-13 12:07 ` ehrhardt

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=48F2E93E.50604@linux.vnet.ibm.com \
    --to=ehrhardt@linux.vnet.ibm.com \
    --cc=kvm-ppc@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.