Il 20/06/2013 11:12, liu ping fan ha scritto: >> Right. You need to order ->idle writes before ->scheduled writes, and >> add memory barriers, or alternatively use two bits in ->scheduled so >> that you can assign both atomically. >> > I think just shift the position of smp_rmb/wmb in _schedule and _poll, > we can acheive this (callbacks will not refer to ->idle)
Yes, but you also need to swap ->idle and ->scheduled assignments (aio_bh_poll reads scheduled before idle; qemu_bh_schedule* must write idle before scheduled). Paolo