Lines Matching refs:locks
344 struct ww_mutex *locks; member
382 struct ww_mutex *locks = stress->locks; in stress_inorder_work() local
401 err = ww_mutex_lock(&locks[order[n]], &ctx); in stress_inorder_work()
409 ww_mutex_unlock(&locks[order[contended]]); in stress_inorder_work()
412 ww_mutex_unlock(&locks[order[n]]); in stress_inorder_work()
415 ww_mutex_lock_slow(&locks[order[contended]], &ctx); in stress_inorder_work()
440 LIST_HEAD(locks); in stress_reorder_work()
455 ll->lock = &stress->locks[order[n]]; in stress_reorder_work()
456 list_add(&ll->link, &locks); in stress_reorder_work()
464 list_for_each_entry(ll, &locks, link) { in stress_reorder_work()
470 list_for_each_entry_continue_reverse(ln, &locks, link) in stress_reorder_work()
480 list_move(&ll->link, &locks); /* restarts iteration */ in stress_reorder_work()
484 list_for_each_entry(ll, &locks, link) in stress_reorder_work()
491 list_for_each_entry_safe(ll, ln, &locks, link) in stress_reorder_work()
501 struct ww_mutex *lock = stress->locks + (get_random_int() % nlocks); in stress_one_work()
526 struct ww_mutex *locks; in stress() local
529 locks = kmalloc_array(nlocks, sizeof(*locks), GFP_KERNEL); in stress()
530 if (!locks) in stress()
534 ww_mutex_init(&locks[n], &ww_class); in stress()
564 stress->locks = locks; in stress()
575 ww_mutex_destroy(&locks[n]); in stress()
576 kfree(locks); in stress()