public inbox for [email protected]
 help / color / mirror / Atom feed
* [PATCH v3 0/6] Complete setup before calling wake_up_new_task()
@ 2021-04-24 23:26 Stefan Metzmacher
  2021-04-24 23:26 ` [PATCH v3 1/6] kernel: always initialize task->pf_io_worker to NULL Stefan Metzmacher
                   ` (6 more replies)
  0 siblings, 7 replies; 10+ messages in thread
From: Stefan Metzmacher @ 2021-04-24 23:26 UTC (permalink / raw)
  To: Jens Axboe, io-uring; +Cc: Stefan Metzmacher

Hi,

now that we have an explicit wake_up_new_task() in order to start the
result from create_io_thread(), we should set things up before calling
wake_up_new_task().

Changes in v3:
 - rebased on for-5.13/io_uring.
 - I dropped this:
  fs/proc: hide PF_IO_WORKER in get_task_cmdline()
 - I added:
  set_task_comm() overflow checks

Changes in v2:

- I dropped/deferred these changes:
  - We no longer allow a userspace process to change
    /proc/<pid>/[task/<tid>]/comm
  - We dynamically generate comm names (up to 63 chars)
    via io_wq_worker_comm(), similar to wq_worker_comm()

Stefan Metzmacher (6):
  kernel: always initialize task->pf_io_worker to NULL
  io_uring: io_sq_thread() no longer needs to reset
    current->pf_io_worker
  io-wq: call set_task_comm() before wake_up_new_task()
  io_uring: complete sq_thread setup before calling wake_up_new_task()
  io-wq: warn about future set_task_comm() overflows.
  io_uring: warn about future set_task_comm() overflows.

 fs/io-wq.c    | 20 ++++++++++++++++----
 fs/io_uring.c | 34 +++++++++++++++++++++++-----------
 kernel/fork.c |  1 +
 3 files changed, 40 insertions(+), 15 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2021-04-26 16:01 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-04-24 23:26 [PATCH v3 0/6] Complete setup before calling wake_up_new_task() Stefan Metzmacher
2021-04-24 23:26 ` [PATCH v3 1/6] kernel: always initialize task->pf_io_worker to NULL Stefan Metzmacher
2021-04-24 23:26 ` [PATCH v3 2/6] io_uring: io_sq_thread() no longer needs to reset current->pf_io_worker Stefan Metzmacher
2021-04-24 23:26 ` [PATCH v3 3/6] io-wq: call set_task_comm() before wake_up_new_task() Stefan Metzmacher
2021-04-24 23:26 ` [PATCH v3 4/6] io_uring: complete sq_thread setup before calling wake_up_new_task() Stefan Metzmacher
2021-04-24 23:26 ` [PATCH v3 5/6] io-wq: warn about future set_task_comm() overflows Stefan Metzmacher
2021-04-25  0:08   ` Pavel Begunkov
2021-04-24 23:26 ` [PATCH v3 6/6] io_uring: " Stefan Metzmacher
2021-04-25 16:28 ` [PATCH v3 0/6] Complete setup before calling wake_up_new_task() Jens Axboe
2021-04-26 16:01   ` Stefan Metzmacher

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