From: Ian Campbell <Ian.Campbell@citrix.com>
To: jmkim.kim@samsung.com
Cc: Julien Grall <julien.grall@citrix.com>, xen-devel@lists.xen.org
Subject: Re: A suggestion about processing irq
Date: Mon, 19 Aug 2013 15:53:15 +0100 [thread overview]
Message-ID: <1376923995.9708.10.camel@dagon.hellion.org.uk> (raw)
In-Reply-To: <21544000.538851376879393907.JavaMail.weblogic@epml08>
On Mon, 2013-08-19 at 02:29 +0000, 김재민 wrote:
> Hello,
> While I was reading gic handling part of xen arm, I noticed that, in gic_set_guest_irq function,
> if lr_pending is not empty, the arrival irq is also stored into pending list.
> I think although lr_pending is not empty, there maybe empty slots in lr, and if so, we can insert
> IRQ immediately. Since I'd like to keep the IRQ in priority order, how about checking the
> highest priority in lr_pending list rather than emptiness?
> Here goes the simple patch:
Julien & Stefano know about this stuff -- guys?
Julien was planning to rework a bunch of the interrupt handling stuff, I
don't know if that was orthogonal to this or not.
>
> Signed-off-by: Jaemin Kim <jmkim.kim@samsung.com>
> ---
> diff -urN xen/arch/arm/gic.c xen2/arch/arm/gic.c
> --- xen/arch/arm/gic.c 2013-07-30 10:16:45.076382483 +0900
> +++ xen2/arch/arm/gic.c 2013-07-31 11:19:28.094799335 +0900
> @@ -587,12 +587,17 @@
> unsigned int state, unsigned int priority)
> {
> int i;
> - struct pending_irq *iter, *n;
> + struct pending_irq *iter, *n, *first_item;
> unsigned long flags;
> spin_lock_irqsave(&gic.lock, flags);
> +
> + first_item = list_entry( (&v->arch.vgic.lr_pending)->next,
> + typeof(*iter), lr_queue );
> - if (( v == current ) && (list_empty(&v->arch.vgic.lr_pending) ))
> + if ( ( v == current ) &&
> + ( list_empty(&v->arch.vgic.lr_pending) ||
> + ( priority > first_item->priority ) ) )
> {
> i = find_first_zero_bit(&this_cpu(lr_mask), nr_lrs);
> if (i < nr_lrs) {
> ---
> Thanks.
> Best Regards.
> Jaemin Kim
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xen.org
> http://lists.xen.org/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2013-08-19 14:53 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-19 2:29 A suggestion about processing irq 김재민
2013-08-19 14:53 ` Ian Campbell [this message]
2013-08-20 12:41 ` Julien Grall
2013-08-20 13:15 ` Julien Grall
2013-08-27 12:04 ` Stefano Stabellini
-- strict thread matches above, loose matches on Subject: below --
2013-08-23 9:45 jaemin kim
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=1376923995.9708.10.camel@dagon.hellion.org.uk \
--to=ian.campbell@citrix.com \
--cc=jmkim.kim@samsung.com \
--cc=julien.grall@citrix.com \
--cc=xen-devel@lists.xen.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.