From e0e92625d81f0f5e83c7062b9278717d6af1682f Mon Sep 17 00:00:00 2001 From: "Michael S. Tsirkin" Date: Sun, 27 May 2007 18:06:42 +0300 Subject: [PATCH] --- yaml --- r: 57085 b: refs/heads/master c: 8b7e15772a286d0ef8e4f8eca422ce5368b6fa97 h: refs/heads/master i: 57083: 99eb82fe1351aa5ed41b13972d4d0606f6503576 v: v3 --- [refs] | 2 +- trunk/drivers/infiniband/hw/mthca/mthca_qp.c | 6 +++--- trunk/include/linux/timer.h | 6 ------ trunk/kernel/time/tick-sched.c | 16 +--------------- trunk/kernel/timer.c | 10 +--------- 5 files changed, 6 insertions(+), 34 deletions(-) diff --git a/[refs] b/[refs] index 8438df6f28c0..8abc9e5ea89c 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: eaad084bb0f3a6259e56400cd45d061dbf040600 +refs/heads/master: 8b7e15772a286d0ef8e4f8eca422ce5368b6fa97 diff --git a/trunk/drivers/infiniband/hw/mthca/mthca_qp.c b/trunk/drivers/infiniband/hw/mthca/mthca_qp.c index 027664979fe2..eef415b12b2e 100644 --- a/trunk/drivers/infiniband/hw/mthca/mthca_qp.c +++ b/trunk/drivers/infiniband/hw/mthca/mthca_qp.c @@ -2284,10 +2284,10 @@ void mthca_free_err_wqe(struct mthca_dev *dev, struct mthca_qp *qp, int is_send, struct mthca_next_seg *next; /* - * For SRQs, all WQEs generate a CQE, so we're always at the - * end of the doorbell chain. + * For SRQs, all receive WQEs generate a CQE, so we're always + * at the end of the doorbell chain. */ - if (qp->ibqp.srq) { + if (qp->ibqp.srq && !is_send) { *new_wqe = 0; return; } diff --git a/trunk/include/linux/timer.h b/trunk/include/linux/timer.h index c661710d3627..e0c5c16c992f 100644 --- a/trunk/include/linux/timer.h +++ b/trunk/include/linux/timer.h @@ -68,12 +68,6 @@ extern int del_timer(struct timer_list * timer); extern int __mod_timer(struct timer_list *timer, unsigned long expires); extern int mod_timer(struct timer_list *timer, unsigned long expires); -/* - * The jiffies value which is added to now, when there is no timer - * in the timer wheel: - */ -#define NEXT_TIMER_MAX_DELTA ((1UL << 30) - 1) - /* * Return when the next timer-wheel timeout occurs (in absolute jiffies), * locks the timer base: diff --git a/trunk/kernel/time/tick-sched.c b/trunk/kernel/time/tick-sched.c index 52db9e3c526e..3e7ebc4646b7 100644 --- a/trunk/kernel/time/tick-sched.c +++ b/trunk/kernel/time/tick-sched.c @@ -247,21 +247,6 @@ void tick_nohz_stop_sched_tick(void) if (cpu == tick_do_timer_cpu) tick_do_timer_cpu = -1; - ts->idle_sleeps++; - - /* - * delta_jiffies >= NEXT_TIMER_MAX_DELTA signals that - * there is no timer pending or at least extremly far - * into the future (12 days for HZ=1000). In this case - * we simply stop the tick timer: - */ - if (unlikely(delta_jiffies >= NEXT_TIMER_MAX_DELTA)) { - ts->idle_expires.tv64 = KTIME_MAX; - if (ts->nohz_mode == NOHZ_MODE_HIGHRES) - hrtimer_cancel(&ts->sched_timer); - goto out; - } - /* * calculate the expiry time for the next timer wheel * timer @@ -269,6 +254,7 @@ void tick_nohz_stop_sched_tick(void) expires = ktime_add_ns(last_update, tick_period.tv64 * delta_jiffies); ts->idle_expires = expires; + ts->idle_sleeps++; if (ts->nohz_mode == NOHZ_MODE_HIGHRES) { hrtimer_start(&ts->sched_timer, expires, diff --git a/trunk/kernel/timer.c b/trunk/kernel/timer.c index 1a69705c2fb9..5ec5490f8d85 100644 --- a/trunk/kernel/timer.c +++ b/trunk/kernel/timer.c @@ -666,7 +666,7 @@ static inline void __run_timers(tvec_base_t *base) static unsigned long __next_timer_interrupt(tvec_base_t *base) { unsigned long timer_jiffies = base->timer_jiffies; - unsigned long expires = timer_jiffies + NEXT_TIMER_MAX_DELTA; + unsigned long expires = timer_jiffies + (LONG_MAX >> 1); int index, slot, array, found = 0; struct timer_list *nte; tvec_t *varray[4]; @@ -752,14 +752,6 @@ static unsigned long cmp_next_hrtimer_event(unsigned long now, tsdelta = ktime_to_timespec(hr_delta); delta = timespec_to_jiffies(&tsdelta); - - /* - * Limit the delta to the max value, which is checked in - * tick_nohz_stop_sched_tick(): - */ - if (delta > NEXT_TIMER_MAX_DELTA) - delta = NEXT_TIMER_MAX_DELTA; - /* * Take rounding errors in to account and make sure, that it * expires in the next tick. Otherwise we go into an endless