Lines Matching refs:hash
39 IO_ACCT_STALLED_BIT = 0, /* stalled on hash */
102 struct io_wq_hash *hash;
458 static bool io_wait_on_hash(struct io_wq *wq, unsigned int hash)
462 spin_lock_irq(&wq->hash->wait.lock);
464 __add_wait_queue(&wq->hash->wait, &wq->wait);
465 if (!test_bit(hash, &wq->hash->map)) {
471 spin_unlock_irq(&wq->hash->wait.lock);
485 unsigned int hash;
495 hash = io_get_work_hash(work);
496 /* all items with this hash lie in [work, tail] */
497 tail = wq->hash_tail[hash];
500 if (!test_and_set_bit(hash, &wq->hash->map)) {
501 wq->hash_tail[hash] = NULL;
506 stall_hash = hash;
507 /* fast forward to a next hash, for-each will fix up @prev */
524 if (wq_has_sleeper(&wq->hash->wait))
525 wake_up(&wq->hash->wait);
590 unsigned int hash = io_get_work_hash(work);
609 if (hash != -1U && !next_hashed) {
610 /* serialize hash clear with wake_up() */
611 spin_lock_irq(&wq->hash->wait.lock);
612 clear_bit(hash, &wq->hash->map);
614 spin_unlock_irq(&wq->hash->wait.lock);
615 if (wq_has_sleeper(&wq->hash->wait))
616 wake_up(&wq->hash->wait);
901 unsigned int hash;
910 hash = io_get_work_hash(work);
911 tail = wq->hash_tail[hash];
912 wq->hash_tail[hash] = work;
975 * Work items that hash to the same value will not be done in parallel.
1021 unsigned int hash = io_get_work_hash(work);
1024 if (io_wq_is_hashed(work) && work == wq->hash_tail[hash]) {
1027 if (prev_work && io_get_work_hash(prev_work) == hash)
1028 wq->hash_tail[hash] = prev_work;
1030 wq->hash_tail[hash] = NULL;
1155 refcount_inc(&data->hash->refs);
1156 wq->hash = data->hash;
1192 io_wq_put_hash(data->hash);
1244 spin_lock_irq(&wq->hash->wait.lock);
1246 spin_unlock_irq(&wq->hash->wait.lock);
1262 io_wq_put_hash(wq->hash);