Commit 13086899 authored by Jens Axboe's avatar Jens Axboe
Browse files

Merge branch 'for-5.19/io_uring' into for-5.19/io_uring-passthrough

* for-5.19/io_uring: (85 commits)
  io_uring: don't clear req->kbuf when buffer selection is done
  io_uring: eliminate the need to track provided buffer ID separately
  io_uring: move provided buffer state closer to submit state
  io_uring: move provided and fixed buffers into the same io_kiocb area
  io_uring: abstract out provided buffer list selection
  io_uring: never call io_buffer_select() for a buffer re-select
  io_uring: get rid of hashed provided buffer groups
  io_uring: always use req->buf_index for the provided buffer group
  io_uring: ignore ->buf_index if REQ_F_BUFFER_SELECT isn't set
  io_uring: kill io_rw_buffer_select() wrapper
  io_uring: make io_buffer_select() return the user address directly
  io_uring: kill io_recv_buffer_select() wrapper
  io_uring: use 'sr' vs 'req->sr_msg' consistently
  io_uring: add POLL_FIRST support for send/sendmsg and recv/recvmsg
  io_uring: check IOPOLL/ioprio support upfront
  io_uring: replace smp_mb() with smp_mb__after_atomic() in io_sq_thread()
  io_uring: add IORING_SETUP_TASKRUN_FLAG
  io_uring: use TWA_SIGNAL_NO_IPI if IORING_SETUP_COOP_TASKRUN is used
  io_uring: set task_work notify method at init time
  io-wq: use __set_notify_signal() to wake workers
  ...
parents c5eb0a61 7ccba24d
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -871,7 +871,7 @@ static bool io_wq_for_each_worker(struct io_wqe *wqe,


static bool io_wq_worker_wake(struct io_worker *worker, void *data)
static bool io_wq_worker_wake(struct io_worker *worker, void *data)
{
{
	set_notify_signal(worker->task);
	__set_notify_signal(worker->task);
	wake_up_process(worker->task);
	wake_up_process(worker->task);
	return false;
	return false;
}
}
@@ -991,7 +991,7 @@ static bool __io_wq_worker_cancel(struct io_worker *worker,
{
{
	if (work && match->fn(work, match->data)) {
	if (work && match->fn(work, match->data)) {
		work->flags |= IO_WQ_WORK_CANCEL;
		work->flags |= IO_WQ_WORK_CANCEL;
		set_notify_signal(worker->task);
		__set_notify_signal(worker->task);
		return true;
		return true;
	}
	}


+1 −0
Original line number Original line Diff line number Diff line
@@ -155,6 +155,7 @@ struct io_wq_work_node *wq_stack_extract(struct io_wq_work_node *stack)
struct io_wq_work {
struct io_wq_work {
	struct io_wq_work_node list;
	struct io_wq_work_node list;
	unsigned flags;
	unsigned flags;
	int cancel_seq;
};
};


static inline struct io_wq_work *wq_next_work(struct io_wq_work *work)
static inline struct io_wq_work *wq_next_work(struct io_wq_work *work)
+1144 −938

File changed.

Preview size limit exceeded, changes collapsed.

+11 −2
Original line number Original line Diff line number Diff line
@@ -355,14 +355,23 @@ static inline void clear_notify_signal(void)
	smp_mb__after_atomic();
	smp_mb__after_atomic();
}
}


/*
 * Returns 'true' if kick_process() is needed to force a transition from
 * user -> kernel to guarantee expedient run of TWA_SIGNAL based task_work.
 */
static inline bool __set_notify_signal(struct task_struct *task)
{
	return !test_and_set_tsk_thread_flag(task, TIF_NOTIFY_SIGNAL) &&
	       !wake_up_state(task, TASK_INTERRUPTIBLE);
}

/*
/*
 * Called to break out of interruptible wait loops, and enter the
 * Called to break out of interruptible wait loops, and enter the
 * exit_to_user_mode_loop().
 * exit_to_user_mode_loop().
 */
 */
static inline void set_notify_signal(struct task_struct *task)
static inline void set_notify_signal(struct task_struct *task)
{
{
	if (!test_and_set_tsk_thread_flag(task, TIF_NOTIFY_SIGNAL) &&
	if (__set_notify_signal(task))
	    !wake_up_state(task, TASK_INTERRUPTIBLE))
		kick_process(task);
		kick_process(task);
}
}


+1 −0
Original line number Original line Diff line number Diff line
@@ -17,6 +17,7 @@ enum task_work_notify_mode {
	TWA_NONE,
	TWA_NONE,
	TWA_RESUME,
	TWA_RESUME,
	TWA_SIGNAL,
	TWA_SIGNAL,
	TWA_SIGNAL_NO_IPI,
};
};


static inline bool task_work_pending(struct task_struct *task)
static inline bool task_work_pending(struct task_struct *task)
Loading