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]
Date:	Wed, 17 Jun 2009 10:44:34 -0700 (PDT)
From:	Davide Libenzi <davidel@...ilserver.org>
To:	Gregory Haskins <ghaskins@...ell.com>
cc:	"Michael S. Tsirkin" <mst@...hat.com>, kvm@...r.kernel.org,
	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	avi@...hat.com, paulmck@...ux.vnet.ibm.com,
	Ingo Molnar <mingo@...e.hu>
Subject: Re: [KVM-RFC PATCH 1/2] eventfd: add an explicit srcu based notifier
 interface

On Wed, 17 Jun 2009, Gregory Haskins wrote:

> Can you elaborate?  I currently do not see how I could do the proposed
> concept inside of irqfd while still using eventfd.  Of course, that
> would be possible if we fork irqfd from eventfd,  and perhaps this is
> what you are proposing.  As previously stated I don't want to give up on
> the prospect of re-using it quite yet, so bear with me. :)
> 
> The issue with eventfd, as I see it, is that eventfd uses a
> spin_lock_irqsave (by virtue of the wait-queue stuff) across the
> "signal" callback (which today is implemented as a wake-up).  This
> spin_lock implicitly creates a non-preemptible critical section that
> occurs independently of whether eventfd_signal() itself is invoked from
> a sleepable context or not.
> 
> What I strive to achieve is to remove the creation of this internal
> critical section.  If eventfd_signal() is called from atomic context, so
> be it.  We will detect this in the callback and be forced to take the
> slow-path, and I am ok with that.  *But*, if eventfd_signal() (or
> f_ops->write(), for that matter) are called from a sleepable context
> *and* eventfd doesn't introduce its own critical section (such as with
> my srcu patch), we can potentially optimize within the callback by
> executing serially instead of deferring (e.g. via a workqueue).

Since when the scheduling (assuming it's not permanently running on 
another core due to high frequency work post) of a kernel thread is such 
a big impact that interfaces need to be redesigned for that?
How much the (possible, but not certain) kernel thread context switch time 
weighs in the overall KVM IRQ service time?



> It can!  :) This is not changing from whats in mainline today (covered
> above).

It can/could, if the signal() function takes very accurate care of doing 
the magic atomic check.



- Davide


--
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