Lines Matching refs:victim
631 struct spu_context *victim = NULL; in find_victim() local
657 (!victim || tmp->prio > victim->prio)) { in find_victim()
658 victim = spu->ctx; in find_victim()
661 if (victim) in find_victim()
662 get_spu_context(victim); in find_victim()
665 if (victim) { in find_victim()
676 if (!mutex_trylock(&victim->state_mutex)) { in find_victim()
677 put_spu_context(victim); in find_victim()
678 victim = NULL; in find_victim()
682 spu = victim->spu; in find_victim()
683 if (!spu || victim->prio <= ctx->prio) { in find_victim()
689 mutex_unlock(&victim->state_mutex); in find_victim()
690 put_spu_context(victim); in find_victim()
691 victim = NULL; in find_victim()
699 spu_unbind_context(spu, victim); in find_victim()
702 victim->stats.invol_ctx_switch++; in find_victim()
704 if (test_bit(SPU_SCHED_SPU_RUN, &victim->sched_flags)) in find_victim()
705 spu_add_to_rq(victim); in find_victim()
707 mutex_unlock(&victim->state_mutex); in find_victim()
708 put_spu_context(victim); in find_victim()