Lines Matching refs:order
391 int *order; in get_random_order() local
394 order = kmalloc_array(count, sizeof(*order), GFP_KERNEL); in get_random_order()
395 if (!order) in get_random_order()
396 return order; in get_random_order()
399 order[n] = n; in get_random_order()
404 tmp = order[n]; in get_random_order()
405 order[n] = order[r]; in get_random_order()
406 order[r] = tmp; in get_random_order()
410 return order; in get_random_order()
424 int *order; in stress_inorder_work() local
426 order = get_random_order(nlocks); in stress_inorder_work()
427 if (!order) in stress_inorder_work()
441 err = ww_mutex_lock(&locks[order[n]], &ctx); in stress_inorder_work()
449 ww_mutex_unlock(&locks[order[contended]]); in stress_inorder_work()
452 ww_mutex_unlock(&locks[order[n]]); in stress_inorder_work()
455 ww_mutex_lock_slow(&locks[order[contended]], &ctx); in stress_inorder_work()
468 kfree(order); in stress_inorder_work()
482 int *order; in stress_reorder_work() local
485 order = get_random_order(stress->nlocks); in stress_reorder_work()
486 if (!order) in stress_reorder_work()
494 ll->lock = &stress->locks[order[n]]; in stress_reorder_work()
497 kfree(order); in stress_reorder_work()
498 order = NULL; in stress_reorder_work()
532 kfree(order); in stress_reorder_work()