public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH v2 5.12 0/6] remove task file notes
@ 2021-03-05  4:18 Pavel Begunkov
  2021-03-05  4:18 ` [PATCH v2 1/6] io_uring: make del_task_file more forgiving Pavel Begunkov
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Pavel Begunkov @ 2021-03-05  4:18 UTC (permalink / raw)
  To: Jens Axboe, io-uring

Introduce a mapping from ctx to all tctx, and using that removes
file notes, i.e. taking a io_uring file note previously stored in
task->io_uring->xa. It's needed because we don't free io_uring ctx
until all submitters die/exec, and it became worse after killing
->flush(). There are rough corner in a form of not behaving nicely,
I'll address in follow-up patches.

The torture is as simple as below. It will get OOM in no time. Also,
I plan to use it to fix recently broken cancellations.

while (1) {
	assert(!io_uring_queue_init(8, &ring, 0));
	io_uring_queue_exit(&ring);
}

Pavel Begunkov (6):
  io_uring: make del_task_file more forgiving
  io_uring: introduce ctx to tctx back map
  io_uring: do ctx initiated file note removal
  io_uring: don't take task ring-file notes
  io_uring: index io_uring->xa by ctx not file
  io_uring: warn when ring exit takes too long

 fs/io_uring.c            | 131 +++++++++++++++++++++++++++++++--------
 include/linux/io_uring.h |   2 +-
 2 files changed, 106 insertions(+), 27 deletions(-)

-- 
2.24.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-03-05  4:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-05  4:18 [PATCH v2 5.12 0/6] remove task file notes Pavel Begunkov
2021-03-05  4:18 ` [PATCH v2 1/6] io_uring: make del_task_file more forgiving Pavel Begunkov
2021-03-05  4:18 ` [PATCH v2 2/6] io_uring: introduce ctx to tctx back map Pavel Begunkov
2021-03-05  4:18 ` [PATCH v2 3/6] io_uring: do ctx initiated file note removal Pavel Begunkov
2021-03-05  4:18 ` [PATCH v2 4/6] io_uring: don't take task ring-file notes Pavel Begunkov
2021-03-05  4:18 ` [PATCH v2 5/6] io_uring: index io_uring->xa by ctx not file Pavel Begunkov
2021-03-05  4:18 ` [PATCH v2 6/6] io_uring: warn when ring exit takes too long Pavel Begunkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox