<feed xmlns='http://www.w3.org/2005/Atom'>
<title>wireguard-linux/io_uring, branch update-toolchain</title>
<subtitle>WireGuard for the Linux kernel</subtitle>
<id>https://git.zx2c4.com/wireguard-linux/atom/io_uring?h=update-toolchain</id>
<link rel='self' href='https://git.zx2c4.com/wireguard-linux/atom/io_uring?h=update-toolchain'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/'/>
<updated>2024-08-13T12:10:59Z</updated>
<entry>
<title>io_uring/sqpoll: annotate debug task == current with data_race()</title>
<updated>2024-08-13T12:10:59Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2024-08-13T12:10:59Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=e4956dc7a84da074fd8dc10f7abd147f15b3ae58'/>
<id>urn:sha1:e4956dc7a84da074fd8dc10f7abd147f15b3ae58</id>
<content type='text'>
There's a debug check in io_sq_thread_park() checking if it's the SQPOLL
thread itself calling park. KCSAN warns about this, as we should not be
reading sqd-&gt;thread outside of sqd-&gt;lock.

Just silence this with data_race(). The pointer isn't used for anything
but this debug check.

Reported-by: syzbot+2b946a3fd80caf971b21@syzkaller.appspotmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring/napi: remove duplicate io_napi_entry timeout assignation</title>
<updated>2024-08-12T18:11:42Z</updated>
<author>
<name>Olivier Langlois</name>
<email>olivier@trillion01.com</email>
</author>
<published>2024-08-12T00:34:46Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=48cc7ecd3a68e0fbfa281ef1ed6f6b6cb7638390'/>
<id>urn:sha1:48cc7ecd3a68e0fbfa281ef1ed6f6b6cb7638390</id>
<content type='text'>
io_napi_entry() has 2 calling sites. One of them is unlikely to find an
entry and if it does, the timeout should arguable not be updated.

The other io_napi_entry() calling site is overwriting the update made
by io_napi_entry() so the io_napi_entry() timeout value update has no or
little value and therefore is removed.

Signed-off-by: Olivier Langlois &lt;olivier@trillion01.com&gt;
Link: https://lore.kernel.org/r/145b54ff179f87609e20dffaf5563c07cdbcad1a.1723423275.git.olivier@trillion01.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring/napi: check napi_enabled in io_napi_add() before proceeding</title>
<updated>2024-08-12T18:09:03Z</updated>
<author>
<name>Olivier Langlois</name>
<email>olivier@trillion01.com</email>
</author>
<published>2024-08-11T18:07:11Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=84f2eecf95018386c145ada19bb45b03bdb80d9e'/>
<id>urn:sha1:84f2eecf95018386c145ada19bb45b03bdb80d9e</id>
<content type='text'>
doing so avoids the overhead of adding napi ids to all the rings that do
not enable napi.

if no id is added to napi_list because napi is disabled,
__io_napi_busy_loop() will not be called.

Signed-off-by: Olivier Langlois &lt;olivier@trillion01.com&gt;
Fixes: b4ccc4dd1330 ("io_uring/napi: enable even with a timeout of 0")
Link: https://lore.kernel.org/r/bd989ccef5fda14f5fd9888faf4fefcf66bd0369.1723400131.git.olivier@trillion01.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring/net: don't pick multiple buffers for non-bundle send</title>
<updated>2024-08-07T21:20:52Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2024-08-07T21:09:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=8fe8ac24adcd76b12edbfdefa078567bfff117d4'/>
<id>urn:sha1:8fe8ac24adcd76b12edbfdefa078567bfff117d4</id>
<content type='text'>
If a send is issued marked with IOSQE_BUFFER_SELECT for selecting a
buffer, unless it's a bundle, it should not select multiple buffers.

Cc: stable@vger.kernel.org
Fixes: a05d1f625c7a ("io_uring/net: support bundles for send")
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring/net: ensure expanded bundle send gets marked for cleanup</title>
<updated>2024-08-07T21:08:17Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2024-08-07T21:08:17Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=70ed519ed59da3a92c3acedeb84a30e5a66051ce'/>
<id>urn:sha1:70ed519ed59da3a92c3acedeb84a30e5a66051ce</id>
<content type='text'>
If the iovec inside the kmsg isn't already allocated AND one gets
expanded beyond the fixed size, then the request may not already have
been marked for cleanup. Ensure that it is.

Cc: stable@vger.kernel.org
Fixes: a05d1f625c7a ("io_uring/net: support bundles for send")
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring/net: ensure expanded bundle recv gets marked for cleanup</title>
<updated>2024-08-07T21:06:45Z</updated>
<author>
<name>Jens Axboe</name>
<email>axboe@kernel.dk</email>
</author>
<published>2024-08-07T21:06:45Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=11893e144ed75be55d99349760513ca104781fc0'/>
<id>urn:sha1:11893e144ed75be55d99349760513ca104781fc0</id>
<content type='text'>
If the iovec inside the kmsg isn't already allocated AND one gets
expanded beyond the fixed size, then the request may not already have
been marked for cleanup. Ensure that it is.

Cc: stable@vger.kernel.org
Fixes: 2f9c9515bdfd ("io_uring/net: support bundles for recv")
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: remove unused local list heads in NAPI functions</title>
<updated>2024-07-30T12:20:20Z</updated>
<author>
<name>Olivier Langlois</name>
<email>olivier@trillion01.com</email>
</author>
<published>2024-07-29T23:13:35Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=c3fca4fb83f7c84cd1e1aa9fe3a0e220ce8f30fb'/>
<id>urn:sha1:c3fca4fb83f7c84cd1e1aa9fe3a0e220ce8f30fb</id>
<content type='text'>
These lists are unused, remove them.

Signed-off-by: Olivier Langlois &lt;olivier@trillion01.com&gt;
Reviewed-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Link: https://lore.kernel.org/r/0a0ae3e955aed0f3e3d29882fb3d3cb575e0009b.1722294947.git.olivier@trillion01.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: keep multishot request NAPI timeout current</title>
<updated>2024-07-30T12:18:58Z</updated>
<author>
<name>Olivier Langlois</name>
<email>olivier@trillion01.com</email>
</author>
<published>2024-07-29T23:03:33Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=2c762be5b798c443612c1bb9b011de4fdaebd1c5'/>
<id>urn:sha1:2c762be5b798c443612c1bb9b011de4fdaebd1c5</id>
<content type='text'>
This refresh statement was originally present in the original patch:
https://lore.kernel.org/netdev/20221121191437.996297-2-shr@devkernel.io/

It has been removed with no explanation in v6:
https://lore.kernel.org/netdev/20230201222254.744422-2-shr@devkernel.io/

It is important to make the refresh for multishot requests, because if no
new requests using the same NAPI device are added to the ring, the entry
will become stale and be removed silently. The unsuspecting user will
not know that their ring had busy polling for only 60 seconds before
being pruned.

Signed-off-by: Olivier Langlois &lt;olivier@trillion01.com&gt;
Reviewed-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Fixes: 8d0c12a80cdeb ("io-uring: add napi busy poll support")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/0fe61a019ec61e5708cd117cb42ed0dab95e1617.1722294646.git.olivier@trillion01.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring/napi: pass ktime to io_napi_adjust_timeout</title>
<updated>2024-07-26T14:31:59Z</updated>
<author>
<name>Pavel Begunkov</name>
<email>asml.silence@gmail.com</email>
</author>
<published>2024-07-26T14:24:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=358169617602f6f71b31e5c9532a09b95a34b043'/>
<id>urn:sha1:358169617602f6f71b31e5c9532a09b95a34b043</id>
<content type='text'>
Pass the waiting time for __io_napi_adjust_timeout as ktime and get rid
of all timespec64 conversions. It's especially simpler since the caller
already have a ktime.

Signed-off-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Link: https://lore.kernel.org/r/4f5b8e8eed4f53a1879e031a6712b25381adc23d.1722003776.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring/napi: use ktime in busy polling</title>
<updated>2024-07-26T14:31:59Z</updated>
<author>
<name>Pavel Begunkov</name>
<email>asml.silence@gmail.com</email>
</author>
<published>2024-07-26T14:24:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/wireguard-linux/commit/?id=342b2e395d5f34c9f111a818556e617939f83a8c'/>
<id>urn:sha1:342b2e395d5f34c9f111a818556e617939f83a8c</id>
<content type='text'>
It's more natural to use ktime/ns instead of keeping around usec,
especially since we're comparing it against user provided timers,
so convert napi busy poll internal handling to ktime. It's also nicer
since the type (ktime_t vs unsigned long) now tells the unit of measure.

Keep everything as ktime, which we convert to/from micro seconds for
IORING_[UN]REGISTER_NAPI. The net/ busy polling works seems to work with
usec, however it's not real usec as shift by 10 is used to get it from
nsecs, see busy_loop_current_time(), so it's easy to get truncated nsec
back and we get back better precision.

Note, we can further improve it later by removing the truncation and
maybe convincing net/ to use ktime/ns instead.

Signed-off-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Link: https://lore.kernel.org/r/95e7ec8d095069a3ed5d40a4bc6f8b586698bc7e.1722003776.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
