public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Avi Kivity <avi@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	linux-kernel@vger.kernel.org, kvm <kvm@vger.kernel.org>,
	Tom Lyon <pugs@cisco.com>,
	Alex Williamson <alex.williamson@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	Jan Kiszka <jan.kiszka@siemens.com>
Subject: Re: [PATCH v3 2/4] genirq: Inform handler about line sharing state
Date: Thu, 16 Dec 2010 21:26:11 +0100	[thread overview]
Message-ID: <4D0A75E3.3090900@web.de> (raw)
In-Reply-To: <alpine.LFD.2.00.1012161410440.12146@localhost6.localdomain6>

[-- Attachment #1: Type: text/plain, Size: 1369 bytes --]

Am 16.12.2010 14:13, Thomas Gleixner wrote:
> On Mon, 13 Dec 2010, Jan Kiszka wrote:
>> +	if (old_action && (old_action->flags & IRQF_ADAPTIVE) &&
>> +	    !(desc->irq_data.drv_status & IRQS_SHARED)) {
>> +		/*
>> +		 * Signal the old handler that is has to switch to shareable
>> +		 * handling mode. Disable the line to avoid any conflict with
>> +		 * a real IRQ.
>> +		 */
>> +		disable_irq(irq);
> 
> This is weird, really. I thought you wanted to avoid waiting for the
> threaded handler to finish if it's on the fly. So this should be
> disable_irq_nosync() or did you change your mind ?

No, I did not. I wanted to avoid that we set MAKE_SHAREABLE while there
might be another IRQ in flight. The handler that is called due to a real
IRQ might misinterpret MAKE_SHAREABLE as "there is no real event" and
perform the wrong steps (at least the current implementation for KVM would).

However, I will rebase my patch over your series now and try to re-think
this. The question is what could go wrong if we do not guarantee that
MAKE_SHAREABLE and ordinary IRQ will always be distinguishable. If there
is really nothing, specifically for the KVM scenario, we could even drop
the disable/enable_irq. That would be also be nicer when thinking about
potential delays of the already registered handler during this
transitional phase.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 259 bytes --]

  reply	other threads:[~2010-12-16 20:26 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-13 22:59 [PATCH v3 0/4] KVM & genirq: Enable adaptive IRQ sharing for passed-through devices Jan Kiszka
2010-12-13 22:59 ` [PATCH v3 1/4] genirq: Introduce driver-readable IRQ status word Jan Kiszka
2010-12-14 20:47   ` Thomas Gleixner
2010-12-14 23:10     ` Jan Kiszka
2010-12-13 22:59 ` [PATCH v3 2/4] genirq: Inform handler about line sharing state Jan Kiszka
2010-12-14 20:54   ` Thomas Gleixner
2010-12-14 23:00     ` Jan Kiszka
2010-12-15 13:04       ` Thomas Gleixner
2010-12-15 14:18         ` Jan Kiszka
2010-12-15 14:49           ` Thomas Gleixner
2010-12-15 15:41           ` Thomas Gleixner
2010-12-15 15:49             ` Jan Kiszka
2010-12-15 16:02               ` Thomas Gleixner
2010-12-14 21:46   ` Thomas Gleixner
2010-12-14 23:01     ` Jan Kiszka
2010-12-15  8:05       ` Thomas Gleixner
2010-12-15  9:37         ` Jan Kiszka
2010-12-15  9:48           ` Thomas Gleixner
2010-12-16 13:13   ` Thomas Gleixner
2010-12-16 20:26     ` Jan Kiszka [this message]
2010-12-16 21:28       ` change of email address: pugs@cisco.com -> pugs@ieee.org Tom Lyon
2010-12-17  8:18       ` [PATCH v3 2/4] genirq: Inform handler about line sharing state Jan Kiszka
2010-12-17 10:23         ` Thomas Gleixner
2010-12-17 10:31           ` Jan Kiszka
2010-12-17 10:41             ` Thomas Gleixner
2010-12-17 10:48               ` Jan Kiszka
2010-12-17 15:25                 ` Thomas Gleixner
2010-12-17 16:06                   ` Jan Kiszka
2010-12-17 16:32                     ` Thomas Gleixner
2010-12-18 18:11                       ` Michael S. Tsirkin
2010-12-13 22:59 ` [PATCH v3 3/4] genirq: Add support for IRQF_COND_ONESHOT Jan Kiszka
2010-12-13 22:59 ` [PATCH v3 4/4] KVM: Allow host IRQ sharing for passed-through PCI 2.3 devices Jan Kiszka
2010-12-14  8:53 ` [PATCH v3 0/4] KVM & genirq: Enable adaptive IRQ sharing for passed-through devices Avi Kivity
2010-12-14 22:01 ` Thomas Gleixner

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=4D0A75E3.3090900@web.de \
    --to=jan.kiszka@web.de \
    --cc=alex.williamson@redhat.com \
    --cc=avi@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=mtosatti@redhat.com \
    --cc=pugs@cisco.com \
    --cc=tglx@linutronix.de \
    /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