All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Stabellini <stefano.stabellini@xilinx.com>
To: Milan Boberic <milanboberic94@gmail.com>
Cc: stefano.stabellini@xilinx.com, andrii_anisov@epam.com,
	Dario Faggioli <dfaggioli@suse.com>,
	julien.grall@arm.com, sstabellini@kernel.org,
	Meng Xu <xumengpanda@gmail.com>,
	xen-devel@lists.xenproject.org, nd@arm.com
Subject: Re: Xen optimization
Date: Mon, 22 Oct 2018 10:52:20 -0700	[thread overview]
Message-ID: <alpine.DEB.2.10.1810221037270.31582@sstabellini-ThinkPad-X260> (raw)
In-Reply-To: <CADJ6SV2891kOd_Ga8jjXdtKdjPAoWtADhizuS+kjSZNNOPMK+w@mail.gmail.com>

On Mon, 22 Oct 2018, Milan Boberic wrote:
> Hi,
> 
> > I think we want to fully understand how many other interrupts the
> > baremetal guest is receiving. To do that, we can modify my previous
> > patch to suppress any debug messages for virq=68. That way, we should
> > only see the other interrupts. Ideally there would be none.
> > diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c
> > index 5a4f082..b7a8e17 100644
> > --- a/xen/arch/arm/vgic.c
> > +++ b/xen/arch/arm/vgic.c
> > @@ -577,7 +577,11 @@ void vgic_inject_irq(struct domain *d, struct vcpu *v, unsigned int virq,
> >      /* the irq is enabled */
> >      if ( test_bit(GIC_IRQ_GUEST_ENABLED, &n->status) )
> > +    {
> >          gic_raise_guest_irq(v, virq, priority);
> > +        if ( d->domain_id != 0 && virq != 68 )
> > +            printk("DEBUG virq=%d local=%d\n",virq,v == current);
> > +    }
> >      list_for_each_entry ( iter, &v->arch.vgic.inflight_irqs, inflight )
> >      {
> 
> when I apply this patch there are no prints nor debug messages in xl
> dmesg. So bare-metal receives only interrupt 68, which is good.

Yes, good!


> > Next step would be to verify that there are no other physical interrupts
> > interrupting the vcpu execution other the irq=68. We should be able to
> > check that with the following debug patch:
> >
> > diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
> > index e524ad5..b34c3e4 100644
> > --- a/xen/arch/arm/gic.c
> > +++ b/xen/arch/arm/gic.c
> > @@ -381,6 +381,13 @@ void gic_interrupt(struct cpu_user_regs *regs, int is_fiq)
> >          /* Reading IRQ will ACK it */
> >          irq = gic_hw_ops->read_irq();
> > +        if (current->domain->domain_id > 0 && irq != 68)
> > +        {
> > +            local_irq_enable();
> > +            printk("DEBUG irq=%d\n",irq);
> > +            local_irq_disable();
> > +        }
> > +
> >          if ( likely(irq >= 16 && irq < 1020) )
> >          {
> >              local_irq_enable();
> 
> But when I apply this patch it prints forever:
> (XEN) DEBUG irq=1023
> 
> Thanks in advance!

I know why! It's because we always loop around until we read the
spurious interrupt. Just add an && irq != 1023 to the if check.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-10-22 17:52 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-09 10:59 Xen optimization Milan Boberic
2018-10-09 16:46 ` Dario Faggioli
2018-10-10 11:22   ` Milan Boberic
2018-10-10 11:25     ` Milan Boberic
2018-10-10 16:41     ` Meng Xu
2018-10-11  7:36       ` Milan Boberic
2018-10-11 12:17         ` Milan Boberic
2018-10-11 17:05           ` Dario Faggioli
2018-10-11 15:39         ` Meng Xu
2018-10-11 22:29         ` Stefano Stabellini
2018-10-12 15:33           ` Milan Boberic
2018-10-12 16:36             ` Julien Grall
2018-10-12 17:43             ` Stefano Stabellini
2018-10-13 16:01               ` Milan Boberic
2018-10-14 22:46                 ` Stefano Stabellini
2018-10-15 12:27                   ` Milan Boberic
2018-10-16  7:13                     ` Stefano Stabellini
2018-10-15  8:14                 ` Julien Grall
2018-10-15 12:50                   ` Julien Grall
2018-10-15 13:01                     ` Milan Boberic
2018-10-15 13:03                       ` Julien Grall
2018-10-17 15:19                         ` Milan Boberic
2018-10-19 21:02                           ` Stefano Stabellini
2018-10-19 22:41                             ` Dario Faggioli
2018-10-22 15:02                               ` Milan Boberic
2018-10-22 17:52                                 ` Stefano Stabellini [this message]
2018-10-23  8:58                                   ` Milan Boberic
2018-10-24  0:24                                     ` Stefano Stabellini
2018-10-25 10:09                                       ` Milan Boberic
2018-10-25 11:30                                         ` Julien Grall
2018-10-25 12:36                                           ` Milan Boberic
2018-10-25 13:44                                             ` Dario Faggioli
2018-10-25 14:00                                               ` Julien Grall
2018-10-25 14:04                                             ` Julien Grall
2018-10-25 14:47                                               ` Milan Boberic
2018-10-25 14:51                                                 ` Julien Grall
2018-10-25 16:18                                                   ` Xen optimizationcy Stefano Stabellini
2018-10-25 11:09                                       ` Xen optimization Julien Grall
2018-10-25 16:15                                         ` Stefano Stabellini
2018-10-26 19:12                                           ` Julien Grall
2018-10-26 20:41                                             ` Stefano Stabellini
2018-10-29 12:29                                               ` Milan Boberic
2018-10-31 18:59                                                 ` Julien Grall
2018-10-31 20:35                                                   ` Milan Boberic
2018-10-31 21:16                                                     ` Julien Grall
2018-11-01 20:20                                                       ` Stefano Stabellini
2018-11-01 20:35                                                         ` Julien Grall
2018-11-20 11:33                                                         ` Andrii Anisov
2018-11-27 21:27                                                           ` Stefano Stabellini
2018-11-29  8:19                                                             ` Andrii Anisov
2018-12-10 10:58                                                             ` Andrii Anisov
2018-12-10 11:54                                                               ` Julien Grall
2018-12-10 12:23                                                                 ` Andrii Anisov
2018-12-11 12:27                                                                   ` Julien Grall
2018-12-11 16:56                                                                     ` Dario Faggioli
2018-12-12  9:39                                                                       ` Andrii Anisov
2018-12-12 17:10                                                                         ` Dario Faggioli
2018-12-12 17:32                                                                           ` Andrii Anisov
2018-12-12 17:59                                                                             ` Dario Faggioli
2018-12-13  7:48                                                                               ` Andrii Anisov
2018-12-11 18:39                                                                     ` Stefano Stabellini
2018-12-11 19:05                                                                       ` Julien Grall
2018-12-11 19:29                                                                         ` Stefano Stabellini
2018-12-12  9:46                                                                           ` Andrii Anisov
2018-12-12 10:41                                                                             ` Andrii Anisov
2018-12-12 17:39                                                                               ` Stefano Stabellini
2018-12-12 17:47                                                                                 ` Andrii Anisov
2018-12-12 18:01                                                                                   ` Stefano Stabellini
2018-12-12  9:34                                                                     ` Andrii Anisov
2018-11-07 13:14   ` Julien Grall

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=alpine.DEB.2.10.1810221037270.31582@sstabellini-ThinkPad-X260 \
    --to=stefano.stabellini@xilinx.com \
    --cc=andrii_anisov@epam.com \
    --cc=dfaggioli@suse.com \
    --cc=julien.grall@arm.com \
    --cc=milanboberic94@gmail.com \
    --cc=nd@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.org \
    --cc=xumengpanda@gmail.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 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.