Displaying 4 results from an estimated 4 matches for "wait_for_aio_commands_to_finish".
2019 Aug 26
2
Re: [PATCH disk-sync 5/5] Convert disk_sync inner loop to asynchronous.
...to-retire the aio_pread command.
>+ return 1
>+
>+
>+# Process any AIO requests without blocking.
>+def process_aio_requests(nbd_handle):
>+ while nbd_handle.poll(0) == 1:
>+ pass
>+
>+
>+# Block until all AIO commands on the handle have finished.
>+def wait_for_aio_commands_to_finish(nbd_handle):
>+ while nbd_handle.aio_in_flight() > 0:
>+ nbd_handle.poll(-1)
>+
>+
> def sync_data():
> state = State().instance
> for key, disk in state['disks'].items():
>@@ -491,25 +511,28 @@ def sync_data():
>...
2019 Aug 22
7
[PATCH disk-sync 0/5] Misc cleanups and convert inner loop to asynch.
This is based on top of:
https://github.com/nertpinx/v2v-conversion-host/commit/0bb2efdcacd975a2cae7380080991ac7fc238d2b
The first 4 patches are fairly uncontroversial miscellaneous cleanups.
Patch 5 is the interesting one. (Note it doesn't quite work yet, so
it's for discussion only.)
Patch 5 converts the inner loop to use asynchronous libnbd calls.
performance improves quite a bit for
2019 Aug 22
0
[PATCH disk-sync 5/5] Convert disk_sync inner loop to asynchronous.
...(), offset)
+ # By returning 1 here we auto-retire the aio_pread command.
+ return 1
+
+
+# Process any AIO requests without blocking.
+def process_aio_requests(nbd_handle):
+ while nbd_handle.poll(0) == 1:
+ pass
+
+
+# Block until all AIO commands on the handle have finished.
+def wait_for_aio_commands_to_finish(nbd_handle):
+ while nbd_handle.aio_in_flight() > 0:
+ nbd_handle.poll(-1)
+
+
def sync_data():
state = State().instance
for key, disk in state['disks'].items():
@@ -491,25 +511,28 @@ def sync_data():
(block['length'], block[...
2019 Aug 27
0
Re: [PATCH disk-sync 5/5] Convert disk_sync inner loop to asynchronous.
...> >+
> >+
> >+# Process any AIO requests without blocking.
> >+def process_aio_requests(nbd_handle):
> >+ while nbd_handle.poll(0) == 1:
> >+ pass
> >+
> >+
> >+# Block until all AIO commands on the handle have finished.
> >+def wait_for_aio_commands_to_finish(nbd_handle):
> >+ while nbd_handle.aio_in_flight() > 0:
> >+ nbd_handle.poll(-1)
> >+
> >+
> >def sync_data():
> > state = State().instance
> > for key, disk in state['disks'].items():
> >@@ -491,25 +511,28 @@ def sync_data(...