Lines Matching defs:src_rq
2435 * @src_rq: rq to move the task from, locked on entry, released on return
2438 * Move @p which is currently on @src_rq to @dst_rq's local DSQ.
2442 struct rq *src_rq, struct rq *dst_rq)
2444 lockdep_assert_rq_held(src_rq);
2451 deactivate_task(src_rq, p, 0);
2454 switch_rq_lock(src_rq, dst_rq);
2554 * @src_rq: rq @p is currently on, stable with @dsq locked
2557 * including any local DSQ, but are not locking @src_rq. Locking @src_rq is
2561 * @src_rq is locked, which e.g. scx_dump_task() depends on.
2563 * We want to grab @src_rq but that can deadlock if we try while locking @dsq,
2564 * so we want to unlink @p from @dsq, drop its lock and then lock @src_rq. As
2569 * dequeued after we unlock @dsq but before locking @src_rq, the holding_cpu
2576 * On return, @dsq is unlocked and @src_rq is locked. Returns %true if @p is
2582 struct rq *src_rq)
2594 switch_rq_lock(locked_rq, src_rq);
2597 if (likely(p->scx.holding_cpu == cpu) && !WARN_ON_ONCE(src_rq != task_rq(p))) {
2607 struct scx_dispatch_q *dsq, struct rq *src_rq)
2609 if (unlink_dsq_and_switch_rq_lock(p, dsq, this_rq, src_rq)) {
2610 move_remote_task_to_local_dsq(sch, p, enq_flags, src_rq, this_rq);
2613 switch_rq_lock(src_rq, this_rq);
2639 struct rq *src_rq = task_rq(p), *dst_rq;
2643 lockdep_assert_rq_held(src_rq);
2649 if (src_rq != dst_rq &&
2652 dst_rq = src_rq;
2657 dst_rq = src_rq;
2666 if (src_rq == dst_rq) {
2672 move_remote_task_to_local_dsq(sch, p, enq_flags, src_rq, dst_rq);
2763 struct rq *src_rq = task_rq(p);
2773 if (rq == src_rq && rq == dst_rq) {
2780 * @p is on a possibly remote @src_rq which we need to lock to move the
2781 * task. If dequeue is in progress, it'd be locking @src_rq and waiting
2782 * on DISPATCHING, so we can't grab @src_rq lock while holding
2795 /* switch to @src_rq lock */
2796 if (locked_rq != src_rq) {
2797 switch_rq_lock(locked_rq, src_rq);
2798 locked_rq = src_rq;
2803 !WARN_ON_ONCE(src_rq != task_rq(p))) {
2810 if (src_rq == dst_rq) {
2817 scx_dispatch_enqueue(sch, src_rq, find_global_dsq(sch, task_cpu(p)),
2823 move_remote_task_to_local_dsq(sch, p, enq_flags, src_rq, dst_rq);
9160 struct rq *p_rq, *src_rq, *locked_rq;
9193 src_rq = task_rq(p);
9204 if (locked_rq != src_rq)
9205 switch_rq_lock(locked_rq, src_rq);
9207 raw_spin_rq_lock(src_rq);
9210 p_rq = src_rq;
9214 if (nldsq_cursor_lost_task(&kit->cursor, src_rq, src_dsq, p)) {