[libnbd PATCH 0/2] Optimize h.pread_structured
by Eric Blake
Add some more safety against a non-compliant server with structured
reads, and kill off another useless copy operation for a noticeable
speedup when using h.pread_structured. However, I'm still trying to
play with code to see if PyObject_GetItem(memoryview,
PySlice_New(start, end, NULL)) can get me the same zero-copy python
object but in a way that can survive as long as the original object
lives, rather than forcing .release() at the end of the callback.
Maybe I'll have a patch 3/2 later today.
Eric Blake (2):
api: Tighter checking of structured read replies
python: Optimize away copy during pread_structured
lib/internal.h | 2 +-
generator/Python.ml | 20 ++++++++++++++------
generator/states-reply-simple.c | 4 ++--
generator/states-reply-structured.c | 6 ++++--
lib/aio.c | 7 +++++--
5 files changed, 26 insertions(+), 13 deletions(-)
--
2.36.1
2 years, 4 months
[libnbd PATCH v2 0/8] Another attempt at working towards zero-copy python aio_pread
by Eric Blake
Still more patches to come, but this fixes the heap leak I pointed out
this morning, and rebases my previous patches on top of that cleanup.
Eric Blake (8):
python: Improve doc comments for nbd.py
python: Plug uninit leak in nbd.Buffer.to_bytearray
python: Enhance tests of nbd.Buffer
python: Reformat generated methods.c in a few places
python: Make py_aio_buffer a private struct
python: Don't unwrap nbd.Buffer in nbd.py
python: Simplify python generator
python: Make nbd.Buffer lighter-weight
generator/Python.ml | 336 +++++++++++++++++-------------------
python/handle.c | 214 ++++++-----------------
python/t/500-aio-pread.py | 83 ++++++++-
python/t/510-aio-pwrite.py | 19 +-
python/t/580-aio-is-zero.py | 7 +
python/utils.c | 20 ++-
6 files changed, 336 insertions(+), 343 deletions(-)
--
2.36.1
2 years, 4 months
[libnbd PATCH 0/5] python: Optimize aio_p{read, write}
by Eric Blake
I didn't get to integrate this with my h.{aio_}pread_structured copy
reductions, but I'm liking how this one turned out.
Eric Blake (5):
python: Avoid memleak on (unlikely) module failure
python: Don't unwrap nbd.Buffer in nbd.py
python: Simplify python generator
python: Make nbd.Buffer lighter-weight
python: Accept all buffer-like objects in aio_p{read,write}
generator/Python.ml | 113 +++++++++++++-------------
python/handle.c | 192 +++++++++-----------------------------------
python/utils.c | 20 ++++-
3 files changed, 110 insertions(+), 215 deletions(-)
--
2.36.1
2 years, 4 months