Skip to content

Commit

Permalink
entry: not going to use flags=IOSQE_ASYNC as default since it has a
Browse files Browse the repository at this point in the history
bug in `io_uring`, also not good for performance! axboe/liburing#1181
  • Loading branch information
YoSTEALTH committed Jul 15, 2024
1 parent 7e9a0bf commit 25a10e5
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/shakti/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from dynamic_import import importer


__version__ = '2024.7.13'
__version__ = '2024.7.15'


importer() # helps this project manage all import needs.
4 changes: 2 additions & 2 deletions src/shakti/event/entry.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ cdef class SQE(io_uring_sqe):

# note: `num` is used by `io_uring_sqe`
def __init__(self, __u16 num=1, bint error=True, *,
unsigned int flags=IOSQE_ASYNC, unsigned int link_flag=IOSQE_IO_HARDLINK):
unsigned int flags=0, unsigned int link_flag=IOSQE_IO_HARDLINK):
''' Shakti Queue Entry
Type
Expand Down Expand Up @@ -72,8 +72,8 @@ cdef class SQE(io_uring_sqe):

def __await__(self):
cdef:
__u16 i
SQE sqe
__u16 i

if self.len == 1: # single
self.job = ENTRY
Expand Down
3 changes: 1 addition & 2 deletions src/shakti/event/run.pxd
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from cpython.object cimport PyObject
from cpython.ref cimport Py_XINCREF, Py_XDECREF
from liburing.lib.type cimport __s32, __u64, uintptr_t
from liburing.queue cimport IOSQE_ASYNC, \
io_uring, io_uring_queue_init, io_uring_queue_exit, \
from liburing.queue cimport io_uring, io_uring_queue_init, io_uring_queue_exit, \
io_uring_prep_nop, io_uring_submit, io_uring_cqe, io_uring_sq_ready, \
io_uring_cq_advance, io_uring_wait_cqe, io_uring_for_each_cqe, \
io_uring_sqe_set_flags, io_uring_sqe_set_data64
Expand Down
1 change: 0 additions & 1 deletion src/shakti/event/run.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ cdef void __prep_coroutine(io_uring ring, tuple coroutine, unsigned int coro_len
sqe.job = CORO
sqe.coro = coroutine[i]
io_uring_prep_nop(sqe)
io_uring_sqe_set_flags(sqe, IOSQE_ASYNC)
io_uring_sqe_set_data64(sqe, <__u64>ptr)
io_uring_put_sqe(ring, sqe)
Expand Down

0 comments on commit 25a10e5

Please sign in to comment.