Lines Matching refs:locks
357 struct ww_mutex *locks; member
395 struct ww_mutex *locks = stress->locks; in stress_inorder_work() local
414 err = ww_mutex_lock(&locks[order[n]], &ctx); in stress_inorder_work()
422 ww_mutex_unlock(&locks[order[contended]]); in stress_inorder_work()
425 ww_mutex_unlock(&locks[order[n]]); in stress_inorder_work()
428 ww_mutex_lock_slow(&locks[order[contended]], &ctx); in stress_inorder_work()
453 LIST_HEAD(locks); in stress_reorder_work()
468 ll->lock = &stress->locks[order[n]]; in stress_reorder_work()
469 list_add(&ll->link, &locks); in stress_reorder_work()
477 list_for_each_entry(ll, &locks, link) { in stress_reorder_work()
483 list_for_each_entry_continue_reverse(ln, &locks, link) in stress_reorder_work()
493 list_move(&ll->link, &locks); /* restarts iteration */ in stress_reorder_work()
497 list_for_each_entry(ll, &locks, link) in stress_reorder_work()
504 list_for_each_entry_safe(ll, ln, &locks, link) in stress_reorder_work()
514 struct ww_mutex *lock = stress->locks + (get_random_int() % nlocks); in stress_one_work()
539 struct ww_mutex *locks; in stress() local
542 locks = kmalloc_array(nlocks, sizeof(*locks), GFP_KERNEL); in stress()
543 if (!locks) in stress()
547 ww_mutex_init(&locks[n], &ww_class); in stress()
577 stress->locks = locks; in stress()
588 ww_mutex_destroy(&locks[n]); in stress()
589 kfree(locks); in stress()