Skip to content

Commit cf98b3a

Browse files
committed
iodispatcher: remove explicit dispatch loop for control client
Drop the explicit loop calling bao_dispatch_io() when creating a control client. There is no need to proactively check and drain pending requests at this point. Bao guarantees that the backend VM is notified via an interrupt whenever there are requests to process, even if the frontend initiates the interaction first. As a result, the backend will naturally enter the dispatch path when work is available. Removing this loop simplifies the initialization path and avoids redundant polling without changing behavior. Signed-off-by: João Peixoto <joaopeixotooficial@gmail.com>
1 parent 2b41032 commit cf98b3a

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

iodispatcher/io_client.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -303,11 +303,6 @@ struct bao_io_client* bao_io_client_create(struct bao_dm* dm, bao_io_client_hand
303303
list_add(&client->list, &dm->io_clients);
304304
up_write(&dm->io_clients_lock);
305305

306-
if (is_control) {
307-
while (bao_dispatch_io(dm) > 0)
308-
;
309-
}
310-
311306
return client;
312307
}
313308

0 commit comments

Comments
 (0)