All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Julien Grall <julien.grall@gmail.com>
Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>,
	Dave P Martin <dave.martin@arm.com>,
	Jan Beulich <JBeulich@suse.com>, Juergen Gross <jgross@suse.com>,
	Julien Grall <julien.grall@arm.com>,
	Stefano Stabellini <sstabellini@kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [Xen-devel] xen/evtchn and forced threaded irq
Date: Thu, 21 Feb 2019 10:14:31 +0100	[thread overview]
Message-ID: <20190221091431.vqi53op37mvhi25z@Air-de-Roger> (raw)
In-Reply-To: <CAF3u54Ct7nBjoLw9Vzb=aZVu=N5Ccp5_k6GxLo_ZSA=YCsco6A@mail.gmail.com>

On Thu, Feb 21, 2019 at 08:38:39AM +0000, Julien Grall wrote:
> Hi Roger,
> 
> On Thu, 21 Feb 2019, 08:08 Roger Pau Monné, <roger.pau@citrix.com> wrote:
> 
> > FWIW, you can also mask the interrupt while waiting for the thread to
> > execute the interrupt handler. Ie:
> >
> 
> Thank you for providing steps, however where would the masking be done? By
> the irqchip or a custom solution?

I'm not familiar with the irqchip infrastructure in Linux, what I
proposed below is what FreeBSD does when running interrupt handlers in
deferred threads IIRC.

If irqchip has a specific handler to dispatch to a thread, then that's
the place where the masking should happen. Likely, the unmasking
should be done by the irq handling infrastructure after the thread
executing the interrupt handler has finished.

Isn't there a similar way to handle interrupts in threads for Linux?

> 
> > 1. Interrupt injected
> > 2. Execute guest event channel callback
> > 3. Scan for pending interrupts
> > 4. Mask interrupt
> > 5. Clear pending field
> > 6. Queue threaded handler
> > 7. Go to 3 until all interrupts are drained
> > [...]
> > 8. Execute interrupt handler in thread
> > 9. Unmask interrupt
> >
> > That should prevent you from stacking interrupts?
> >
> > Roger.
> >

  parent reply	other threads:[~2019-02-21  9:15 UTC|newest]

Thread overview: 62+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-19 17:31 xen/evtchn and forced threaded irq Julien Grall
2019-02-20  0:02 ` Boris Ostrovsky
2019-02-20 14:15   ` Julien Grall
2019-02-20 14:15   ` Julien Grall
2019-02-20 17:07     ` Boris Ostrovsky
2019-02-20 18:05       ` Julien Grall
2019-02-20 20:04         ` Boris Ostrovsky
2019-02-20 20:46           ` Julien Grall
2019-02-20 21:46             ` Boris Ostrovsky
2019-02-20 21:46             ` Boris Ostrovsky
2019-02-20 22:03               ` Julien Grall
2019-02-21  8:07                 ` Roger Pau Monné
2019-02-21  8:07                 ` [Xen-devel] " Roger Pau Monné
2019-02-21  8:38                   ` Julien Grall
2019-02-21  8:52                     ` [Xen-devel] " Juergen Gross
2019-02-21  8:52                     ` Juergen Gross
2019-02-21  9:14                     ` Roger Pau Monné
2019-02-21  9:14                     ` Roger Pau Monné [this message]
2019-02-21 20:46                       ` [Xen-devel] " Julien Grall
2019-02-21 20:46                       ` Julien Grall
2020-04-27 23:20                     ` [Xen-devel] " Stefano Stabellini
2020-04-27 23:20                       ` Stefano Stabellini
2019-02-22 11:44                 ` Jan Beulich
2019-02-22 11:44                 ` Jan Beulich
2019-02-20 22:03               ` Julien Grall
2019-02-22 12:38             ` Oleksandr Andrushchenko
2019-02-22 12:38             ` [Xen-devel] " Oleksandr Andrushchenko
2019-02-22 13:33               ` Julien Grall
2019-02-25 13:24                 ` Oleksandr Andrushchenko
2019-02-25 13:24                 ` [Xen-devel] " Oleksandr Andrushchenko
2019-02-25 13:55                   ` Julien Grall
2019-02-25 13:55                   ` [Xen-devel] " Julien Grall
2019-02-25 14:08                     ` Oleksandr Andrushchenko
2019-02-25 14:08                     ` [Xen-devel] " Oleksandr Andrushchenko
2019-02-25 15:26                       ` Julien Grall
2019-02-25 15:26                       ` [Xen-devel] " Julien Grall
2019-02-26  9:14                     ` Roger Pau Monné
2019-02-26  9:14                     ` [Xen-devel] " Roger Pau Monné
2019-02-26  9:30                       ` Andrew Cooper
2019-02-26  9:30                       ` [Xen-devel] " Andrew Cooper
2019-02-26  9:44                         ` Roger Pau Monné
2019-02-26  9:44                         ` [Xen-devel] " Roger Pau Monné
2019-02-26 10:03                           ` Julien Grall
2019-02-26 10:03                           ` [Xen-devel] " Julien Grall
2019-02-26 10:17                             ` Roger Pau Monné
2019-02-26 10:17                             ` [Xen-devel] " Roger Pau Monné
2019-02-26 10:26                               ` Julien Grall
2019-02-26 10:26                               ` [Xen-devel] " Julien Grall
2019-02-26 11:02                                 ` Roger Pau Monné
2019-02-26 11:02                                 ` [Xen-devel] " Roger Pau Monné
2019-02-27 11:09                                   ` Julien Grall
2019-02-27 11:09                                   ` [Xen-devel] " Julien Grall
2019-02-26  9:45                         ` Paul Durrant
2019-02-26  9:45                         ` Paul Durrant
2019-02-22 13:33               ` Julien Grall
2019-02-20 20:46           ` Julien Grall
2019-02-20 20:04         ` Boris Ostrovsky
2019-02-20 18:05       ` Julien Grall
2019-02-20 17:07     ` Boris Ostrovsky
2019-02-20  0:02 ` Boris Ostrovsky
2019-02-21  8:17 ` Juergen Gross
2019-02-21  8:17 ` Juergen Gross

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=20190221091431.vqi53op37mvhi25z@Air-de-Roger \
    --to=roger.pau@citrix.com \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=dave.martin@arm.com \
    --cc=jgross@suse.com \
    --cc=julien.grall@arm.com \
    --cc=julien.grall@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sstabellini@kernel.org \
    --cc=xen-devel@lists.xenproject.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.