Revision tags: v6.6.25, v6.6.24, v6.6.23, v6.6.16, v6.6.15, v6.6.14, v6.6.13, v6.6.12, v6.6.11, v6.6.10, v6.6.9, v6.6.8, v6.6.7, v6.6.6, v6.6.5, v6.6.4, v6.6.3, v6.6.2, v6.5.11, v6.6.1, v6.5.10, v6.6, v6.5.9, v6.5.8, v6.5.7, v6.5.6, v6.5.5, v6.5.4, v6.5.3, v6.5.2, v6.1.51, v6.5.1, v6.1.50, v6.5, v6.1.49, v6.1.48, v6.1.46, v6.1.45, v6.1.44, v6.1.43, v6.1.42, v6.1.41, v6.1.40, v6.1.39, v6.1.38, v6.1.37, v6.1.36, v6.4, v6.1.35, v6.1.34, v6.1.33, v6.1.32, v6.1.31, v6.1.30, v6.1.29, v6.1.28, v6.1.27, v6.1.26, v6.3, v6.1.25 |
|
#
519760df |
| 15-Apr-2023 |
Pavel Begunkov <asml.silence@gmail.com> |
io_uring/notif: add constant for ubuf_info flags
Add a constant IO_NOTIF_UBUF_FLAGS for struct ubuf_info flags that notifications use. That should minimise merge conflicts for planned changes touchi
io_uring/notif: add constant for ubuf_info flags
Add a constant IO_NOTIF_UBUF_FLAGS for struct ubuf_info flags that notifications use. That should minimise merge conflicts for planned changes touching both io_uring and net at the same time.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
Revision tags: v6.1.24 |
|
#
8751d154 |
| 06-Apr-2023 |
Pavel Begunkov <asml.silence@gmail.com> |
io_uring: reduce scheduling due to tw
Every task_work will try to wake the task to be executed, which causes excessive scheduling and additional overhead. For some tw it's justified, but others won'
io_uring: reduce scheduling due to tw
Every task_work will try to wake the task to be executed, which causes excessive scheduling and additional overhead. For some tw it's justified, but others won't do much but post a single CQE.
When a task waits for multiple cqes, every such task_work will wake it up. Instead, the task may give a hint about how many cqes it waits for, io_req_local_work_add() will compare against it and skip wake ups if #cqes + #tw is not enough to satisfy the waiting condition. Task_work that uses the optimisation should be simple enough and never post more than one CQE. It's also ignored for non DEFER_TASKRUN rings.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/d2b77e99d1e86624d8a69f7037d764b739dcd225.1680782017.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
Revision tags: v6.1.23, v6.1.22 |
|
#
a282967c |
| 27-Mar-2023 |
Pavel Begunkov <asml.silence@gmail.com> |
io_uring: encapsulate task_work state
For task works we're passing around a bool pointer for whether the current ring is locked or not, let's wrap it in a structure, that will make it more opaque pr
io_uring: encapsulate task_work state
For task works we're passing around a bool pointer for whether the current ring is locked or not, let's wrap it in a structure, that will make it more opaque preventing abuse and will also help us to pass more info in the future if needed.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/1ecec9483d58696e248d1bfd52cf62b04442df1d.1679931367.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
Revision tags: v6.1.21, v6.1.20, v6.1.19, v6.1.18, v6.1.17, v6.1.16, v6.1.15, v6.1.14, v6.1.13, v6.2, v6.1.12, v6.1.11, v6.1.10, v6.1.9, v6.1.8 |
|
#
c8576f3e |
| 23-Jan-2023 |
Pavel Begunkov <asml.silence@gmail.com> |
io_uring: refactor req allocation
Follow the io_get_sqe pattern returning the result via a pointer and hide request cache refill inside io_alloc_req().
Signed-off-by: Pavel Begunkov <asml.silence@g
io_uring: refactor req allocation
Follow the io_get_sqe pattern returning the result via a pointer and hide request cache refill inside io_alloc_req().
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/8c37c2e8a3cb5e4cd6a8ae3b91371227a92708a6.1674484266.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
Revision tags: v6.1.7, v6.1.6, v6.1.5, v6.0.19, v6.0.18, v6.1.4, v6.1.3, v6.0.17, v6.1.2, v6.0.16, v6.1.1, v6.0.15, v6.0.14, v6.0.13, v6.1, v6.0.12, v6.0.11, v6.0.10, v5.15.80, v6.0.9, v5.15.79, v6.0.8, v5.15.78 |
|
#
42385b02 |
| 04-Nov-2022 |
Pavel Begunkov <asml.silence@gmail.com> |
io_uring/net: move mm accounting to a slower path
We can also move mm accounting to the extended callbacks. It removes a few cycles from the hot path including skipping one function call and setting
io_uring/net: move mm accounting to a slower path
We can also move mm accounting to the extended callbacks. It removes a few cycles from the hot path including skipping one function call and setting io_req_task_complete as a callback directly. For user backed I/O it shouldn't make any difference taking into considering atomic mm accounting and page pinning.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/1062f270273ad11c1b7b45ec59a6a317533d5e64.1667557923.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
40725d1b |
| 04-Nov-2022 |
Pavel Begunkov <asml.silence@gmail.com> |
io_uring: move zc reporting from the hot path
Add custom tw and notif callbacks on top of usual bits also handling zc reporting. That moves it from the hot path.
Signed-off-by: Pavel Begunkov <asml
io_uring: move zc reporting from the hot path
Add custom tw and notif callbacks on top of usual bits also handling zc reporting. That moves it from the hot path.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/40de4a6409042478e1f35adc4912e23226cb1b5c.1667557923.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
bedd20bc |
| 04-Nov-2022 |
Pavel Begunkov <asml.silence@gmail.com> |
io_uring/net: inline io_notif_flush()
io_notif_flush() is pretty simple, we can inline it.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/332359e7bd124138dfe
io_uring/net: inline io_notif_flush()
io_notif_flush() is pretty simple, we can inline it.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/332359e7bd124138dfe51340bbec829c9b265c18.1667557923.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
7fa8e841 |
| 04-Nov-2022 |
Pavel Begunkov <asml.silence@gmail.com> |
io_uring/net: rename io_uring_tx_zerocopy_callback
Just a simple renaming patch, io_uring_tx_zerocopy_callback() is too bulky and doesn't follow usual naming style.
Signed-off-by: Pavel Begunkov <a
io_uring/net: rename io_uring_tx_zerocopy_callback
Just a simple renaming patch, io_uring_tx_zerocopy_callback() is too bulky and doesn't follow usual naming style.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/24d78325403ca6dcb1ec4bced1e33cacc9b832a5.1667557923.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
fc1dd0d4 |
| 04-Nov-2022 |
Pavel Begunkov <asml.silence@gmail.com> |
io_uring/net: preset notif tw handler
We're going to have multiple notification tw functions. In preparation for future changes default the tw callback in advance so later we can replace it with oth
io_uring/net: preset notif tw handler
We're going to have multiple notification tw functions. In preparation for future changes default the tw callback in advance so later we can replace it with other versions.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/7acdbea5e20eadd844513320cd454af14ba50f64.1667557923.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
5bc8e888 |
| 04-Nov-2022 |
Pavel Begunkov <asml.silence@gmail.com> |
io_uring/net: remove extra notif rsrc setup
io_send_zc_prep() sets up notification's rsrc_node when needed, don't unconditionally install it on notif alloc.
Signed-off-by: Pavel Begunkov <asml.sile
io_uring/net: remove extra notif rsrc setup
io_send_zc_prep() sets up notification's rsrc_node when needed, don't unconditionally install it on notif alloc.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/dbe4875ac33e180b9799d8537a5e27935e82aac4.1667557923.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
Revision tags: v6.0.7, v5.15.77, v5.15.76, v6.0.6 |
|
#
e307e669 |
| 27-Oct-2022 |
Stefan Metzmacher <metze@samba.org> |
io_uring/net: introduce IORING_SEND_ZC_REPORT_USAGE flag
It might be useful for applications to detect if a zero copy transfer with SEND[MSG]_ZC was actually possible or not. The application can fal
io_uring/net: introduce IORING_SEND_ZC_REPORT_USAGE flag
It might be useful for applications to detect if a zero copy transfer with SEND[MSG]_ZC was actually possible or not. The application can fallback to plain SEND[MSG] in order to avoid the overhead of two cqes per request. Or it can generate a log message that could indicate to an administrator that no zero copy was possible and could explain degraded performance.
Cc: stable@vger.kernel.org # 6.1 Link: https://lore.kernel.org/io-uring/fb6a7599-8a9b-15e5-9b64-6cd9d01c6ff4@gmail.com/T/#m2b0d9df94ce43b0e69e6c089bdff0ce6babbdfaa Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/8945b01756d902f5d5b0667f20b957ad3f742e5e.1666895626.git.metze@samba.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
Revision tags: v6.0.5, v5.15.75, v6.0.4, v6.0.3, v6.0.2, v5.15.74, v5.15.73, v6.0.1, v5.15.72, v6.0, v5.15.71, v5.15.70, v5.15.69, v5.15.68, v5.15.67, v5.15.66, v5.15.65 |
|
#
4fa07edb |
| 04-Sep-2022 |
Jiapeng Chong <jiapeng.chong@linux.alibaba.com> |
io_uring/notif: Remove the unused function io_notif_complete()
The function io_notif_complete() is defined in the notif.c file, but not called elsewhere, so delete this unused function.
io_uring/no
io_uring/notif: Remove the unused function io_notif_complete()
The function io_notif_complete() is defined in the notif.c file, but not called elsewhere, so delete this unused function.
io_uring/notif.c:24:20: warning: unused function 'io_notif_complete' [-Wunused-function].
Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2047 Reported-by: Abaci Robot <abaci@linux.alibaba.com> Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com> Reviewed-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/20220905020436.51894-1-jiapeng.chong@linux.alibaba.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
b48c312b |
| 01-Sep-2022 |
Pavel Begunkov <asml.silence@gmail.com> |
io_uring/net: simplify zerocopy send user API
Following user feedback, this patch simplifies zerocopy send API. One of the main complaints is that the current API is difficult with the userspace man
io_uring/net: simplify zerocopy send user API
Following user feedback, this patch simplifies zerocopy send API. One of the main complaints is that the current API is difficult with the userspace managing notification slots, and then send retries with error handling make it even worse.
Instead of keeping notification slots change it to the per-request notifications model, which posts both completion and notification CQEs for each request when any data has been sent, and only one CQE if it fails. All notification CQEs will have IORING_CQE_F_NOTIF set and IORING_CQE_F_MORE in completion CQEs indicates whether to wait a notification or not.
IOSQE_CQE_SKIP_SUCCESS is disallowed with zerocopy sends for now.
This is less flexible, but greatly simplifies the user API and also the kernel implementation. We reuse notif helpers in this patch, but in the future there won't be need for keeping two requests.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/95287640ab98fc9417370afb16e310677c63e6ce.1662027856.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
57f33224 |
| 01-Sep-2022 |
Pavel Begunkov <asml.silence@gmail.com> |
io_uring/notif: remove notif registration
We're going to remove the userspace exposed zerocopy notification API, remove notification registration.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.
io_uring/notif: remove notif registration
We're going to remove the userspace exposed zerocopy notification API, remove notification registration.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/6ff00b97be99869c386958a990593c9c31cf105b.1662027856.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
Revision tags: v5.15.64, v5.15.63 |
|
#
53bdc88a |
| 24-Aug-2022 |
Pavel Begunkov <asml.silence@gmail.com> |
io_uring/notif: order notif vs send CQEs
Currently, there is no ordering between notification CQEs and completions of the send flushing it, this quite complicates the userspace, especially since we
io_uring/notif: order notif vs send CQEs
Currently, there is no ordering between notification CQEs and completions of the send flushing it, this quite complicates the userspace, especially since we don't flush notification when the send(+flush) request fails, i.e. there will be only one CQE. What we can do is to make sure that notification completions come only after sends.
The easiest way to achieve this is to not try to complete a notification inline from io_sendzc() but defer it to task_work, considering that io-wq sendzc is disallowed CQEs will be naturally ordered because task_works will only be executed after we're done with submission and so inline completion.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/cddfd1c2bf91f22b9fe08e13b7dffdd8f858a151.1661342812.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
2cacedc8 |
| 24-Aug-2022 |
Pavel Begunkov <asml.silence@gmail.com> |
io_uring/net: fix must_hold annotation
Fix up the io_alloc_notif()'s __must_hold as we don't have a ctx argument there but should get it from the slot instead.
Reported-by: Stefan Metzmacher <metze
io_uring/net: fix must_hold annotation
Fix up the io_alloc_notif()'s __must_hold as we don't have a ctx argument there but should get it from the slot instead.
Reported-by: Stefan Metzmacher <metze@samba.org> Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/cbb0a920f18e0aed590bf58300af817b9befb8a3.1661342812.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
Revision tags: v5.15.62, v5.15.61, v5.15.60 |
|
#
f2ccb5ae |
| 11-Aug-2022 |
Stefan Metzmacher <metze@samba.org> |
io_uring: make io_kiocb_to_cmd() typesafe
We need to make sure (at build time) that struct io_cmd_data is not casted to a structure that's larger.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
io_uring: make io_kiocb_to_cmd() typesafe
We need to make sure (at build time) that struct io_cmd_data is not casted to a structure that's larger.
Signed-off-by: Stefan Metzmacher <metze@samba.org> Link: https://lore.kernel.org/r/c024cdf25ae19fc0319d4180e2298bade8ed17b8.1660201408.git.metze@samba.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
da2634e8 |
| 11-Aug-2022 |
Stefan Metzmacher <metze@samba.org> |
io_uring: consistently make use of io_notif_to_data()
This makes the assignment typesafe. It prepares changing io_kiocb_to_cmd() in the next commit.
Signed-off-by: Stefan Metzmacher <metze@samba.or
io_uring: consistently make use of io_notif_to_data()
This makes the assignment typesafe. It prepares changing io_kiocb_to_cmd() in the next commit.
Signed-off-by: Stefan Metzmacher <metze@samba.org> Link: https://lore.kernel.org/r/8da6e9d12cf95ad4bc73274406d12bca7aabf72e.1660201408.git.metze@samba.org Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
Revision tags: v5.15.59, v5.19, v5.15.58 |
|
#
14b146b6 |
| 27-Jul-2022 |
Pavel Begunkov <asml.silence@gmail.com> |
io_uring: notification completion optimisation
We want to use all optimisations that we have for io_uring requests like completion batching, memory caching and more but for zc notifications. Fortuna
io_uring: notification completion optimisation
We want to use all optimisations that we have for io_uring requests like completion batching, memory caching and more but for zc notifications. Fortunately, notification perfectly fit the request model so we can overlay them onto struct io_kiocb and use all the infratructure.
Most of the fields of struct io_notif natively fits into io_kiocb, so we replace struct io_notif with struct io_kiocb carrying struct io_notif_data in the cmd cache line. Then we adapt io_alloc_notif() to use io_alloc_req()/io_alloc_req_refill(), and kill leftovers of hand coded caching. __io_notif_complete_tw() is converted to use io_uring's tw infra.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/9e010125175e80baf51f0ca63bdc7cc6a4a9fa56.1658913593.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
6a9ce66f |
| 25-Jul-2022 |
Pavel Begunkov <asml.silence@gmail.com> |
io_uring/net: make page accounting more consistent
Make network page accounting more consistent with how buffer registration is working, i.e. account all memory to ctx->user.
Signed-off-by: Pavel B
io_uring/net: make page accounting more consistent
Make network page accounting more consistent with how buffer registration is working, i.e. account all memory to ctx->user.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/4aacfe64bbb81b27f9ecf5d5c219c69a07e5aa56.1658742118.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
Revision tags: v5.15.57, v5.15.56, v5.15.55 |
|
#
63809137 |
| 12-Jul-2022 |
Pavel Begunkov <asml.silence@gmail.com> |
io_uring: flush notifiers after sendzc
Allow to flush notifiers as a part of sendzc request by setting IORING_SENDZC_FLUSH flag. When the sendzc request succeedes it will flush the used [active] not
io_uring: flush notifiers after sendzc
Allow to flush notifiers as a part of sendzc request by setting IORING_SENDZC_FLUSH flag. When the sendzc request succeedes it will flush the used [active] notifier.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/e0b4d9a6797e2fd6092824fe42953db7a519bbc8.1657643355.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
e29e3bd4 |
| 12-Jul-2022 |
Pavel Begunkov <asml.silence@gmail.com> |
io_uring: account locked pages for non-fixed zc
Fixed buffers are RLIMIT_MEMLOCK accounted, however it doesn't cover iovec based zerocopy sends. Do the accounting on the io_uring side.
Signed-off-b
io_uring: account locked pages for non-fixed zc
Fixed buffers are RLIMIT_MEMLOCK accounted, however it doesn't cover iovec based zerocopy sends. Do the accounting on the io_uring side.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/19b6e3975440f59f1f6199c7ee7acf977b4eecdc.1657643355.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
bc24d6bd |
| 12-Jul-2022 |
Pavel Begunkov <asml.silence@gmail.com> |
io_uring: add notification slot registration
Let the userspace to register and unregister notification slots.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/
io_uring: add notification slot registration
Let the userspace to register and unregister notification slots.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/a0aa8161fe3ebb2a4cc6e5dbd0cffb96e6881cf5.1657643355.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
68ef5578 |
| 12-Jul-2022 |
Pavel Begunkov <asml.silence@gmail.com> |
io_uring: add rsrc referencing for notifiers
In preparation to zerocopy sends with fixed buffers make notifiers to reference the rsrc node to protect the used fixed buffers. We can't just grab it fo
io_uring: add rsrc referencing for notifiers
In preparation to zerocopy sends with fixed buffers make notifiers to reference the rsrc node to protect the used fixed buffers. We can't just grab it for a send request as notifiers can likely outlive requests that used it.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/3cd7a01d26837945b6982fa9cf15a63230f2ed4f.1657643355.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|
#
e58d498e |
| 12-Jul-2022 |
Pavel Begunkov <asml.silence@gmail.com> |
io_uring: complete notifiers in tw
We need a task context to post CQEs but using wq is too expensive. Try to complete notifiers using task_work and fall back to wq if fails.
Signed-off-by: Pavel Be
io_uring: complete notifiers in tw
We need a task context to post CQEs but using wq is too expensive. Try to complete notifiers using task_work and fall back to wq if fails.
Signed-off-by: Pavel Begunkov <asml.silence@gmail.com> Link: https://lore.kernel.org/r/089799ab665b10b78fdc614ae6d59fa7ef0d5f91.1657643355.git.asml.silence@gmail.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
show more ...
|