kgnilnd_unmap_fma_blocks(dev);
kgnilnd_schedule_device(dev);
- wake_up_all(&dev->gnd_dgram_waitq);
- wake_up_all(&dev->gnd_dgping_waitq);
+ wake_up(&dev->gnd_dgram_waitq);
+ wake_up(&dev->gnd_dgping_waitq);
LASSERT(list_empty(&dev->gnd_connd_peers));
}
spin_lock(&kgnilnd_data.kgn_reaper_lock);
- wake_up_all(&kgnilnd_data.kgn_reaper_waitq);
+ wake_up(&kgnilnd_data.kgn_reaper_waitq);
spin_unlock(&kgnilnd_data.kgn_reaper_lock);
if (atomic_read(&kgnilnd_data.kgn_nthreads))
* has come around and set ready to zero */
already_live = cmpxchg(&dev->gnd_ready, GNILND_DEV_IDLE, GNILND_DEV_IRQ);
- if (!already_live) {
- wake_up_all(&dev->gnd_waitq);
- }
+ if (!already_live)
+ wake_up(&dev->gnd_waitq);
}
void kgnilnd_schedule_device_timer(cfs_timer_cb_arg_t data)
!kgnilnd_data.kgn_quiesce_trigger) {
CDEBUG(D_INFO, "schedule timeout %ld (%lu sec)\n",
timeout, cfs_duration_sec(timeout));
- wake_up_all(&dev->gnd_dgping_waitq);
+ wake_up(&dev->gnd_dgping_waitq);
schedule();
CDEBUG(D_INFO, "awake after schedule\n");
deadline = jiffies + cfs_time_seconds(*kgnilnd_tunables.kgn_dgram_timeout);
/* morning sunshine */
spin_lock(&kgnilnd_data.kgn_reaper_lock);
- wake_up_all(&kgnilnd_data.kgn_reaper_waitq);
+ wake_up(&kgnilnd_data.kgn_reaper_waitq);
spin_unlock(&kgnilnd_data.kgn_reaper_lock);
for (i = 0; i < kgnilnd_data.kgn_ndevs; i++) {
kgn_device_t *dev = &kgnilnd_data.kgn_devices[i];
- wake_up_all(&dev->gnd_waitq);
- wake_up_all(&dev->gnd_dgram_waitq);
- wake_up_all(&dev->gnd_dgping_waitq);
+ wake_up(&dev->gnd_waitq);
+ wake_up(&dev->gnd_dgram_waitq);
+ wake_up(&dev->gnd_dgping_waitq);
}
kgnilnd_wakeup_rca_thread();
cfs_percpt_for_each(sched, i, kiblnd_data.kib_scheds)
wake_up_all(&sched->ibs_waitq);
- wake_up_all(&kiblnd_data.kib_connd_waitq);
- wake_up_all(&kiblnd_data.kib_failover_waitq);
+ wake_up(&kiblnd_data.kib_connd_waitq);
+ wake_up(&kiblnd_data.kib_failover_waitq);
wait_var_event_warning(&kiblnd_data.kib_nthreads,
!atomic_read(&kiblnd_data.kib_nthreads),
/* extra ref for scheduler */
ksocknal_conn_addref(conn);
- wake_up (&sched->kss_waitq);
+ wake_up(&sched->kss_waitq);
}
spin_unlock_bh(&sched->kss_lock);
/* flag threads to terminate; wake and wait for them to die */
ksocknal_data.ksnd_shuttingdown = 1;
wake_up_all(&ksocknal_data.ksnd_connd_waitq);
- wake_up_all(&ksocknal_data.ksnd_reaper_waitq);
+ wake_up(&ksocknal_data.ksnd_reaper_waitq);
if (ksocknal_data.ksnd_schedulers != NULL) {
cfs_percpt_for_each(sched, i,
spin_lock(&lp->lp_lock);
list_splice_init(&lp->lp_dc_pendq, &pending_msgs);
spin_unlock(&lp->lp_lock);
- wake_up_all(&lp->lp_dc_waitq);
+ wake_up(&lp->lp_dc_waitq);
if (lp->lp_rtr_refcount > 0)
lnet_router_discovery_complete(lp);
}
--seq->lcs_update;
- wake_up_all(&seq->lcs_waitq);
+ wake_up(&seq->lcs_waitq);
}
/**
{
if ((lock->l_flags & LDLM_FL_FAIL_NOTIFIED) == 0) {
lock->l_flags |= LDLM_FL_FAIL_NOTIFIED;
- wake_up_all(&lock->l_waitq);
+ wake_up(&lock->l_waitq);
}
}
EXPORT_SYMBOL(ldlm_lock_fail_match_locked);
void ldlm_lock_allow_match_locked(struct ldlm_lock *lock)
{
ldlm_set_lvb_ready(lock);
- wake_up_all(&lock->l_waitq);
+ wake_up(&lock->l_waitq);
}
EXPORT_SYMBOL(ldlm_lock_allow_match_locked);
/* only canceller can set bl_done bit */
ldlm_set_bl_done(lock);
- wake_up_all(&lock->l_waitq);
+ wake_up(&lock->l_waitq);
} else if (!ldlm_is_bl_done(lock)) {
/* The lock is guaranteed to have been canceled once
* returning from this function. */
thread_set_flags(thread, SVC_RUNNING);
spin_unlock(&lfsck->li_lock);
- wake_up_all(&thread->t_ctl_waitq);
+ wake_up(&thread->t_ctl_waitq);
wait_event_idle(thread->t_ctl_waitq,
lfsck->li_start_unplug ||
thread_set_flags(thread, SVC_STOPPED);
lfsck->li_task = NULL;
spin_unlock(&lfsck->li_lock);
- wake_up_all(&thread->t_ctl_waitq);
+ wake_up(&thread->t_ctl_waitq);
lfsck_thread_args_fini(lta);
return rc;
}
lad->lad_task = current;
thread_set_flags(athread, SVC_RUNNING);
spin_unlock(&lad->lad_lock);
- wake_up_all(&mthread->t_ctl_waitq);
+ wake_up(&mthread->t_ctl_waitq);
while (1) {
while (!list_empty(&lad->lad_req_list)) {
wakeup = true;
spin_unlock(&lad->lad_lock);
if (wakeup)
- wake_up_all(&mthread->t_ctl_waitq);
+ wake_up(&mthread->t_ctl_waitq);
lao->la_req_fini(env, lar);
if (rc < 0 && bk->lb_param & LPF_FAILOUT)
LASSERT(lad->lad_post_result > 0);
/* Wakeup the master engine to go ahead. */
- wake_up_all(&mthread->t_ctl_waitq);
+ wake_up(&mthread->t_ctl_waitq);
memset(lr, 0, sizeof(*lr));
lr->lr_event = LE_PHASE1_DONE;
clear_bit(LAD_TO_DOUBLE_SCAN, &lad->lad_flags);
atomic_inc(&lfsck->li_double_scan_count);
set_bit(LAD_IN_DOUBLE_SCAN, &lad->lad_flags);
- wake_up_all(&mthread->t_ctl_waitq);
+ wake_up(&mthread->t_ctl_waitq);
com->lc_new_checked = 0;
com->lc_new_scanned = 0;
lad->lad_assistant_status);
lfsck_thread_args_fini(lta);
- wake_up_all(&mthread->t_ctl_waitq);
+ wake_up(&mthread->t_ctl_waitq);
return rc;
}
lad->lad_prefetched++;
spin_unlock(&lad->lad_lock);
if (wakeup)
- wake_up_all(&athread->t_ctl_waitq);
+ wake_up(&athread->t_ctl_waitq);
next:
down_write(&com->lc_sem);
(rc > 0 && lo->ll_flags & LF_INCOMPLETE) ? 0 : rc);
lfsck_layout_slave_quit(env, com);
if (atomic_dec_and_test(&lfsck->li_double_scan_count))
- wake_up_all(&lfsck->li_thread.t_ctl_waitq);
+ wake_up(&lfsck->li_thread.t_ctl_waitq);
CDEBUG(D_LFSCK, "%s: layout LFSCK slave phase2 scan finished, "
"status %d: rc = %d\n",
stop->ls_flags = lr->lr_param & ~LPF_BROADCAST;
lfsck_stop(env, lfsck->li_bottom, stop);
} else if (lfsck_phase2_next_ready(lad)) {
- wake_up_all(&lad->lad_thread.t_ctl_waitq);
+ wake_up(&lad->lad_thread.t_ctl_waitq);
}
RETURN(0);
true);
if (llst != NULL) {
lfsck_layout_llst_put(llst);
- wake_up_all(&lfsck->li_thread.t_ctl_waitq);
+ wake_up(&lfsck->li_thread.t_ctl_waitq);
}
}
lfsck_layout_llst_put(llst);
if (list_empty(&llsd->llsd_master_list))
- wake_up_all(&lfsck->li_thread.t_ctl_waitq);
+ wake_up(&lfsck->li_thread.t_ctl_waitq);
if (lr->lr_event == LE_PEER_EXIT &&
(lfsck->li_bookmark_ram.lb_param & LPF_FAILOUT ||
CDEBUG(D_LFSCK, "%s: waiting for assistant to do %s post, rc = %d\n",
lfsck_lfsck2name(com->lc_lfsck), lad->lad_name, *result);
- wake_up_all(&athread->t_ctl_waitq);
+ wake_up(&athread->t_ctl_waitq);
wait_event_idle(mthread->t_ctl_waitq,
(*result > 0 && list_empty(&lad->lad_req_list)) ||
thread_is_stopped(athread));
"status %d\n",
lfsck_lfsck2name(com->lc_lfsck), lad->lad_name, status);
- wake_up_all(&athread->t_ctl_waitq);
+ wake_up(&athread->t_ctl_waitq);
wait_event_idle(mthread->t_ctl_waitq,
test_bit(LAD_IN_DOUBLE_SCAN, &lad->lad_flags) ||
thread_is_stopped(athread));
struct ptlrpc_thread *athread = &lad->lad_thread;
set_bit(LAD_EXIT, &lad->lad_flags);
- wake_up_all(&athread->t_ctl_waitq);
+ wake_up(&athread->t_ctl_waitq);
wait_event_idle(mthread->t_ctl_waitq,
thread_is_init(athread) ||
thread_is_stopped(athread));
thread_is_stopped(thread));
if (start == NULL || !(start->ls_flags & LPF_BROADCAST)) {
lfsck->li_start_unplug = 1;
- wake_up_all(&thread->t_ctl_waitq);
+ wake_up(&thread->t_ctl_waitq);
GOTO(out, rc = 0);
}
spin_unlock(&lfsck->li_lock);
lfsck->li_start_unplug = 1;
- wake_up_all(&thread->t_ctl_waitq);
+ wake_up(&thread->t_ctl_waitq);
wait_event_idle(thread->t_ctl_waitq,
thread_is_stopped(thread));
}
} else {
lfsck->li_start_unplug = 1;
- wake_up_all(&thread->t_ctl_waitq);
+ wake_up(&thread->t_ctl_waitq);
}
GOTO(put, rc);
}
}
- wake_up_all(&thread->t_ctl_waitq);
+ wake_up(&thread->t_ctl_waitq);
spin_unlock(&lfsck->li_lock);
if (stop && stop->ls_flags & LPF_BROADCAST)
rc1 = lfsck_stop_all(env, lfsck, stop);
lad->lad_prefetched++;
spin_unlock(&lad->lad_lock);
if (wakeup)
- wake_up_all(&lad->lad_thread.t_ctl_waitq);
+ wake_up(&lad->lad_thread.t_ctl_waitq);
EXIT;
}
lad->lad_prefetched++;
spin_unlock(&lad->lad_lock);
if (wakeup)
- wake_up_all(&lad->lad_thread.t_ctl_waitq);
+ wake_up(&lad->lad_thread.t_ctl_waitq);
down_write(&com->lc_sem);
com->lc_new_checked++;
stop->ls_flags = lr->lr_param & ~LPF_BROADCAST;
lfsck_stop(env, lfsck->li_bottom, stop);
} else if (lfsck_phase2_next_ready(lad)) {
- wake_up_all(&lad->lad_thread.t_ctl_waitq);
+ wake_up(&lad->lad_thread.t_ctl_waitq);
}
RETURN(0);
LASSERT(pcci && atomic_read(&pcci->pcci_active_ios) > 0);
if (atomic_dec_and_test(&pcci->pcci_active_ios))
- wake_up_all(&pcci->pcci_waitq);
+ wake_up(&pcci->pcci_waitq);
}
LASSERT(atomic_read(&lov->lo_active_ios) > 0);
if (atomic_dec_and_test(&lov->lo_active_ios))
- wake_up_all(&lov->lo_waitq);
+ wake_up(&lov->lo_waitq);
EXIT;
}
ENTRY;
if (atomic_dec_and_test(&lov->lo_active_ios))
- wake_up_all(&lov->lo_waitq);
+ wake_up(&lov->lo_waitq);
EXIT;
}
crs->crs_rec_count++;
mutex_unlock(&crs->crs_lock);
- wake_up_all(&crs->crs_waitq_cons);
+ wake_up(&crs->crs_waitq_cons);
RETURN(0);
}
if (rc < 0)
crs->crs_err = rc;
- wake_up_all(&crs->crs_waitq_cons);
+ wake_up(&crs->crs_waitq_cons);
if (llh != NULL)
llog_cat_close(NULL, llh);
if (written_total > 0) {
rc = written_total;
- wake_up_all(&crs->crs_waitq_prod);
+ wake_up(&crs->crs_waitq_prod);
} else if (rc == 0) {
rc = crs->crs_err;
}
}
mutex_unlock(&crs->crs_lock);
- wake_up_all(&crs->crs_waitq_prod);
+ wake_up(&crs->crs_waitq_prod);
return 0;
}
set_cdt_state(cdt, CDT_RUNNING);
/* Inform mdt_hsm_cdt_start(). */
- wake_up_all(&cdt->cdt_waitq);
+ wake_up(&cdt->cdt_waitq);
while (1) {
int i;
* to immediately reclaim anchor when cl_sync_io_wait()
* completes.
*/
- wake_up_all_locked(&anchor->csi_waitq);
+ wake_up_locked(&anchor->csi_waitq);
if (end_io)
end_io(env, anchor);
if (anchor->csi_aio)
}
if (waitqueue_active(wq))
- wake_up_all(wq);
+ wake_up(wq);
}
/**
return 0;
UC_CACHE_SET_EXPIRED(entry);
- wake_up_all(&entry->ue_waitq);
+ wake_up(&entry->ue_waitq);
} else if (!UC_CACHE_IS_INVALID(entry)) {
UC_CACHE_SET_EXPIRED(entry);
}
if (rc < 0) {
UC_CACHE_CLEAR_ACQUIRING(entry);
UC_CACHE_SET_INVALID(entry);
- wake_up_all(&entry->ue_waitq);
+ wake_up(&entry->ue_waitq);
if (unlikely(rc == -EREMCHG)) {
put_entry(cache, entry);
GOTO(out, entry = ERR_PTR(rc));
}
UC_CACHE_CLEAR_ACQUIRING(entry);
spin_unlock(&cache->uc_lock);
- wake_up_all(&entry->ue_waitq);
+ wake_up(&entry->ue_waitq);
put_entry(cache, entry);
RETURN(rc);
oal->oal_is_closed = 1;
down_read(&oal->oal_buf_list_sem);
- list_for_each_entry(ocb, &oal->oal_circ_buf_list, ocb_list) {
- wake_up_all(&ocb->ocb_read_wait_queue);
- }
+ list_for_each_entry(ocb, &oal->oal_circ_buf_list, ocb_list)
+ wake_up(&ocb->ocb_read_wait_queue);
up_read(&oal->oal_buf_list_sem);
cdev_device_del(&oal->oal_cdev, &oal->oal_device);
}
oio->oi_is_active = 0;
LASSERT(atomic_read(&osc->oo_nr_ios) > 0);
if (atomic_dec_and_test(&osc->oo_nr_ios))
- wake_up_all(&osc->oo_io_waitq);
+ wake_up(&osc->oo_io_waitq);
}
}
EXPORT_SYMBOL(osc_io_iter_fini);
atomic_dec(&cli->cl_lru_shrinkers);
if (count > 0) {
atomic_long_add(count, cli->cl_lru_left);
- wake_up_all(&osc_lru_waitq);
+ wake_up(&osc_lru_waitq);
}
RETURN(count > 0 ? count : rc);
}
void osc_lru_unreserve(struct client_obd *cli, unsigned long npages)
{
atomic_long_add(npages, cli->cl_lru_left);
- wake_up_all(&osc_lru_waitq);
+ wake_up(&osc_lru_waitq);
}
/**
&cli->cl_cache->ccc_unstable_nr);
LASSERT(unstable_count >= 0);
if (unstable_count == 0)
- wake_up_all(&cli->cl_cache->ccc_unstable_waitq);
+ wake_up(&cli->cl_cache->ccc_unstable_waitq);
if (waitqueue_active(&osc_lru_waitq))
(void)ptlrpcd_queue_work(cli->cl_lru_work);
}
if (oaua->oaua_count != NULL && atomic_dec_and_test(oaua->oaua_count))
- wake_up_all(oaua->oaua_waitq);
+ wake_up(oaua->oaua_waitq);
if (oth != NULL) {
/* oth and osp_update_requests will be destoryed in
out:
rsi_free(&rsii);
if (rsip) {
- wake_up_all(&rsip->waitq);
+ wake_up(&rsip->waitq);
cache_put(&rsip->h, &rsi_cache);
} else {
status = -ENOMEM;
if (unlikely(page_pools.epp_waitqlen)) {
LASSERT(waitqueue_active(&page_pools.epp_waitq));
- wake_up_all(&page_pools.epp_waitq);
+ wake_up(&page_pools.epp_waitq);
}
}
if (hrp->hrp_thrs == NULL)
continue; /* uninitialized */
for (j = 0; j < hrp->hrp_nthrs; j++)
- wake_up_all(&hrp->hrp_thrs[j].hrt_waitq);
+ wake_up(&hrp->hrp_thrs[j].hrt_waitq);
}
cfs_percpt_for_each(hrp, i, ptlrpc_hr.hr_partitions) {
}
lqe->lqe_pending_req--;
lqe->lqe_pending_rel = 0;
- wake_up_all(&lqe->lqe_waiters);
+ wake_up(&lqe->lqe_waiters);
}
/**
lqe_write_unlock(lqe);
if (wakeup)
- wake_up_all(&lqe->lqe_waiters);
+ wake_up(&lqe->lqe_waiters);
lqe_putref(lqe);
out:
req->rq_status = rc;
smp_mb();
if (unlikely(barrier->bi_status == BS_FREEZING_P1))
- wake_up_all(&barrier->bi_waitq);
+ wake_up(&barrier->bi_waitq);
barrier_instance_put(barrier);
}
}