Re: [PULL 04/31] util/async: make bh_aio_poll() O(1)

2020-03-16 Thread Marc-André Lureau
Hi On Sat, Feb 22, 2020 at 9:51 AM Stefan Hajnoczi wrote: > > The ctx->first_bh list contains all created BHs, including those that > are not scheduled. The list is iterated by the event loop and therefore > has O(n) time complexity with respected to the number of created BHs. > > Rewrite BHs

[PULL 04/31] util/async: make bh_aio_poll() O(1)

2020-02-22 Thread Stefan Hajnoczi
The ctx->first_bh list contains all created BHs, including those that are not scheduled. The list is iterated by the event loop and therefore has O(n) time complexity with respected to the number of created BHs. Rewrite BHs so that only scheduled or deleted BHs are enqueued. Only BHs that