On 9 December 2011 18:44, Xin Tong <xerox.time.t...@gmail.com> wrote: > Currently, QEMU unchains TBs if there is an interrupt pending. I would > like to know whether there is any reason behind this ? (why not > checking interrupt status in the beginning of every tb ?)
The theory is that it's faster overall to do a slightly slow operation (tb unlinking) on interrupts rather than do a check at the beginning of every tb (happens a lot in the normal code path). However the tb unlinking code is racy and personally I think we should get rid of it in favour of a simpler scheme like a flag check. I have some prototype patches kicking around for this. -- PMM