Lines Matching defs:src_rq
2276 * @src_rq: rq to move the task from, locked on entry, released on return
2279 * Move @p which is currently on @src_rq to @dst_rq's local DSQ.
2282 struct rq *src_rq, struct rq *dst_rq)
2284 lockdep_assert_rq_held(src_rq);
2291 deactivate_task(src_rq, p, 0);
2294 raw_spin_rq_unlock(src_rq);
2381 * @src_rq: rq @p is currently on, stable with @dsq locked
2384 * DSQ, including any local DSQ, but are not locking @src_rq. Locking @src_rq is
2388 * @src_rq is locked, which e.g. scx_dump_task() depends on.
2390 * We want to grab @src_rq but that can deadlock if we try while locking @dsq,
2391 * so we want to unlink @p from @dsq, drop its lock and then lock @src_rq. As
2396 * dequeued after we unlock @dsq but before locking @src_rq, the holding_cpu
2403 * On return, @dsq is unlocked and @src_rq is locked. Returns %true if @p is
2408 struct rq *src_rq)
2419 raw_spin_rq_lock(src_rq);
2423 !WARN_ON_ONCE(src_rq != task_rq(p));
2428 struct scx_dispatch_q *dsq, struct rq *src_rq)
2432 if (unlink_dsq_and_lock_src_rq(p, dsq, src_rq)) {
2433 move_remote_task_to_local_dsq(p, enq_flags, src_rq, this_rq);
2436 raw_spin_rq_unlock(src_rq);
2463 struct rq *src_rq = task_rq(p), *dst_rq;
2467 lockdep_assert_rq_held(src_rq);
2471 if (src_rq != dst_rq &&
2474 dst_rq = src_rq;
2479 dst_rq = src_rq;
2488 if (src_rq == dst_rq) {
2496 src_rq, dst_rq);
2585 struct rq *src_rq = task_rq(p);
2595 if (rq == src_rq && rq == dst_rq) {
2601 if (src_rq != dst_rq &&
2609 * @p is on a possibly remote @src_rq which we need to lock to move the
2610 * task. If dequeue is in progress, it'd be locking @src_rq and waiting
2611 * on DISPATCHING, so we can't grab @src_rq lock while holding
2624 /* switch to @src_rq lock */
2625 if (locked_rq != src_rq) {
2627 locked_rq = src_rq;
2628 raw_spin_rq_lock(src_rq);
2633 !WARN_ON_ONCE(src_rq != task_rq(p))) {
2639 if (src_rq == dst_rq) {
2645 src_rq, dst_rq);
8349 struct rq *this_rq, *src_rq, *locked_rq;
8385 src_rq = task_rq(p);
8392 if (this_rq != src_rq) {
8394 raw_spin_rq_lock(src_rq);
8397 raw_spin_rq_lock(src_rq);
8400 locked_rq = src_rq;
8404 if (nldsq_cursor_lost_task(&kit->cursor, src_rq, src_dsq, p)) {