lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <562F43F8.1040101@redhat.com>
Date:	Tue, 27 Oct 2015 10:29:28 +0100
From:	Paolo Bonzini <pbonzini@...hat.com>
To:	Yunhong Jiang <yunhong.jiang@...ux.intel.com>,
	Alex Williamson <alex.williamson@...hat.com>
Cc:	kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] VFIO: Add a parameter to force nonthread IRQ



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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ