From: Jan Kiszka <jan.kiszka@web.de>
To: "Andreas Färber" <afaerber@suse.de>
Cc: imammedo@redhat.com, gleb@redhat.com, qemu-devel@nongnu.org,
anthony@codemonkey.ws, ehabkost@redhat.com
Subject: Re: [Qemu-devel] [PATCH RFC qom-cpu-next] apic: QOM'ify APICCommonState casts
Date: Sun, 28 Apr 2013 16:13:09 +0200 [thread overview]
Message-ID: <517D2E75.4050500@web.de> (raw)
In-Reply-To: <517D29E8.40507@suse.de>
[-- Attachment #1: Type: text/plain, Size: 1628 bytes --]
On 2013-04-28 15:53, Andreas Färber wrote:
> Am 28.04.2013 15:03, schrieb Jan Kiszka:
>> On 2013-04-28 13:22, Andreas Färber wrote:
>>> Necessary to change the name of ICCDevice's parent object field.
>>>
>>> Signed-off-by: Andreas Färber <afaerber@suse.de> --- Could any of
>>> the APIC experts please review whether I'm touching any hot
>>> path? Not sure if this was a mix of pre- and post-QOM code or
>>> intentional... Thanks.
>
>> How "hot" does it have to be before we notice the type check
>> overhead? Did anyone already measure this, given that they are
>> getting very common now?
>
> Heh, if I had a conclusive benchmark I wouldn't ask. ;)
Do object_class_dynamic_cast & friends show up higher in profiling
results when using your patch with an emulated APIC?
>
> In general init, reset and MMIO were considered cold paths in this
> regard. Timer and interrupt code paths by contrast I've usually tried
> to spare.
...but not in this patch. There are things like "deliver",
"get_interupt", "accept", and the APIC MMIO handlers are stressed at
least once per IRQ as well (EOI). When emulating in userspace.
>
>> But none of the touched functions are used during normal operation
>> when the KVM APIC is active. With emulated APIC, they are
>> frequently used, of course.
>
> Where in doubt, we could just use (APICCommonState *) or a macro
> hiding that.
Actually, I would prefer making the typical type check (class up- and
down-casts) so light-weight that we do not have to worry. Something that
ideally boils down to comparing two magic numbers inline.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 263 bytes --]
next prev parent reply other threads:[~2013-04-28 14:13 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-28 11:22 [Qemu-devel] [PATCH RFC qom-cpu-next] apic: QOM'ify APICCommonState casts Andreas Färber
2013-04-28 13:03 ` Jan Kiszka
2013-04-28 13:53 ` Andreas Färber
2013-04-28 14:13 ` Jan Kiszka [this message]
2013-04-29 10:29 ` Igor Mammedov
2013-04-29 11:30 ` Andreas Färber
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=517D2E75.4050500@web.de \
--to=jan.kiszka@web.de \
--cc=afaerber@suse.de \
--cc=anthony@codemonkey.ws \
--cc=ehabkost@redhat.com \
--cc=gleb@redhat.com \
--cc=imammedo@redhat.com \
--cc=qemu-devel@nongnu.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).