From: Paolo Bonzini <pbonzini@redhat.com>
To: Yunhong Jiang <yunhong.jiang@linux.intel.com>,
Alex Williamson <alex.williamson@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] VFIO: Add a parameter to force nonthread IRQ
Date: Tue, 27 Oct 2015 10:29:28 +0100 [thread overview]
Message-ID: <562F43F8.1040101@redhat.com> (raw)
In-Reply-To: <20151027063501.GA22054@jnakajim-build>
On 27/10/2015 07:35, Yunhong Jiang wrote:
> On Mon, Oct 26, 2015 at 09:37:14PM -0600, Alex Williamson wrote:
>> On Mon, 2015-10-26 at 18:20 -0700, Yunhong Jiang wrote:
>>> An option to force VFIO PCI MSI/MSI-X handler as non-threaded IRQ,
>>> even when CONFIG_IRQ_FORCED_THREADING=y. This is uselful when
>>> assigning a device to a guest with low latency requirement since it
>>> reduce the context switch to/from the IRQ thread.
>>
>> Is there any way we can do this automatically? Perhaps detecting that
>> we're on a RT kernel or maybe that the user is running with RT priority?
>> I find that module options are mostly misunderstood and misused.
>
> Alex, thanks for review.
>
> It's not easy to detect if the user is running with RT priority, since
> sometimes the user start the thread and then set the scheduler priority
> late.
>
> Also should we do this only for in kernel irqchip scenario and not for user
> space handler, since in kernel irqchip has lower overhead?
The overhead of the non-threaded IRQ handler is the same for kernel or
userspace irqchip, since the handler just writes 1 to the eventfd.
On RT kernels however can you call eventfd_signal from interrupt
context? You cannot call spin_lock_irqsave (which can sleep) from a
non-threaded interrupt handler, can you? You would need a raw spin lock.
Paolo
next prev parent reply other threads:[~2015-10-27 9:29 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-27 1:20 [RFC PATCH] VFIO: Add a parameter to force nonthread IRQ Yunhong Jiang
2015-10-27 3:37 ` Alex Williamson
2015-10-27 6:35 ` Yunhong Jiang
2015-10-27 9:29 ` Paolo Bonzini [this message]
2015-10-27 21:26 ` Yunhong Jiang
2015-10-28 0:44 ` Paolo Bonzini
2015-10-28 16:00 ` Alex Williamson
2015-10-28 17:05 ` Paolo Bonzini
2015-10-28 23:54 ` Marcelo Tosatti
2015-10-29 3:11 ` Alex Williamson
2015-10-29 9:45 ` Paolo Bonzini
2015-10-30 6:16 ` Yunhong Jiang
2015-11-02 9:17 ` Paolo Bonzini
2015-10-28 17:50 ` Yunhong Jiang
2015-10-28 18:18 ` Alex Williamson
2015-10-28 21:46 ` Yunhong Jiang
2015-10-28 18:28 ` Paolo Bonzini
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=562F43F8.1040101@redhat.com \
--to=pbonzini@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=yunhong.jiang@linux.intel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).