Lines Matching refs:src_rq

2428  * @src_rq: rq to move the task from, locked on entry, released on return
2431 * Move @p which is currently on @src_rq to @dst_rq's local DSQ.
2435 struct rq *src_rq, struct rq *dst_rq)
2437 lockdep_assert_rq_held(src_rq);
2444 deactivate_task(src_rq, p, 0);
2447 switch_rq_lock(src_rq, dst_rq);
2547 * @src_rq: rq @p is currently on, stable with @dsq locked
2550 * including any local DSQ, but are not locking @src_rq. Locking @src_rq is
2554 * @src_rq is locked, which e.g. scx_dump_task() depends on.
2556 * We want to grab @src_rq but that can deadlock if we try while locking @dsq,
2557 * so we want to unlink @p from @dsq, drop its lock and then lock @src_rq. As
2562 * dequeued after we unlock @dsq but before locking @src_rq, the holding_cpu
2569 * On return, @dsq is unlocked and @src_rq is locked. Returns %true if @p is
2575 struct rq *src_rq)
2587 switch_rq_lock(locked_rq, src_rq);
2591 !WARN_ON_ONCE(src_rq != task_rq(p));
2596 struct scx_dispatch_q *dsq, struct rq *src_rq)
2598 if (unlink_dsq_and_switch_rq_lock(p, dsq, this_rq, src_rq)) {
2599 move_remote_task_to_local_dsq(sch, p, enq_flags, src_rq, this_rq);
2602 switch_rq_lock(src_rq, this_rq);
2628 struct rq *src_rq = task_rq(p), *dst_rq;
2632 lockdep_assert_rq_held(src_rq);
2636 if (src_rq != dst_rq &&
2639 dst_rq = src_rq;
2644 dst_rq = src_rq;
2653 if (src_rq == dst_rq) {
2659 move_remote_task_to_local_dsq(sch, p, enq_flags, src_rq, dst_rq);
2750 struct rq *src_rq = task_rq(p);
2760 if (rq == src_rq && rq == dst_rq) {
2767 * @p is on a possibly remote @src_rq which we need to lock to move the
2768 * task. If dequeue is in progress, it'd be locking @src_rq and waiting
2769 * on DISPATCHING, so we can't grab @src_rq lock while holding
2782 /* switch to @src_rq lock */
2783 if (locked_rq != src_rq) {
2784 switch_rq_lock(locked_rq, src_rq);
2785 locked_rq = src_rq;
2790 !WARN_ON_ONCE(src_rq != task_rq(p))) {
2797 if (src_rq == dst_rq) {
2804 scx_dispatch_enqueue(sch, src_rq, find_global_dsq(sch, task_cpu(p)),
2810 move_remote_task_to_local_dsq(sch, p, enq_flags, src_rq, dst_rq);
9107 struct rq *p_rq, *src_rq, *locked_rq;
9140 src_rq = task_rq(p);
9151 if (locked_rq != src_rq)
9152 switch_rq_lock(locked_rq, src_rq);
9154 raw_spin_rq_lock(src_rq);
9157 p_rq = src_rq;
9161 if (nldsq_cursor_lost_task(&kit->cursor, src_rq, src_dsq, p)) {