LWN.net Logo

Toward a safer fput()

Toward a safer fput()

Posted Apr 26, 2012 4:38 UTC (Thu) by josh (subscriber, #17465)
Parent article: Toward a safer fput()

task_work_add also seems like a great way for the kernel to get work done on behalf of a given process, charging the work to that process and letting it get scheduled with the priority of that process.


(Log in to post comments)

Toward a safer fput()

Posted Apr 26, 2012 12:54 UTC (Thu) by valyala (guest, #41196) [Link]

Actually, task_work_add() resembles kernel-mode APC (Asynchronous Procedure Call) [1].

[1] http://msdn.microsoft.com/en-us/library/windows/desktop/m... .

Toward a safer fput()

Posted Apr 27, 2012 8:09 UTC (Fri) by pbonzini (subscriber, #60935) [Link]

It does, except that it doesn't wreak havoc on synchronization primitives (APCs can be queued on processes that are waiting on a semaphore or event; if that happens, and a concurrent wakeup happens, something else will be woken up with potential for starvation or even deadlocks). Search for PulseEvent on MSDN or Raymond Chen's blog.

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds