diff options
author | Jens Axboe <axboe@kernel.dk> | 2023-10-19 15:42:29 +0300 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2023-10-19 15:42:29 +0300 |
commit | 6ce4a93dbb5bd93bc2bdf14da63f9360a4dcd6a1 (patch) | |
tree | 701180e12f59565d5b779956011e373359913ccd /net/ieee802154 | |
parent | b3a4dbc89d4021b3f90ff6a13537111a004f9d07 (diff) | |
download | linux-6ce4a93dbb5bd93bc2bdf14da63f9360a4dcd6a1.tar.xz |
io_uring/poll: use IOU_F_TWQ_LAZY_WAKE for wakeups
With poll triggered retries, each event trigger will cause a task_work
item to be added for processing. If the ring is setup with
IORING_SETUP_DEFER_TASKRUN and a task is waiting on multiple events to
complete, any task_work addition will wake the task for processing these
items. This can cause more context switches than we would like, if the
application is deliberately waiting on multiple items to increase
efficiency.
For example, if an application has receive multishot armed for sockets
and wants to wait for N to complete within M usec of time, we should not
be waking up and processing these items until we have all the events we
asked for. By switching the poll trigger to lazy wake, we'll process
them when they are all ready, in one swoop, rather than wake multiple
times only to process one and then go back to sleep.
At some point we probably want to look at just making the lazy wake
the default, but for now, let's just selectively enable it where it
makes sense.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'net/ieee802154')
0 files changed, 0 insertions, 0 deletions