From: Anthony Liguori <anthony@codemonkey.ws>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH RESEND] apic: Don't iterate past last used apic
Date: Tue, 16 Nov 2010 09:47:11 -0600 [thread overview]
Message-ID: <4CE2A77F.7040008@codemonkey.ws> (raw)
In-Reply-To: <20101105220128.26044.11658.stgit@s20.home>
On 11/05/2010 05:01 PM, Alex Williamson wrote:
> local_apics are allocated sequentially and never removed, so
> we can stop any iterations that go to MAX_APICS as soon as we
> hit the first NULL. Looking at a small guest running a virtio-net
> workload with oprofile, this drops apic_get_delivery_bitmask()
> from #3 in the profile to down in the noise.
>
> Signed-off-by: Alex Williamson<alex.williamson@redhat.com>
>
Applied. Thanks.
Regards,
Anthony LIguori
> ---
>
> hw/apic.c | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/hw/apic.c b/hw/apic.c
> index 63d62c7..5f4a87c 100644
> --- a/hw/apic.c
> +++ b/hw/apic.c
> @@ -437,6 +437,8 @@ static int apic_find_dest(uint8_t dest)
> apic = local_apics[i];
> if (apic&& apic->id == dest)
> return i;
> + if (!apic)
> + break;
> }
>
> return -1;
> @@ -472,6 +474,8 @@ static void apic_get_delivery_bitmask(uint32_t *deliver_bitmask,
> set_bit(deliver_bitmask, i);
> }
> }
> + } else {
> + break;
> }
> }
> }
>
>
>
>
prev parent reply other threads:[~2010-11-16 15:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-05 22:01 [Qemu-devel] [PATCH RESEND] apic: Don't iterate past last used apic Alex Williamson
2010-11-16 15:47 ` Anthony Liguori [this message]
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=4CE2A77F.7040008@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=alex.williamson@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 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.