On 06/16/2010 03:09 PM, Anthony Liguori wrote:
On 06/16/2010 06:56 AM, Gautham R Shenoy wrote:
Hi,
This is the v4 of the patch-series to have a generic asynchronous task
offloading framework (called threadlets) within qemu.
Semantically, a threadlet is identical to a QEMUBH except that a QEMUBH
holds the qemu_mutex and a threadlet doesn't.
I'd suggest naming these functions similar to QEMUBH to the point where
it makes sense to use the same structure. Instead of the normal
qemu_bh_schedule, I'd suggest having a qemu_bh_schedule_unlocked().
The API of threadlets is much more sensible than the one of bottom
halves, especially with respect to allocation and possibility to use
container_of instead of opaque.
I think it's much more sensible to keep Gautham's proposed API and long
term change all bottom halves to use threadlets.
Also, please introduce a short document in docs/ that gives a brief
overview of how to use unlocked bottom halves especially focusing on the
considerations with respect to what should and shouldn't be done in
these functions.
This is a nice idea though.
Paolo