<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/io_uring/io_uring.h, branch linux-6.4.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.4.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-6.4.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2023-09-13T07:48:39Z</updated>
<entry>
<title>io_uring: fix false positive KASAN warnings</title>
<updated>2023-09-13T07:48:39Z</updated>
<author>
<name>Pavel Begunkov</name>
</author>
<published>2023-08-09T12:22:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=7c3be1e33101783c1918a63bb3a93008eaeb6c7c'/>
<id>urn:sha1:7c3be1e33101783c1918a63bb3a93008eaeb6c7c</id>
<content type='text'>
commit 569f5308e54352a12181cc0185f848024c5443e8 upstream.

io_req_local_work_add() peeks into the work list, which can be executed
in the meanwhile. It's completely fine without KASAN as we're in an RCU
read section and it's SLAB_TYPESAFE_BY_RCU. With KASAN though it may
trigger a false positive warning because internal io_uring caches are
sanitised.

Remove sanitisation from the io_uring request cache for now.

Cc: stable@vger.kernel.org
Fixes: 8751d15426a31 ("io_uring: reduce scheduling due to tw")
Signed-off-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Link: https://lore.kernel.org/r/c6fbf7a82a341e66a0007c76eefd9d57f2d3ba51.1691541473.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>io_uring: Create a helper to return the SQE size</title>
<updated>2023-05-04T14:19:05Z</updated>
<author>
<name>Breno Leitao</name>
</author>
<published>2023-05-04T12:18:54Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=96c7d4f81db0fea05c0792f7563ae0cb4ad5f022'/>
<id>urn:sha1:96c7d4f81db0fea05c0792f7563ae0cb4ad5f022</id>
<content type='text'>
Create a simple helper that returns the size of the SQE. The SQE could
have two size, depending of the flags.

If IO_URING_SETUP_SQE128 flag is set, then return a double SQE,
otherwise returns the sizeof of io_uring_sqe (64 bytes).

Signed-off-by: Breno Leitao &lt;leitao@debian.org&gt;
Reviewed-by: Christoph Hellwig &lt;hch@lst.de&gt;
Reviewed-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Link: https://lore.kernel.org/r/20230504121856.904491-2-leitao@debian.org
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: add irq lockdep checks</title>
<updated>2023-04-12T18:09:41Z</updated>
<author>
<name>Pavel Begunkov</name>
</author>
<published>2023-04-11T11:06:03Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8ce4269eeedc5b31f5817f610b42cba8be8fa9de'/>
<id>urn:sha1:8ce4269eeedc5b31f5817f610b42cba8be8fa9de</id>
<content type='text'>
We don't post CQEs from the IRQ context, add a check catching that.

Signed-off-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Link: https://lore.kernel.org/r/f23f7a24dbe8027b3d37873fece2b6488f878b31.1681210788.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: reduce scheduling due to tw</title>
<updated>2023-04-06T22:23:28Z</updated>
<author>
<name>Pavel Begunkov</name>
</author>
<published>2023-04-06T13:20:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8751d15426a31baaf40f7570263c27c3e5d1dc44'/>
<id>urn:sha1:8751d15426a31baaf40f7570263c27c3e5d1dc44</id>
<content type='text'>
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 &lt;asml.silence@gmail.com&gt;
Link: https://lore.kernel.org/r/d2b77e99d1e86624d8a69f7037d764b739dcd225.1680782017.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: add tw add flags</title>
<updated>2023-04-06T22:23:28Z</updated>
<author>
<name>Pavel Begunkov</name>
</author>
<published>2023-04-06T13:20:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8501fe70ae9855076ffb03a3670e02a7b3437304'/>
<id>urn:sha1:8501fe70ae9855076ffb03a3670e02a7b3437304</id>
<content type='text'>
We pass 'allow_local' into io_req_task_work_add() but will need more
flags. Replace it with a flags bit field and name this allow_local
flag.

Signed-off-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Link: https://lore.kernel.org/r/4c0f01e7ef4e6feebfb199093cc995af7a19befa.1680782017.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: refactor io_cqring_wake()</title>
<updated>2023-04-06T22:23:28Z</updated>
<author>
<name>Pavel Begunkov</name>
</author>
<published>2023-04-06T13:20:09Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6e7248adf8f7adb5e36ec1e91efcc85a83bf8aeb'/>
<id>urn:sha1:6e7248adf8f7adb5e36ec1e91efcc85a83bf8aeb</id>
<content type='text'>
Instead of smp_mb() + __io_cqring_wake() in __io_cq_unlock_post_flush()
use equivalent io_cqring_wake(). With that we can clean it up further
and remove __io_cqring_wake().

Signed-off-by: Pavel Begunkov &lt;asml.silence@gmail.com&gt;
Link: https://lore.kernel.org/r/662ee5d898168ac206be06038525e97b64072a46.1680782017.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: cap io_sqring_entries() at SQ ring size</title>
<updated>2023-04-03T13:16:15Z</updated>
<author>
<name>Jens Axboe</name>
</author>
<published>2023-03-30T16:05:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e3ef728ff07b42668e7e12f49cd2f9055e064ec1'/>
<id>urn:sha1:e3ef728ff07b42668e7e12f49cd2f9055e064ec1</id>
<content type='text'>
We already do this manually for the !SQPOLL case, do it in general and
we can also dump the ugly min3() in io_submit_sqes().

Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: encapsulate task_work state</title>
<updated>2023-04-03T13:16:15Z</updated>
<author>
<name>Pavel Begunkov</name>
</author>
<published>2023-03-27T15:38:15Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=a282967c848fb1d92c28334430c472da9c334e54'/>
<id>urn:sha1:a282967c848fb1d92c28334430c472da9c334e54</id>
<content type='text'>
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 &lt;asml.silence@gmail.com&gt;
Link: https://lore.kernel.org/r/1ecec9483d58696e248d1bfd52cf62b04442df1d.1679931367.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: mark task TASK_RUNNING before handling resume/task work</title>
<updated>2023-02-06T15:23:21Z</updated>
<author>
<name>Jens Axboe</name>
</author>
<published>2023-02-06T15:20:46Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=2f2bb1ffc9983e227424d0787289da5483b0c74f'/>
<id>urn:sha1:2f2bb1ffc9983e227424d0787289da5483b0c74f</id>
<content type='text'>
Just like for task_work, set the task mode to TASK_RUNNING before doing
any potential resume work. We're not holding any locks at this point,
but we may have already set the task state to TASK_INTERRUPTIBLE in
preparation for going to sleep waiting for events. Ensure that we set it
back to TASK_RUNNING if we have work to process, to avoid warnings on
calling blocking operations with !TASK_RUNNING.

Fixes: b5d3ae202fbf ("io_uring: handle TIF_NOTIFY_RESUME when checking for task_work")
Reported-by: kernel test robot &lt;oliver.sang@intel.com&gt;
Link: https://lore.kernel.org/oe-lkp/202302062208.24d3e563-oliver.sang@intel.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
<entry>
<title>io_uring: refactor req allocation</title>
<updated>2023-01-29T22:17:41Z</updated>
<author>
<name>Pavel Begunkov</name>
</author>
<published>2023-01-23T14:37:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c8576f3e612d3c5b01d434ae296b9b76d7907708'/>
<id>urn:sha1:c8576f3e612d3c5b01d434ae296b9b76d7907708</id>
<content type='text'>
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 &lt;asml.silence@gmail.com&gt;
Link: https://lore.kernel.org/r/8c37c2e8a3cb5e4cd6a8ae3b91371227a92708a6.1674484266.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe &lt;axboe@kernel.dk&gt;
</content>
</entry>
</feed>
