Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8695
b: refs/heads/master
c: 121caf5
h: refs/heads/master
i:
  8693: 2674e38
  8691: 1135dbc
  8687: 15f7ec0
v: v3
  • Loading branch information
Nishanth Aravamudan authored and David S. Miller committed Sep 12, 2005
1 parent f4f3445 commit 2d95e9a
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 21 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7672d0b54411371e0b6a831c1cb2f0ce615de6dc
refs/heads/master: 121caf577dc61588c1128821873a08cec48baf58
13 changes: 5 additions & 8 deletions trunk/net/core/pktgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -1452,8 +1452,7 @@ static int proc_thread_write(struct file *file, const char __user *user_buffer,
thread_lock();
t->control |= T_REMDEV;
thread_unlock();
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(HZ/8); /* Propagate thread->control */
schedule_timeout_interruptible(msecs_to_jiffies(125)); /* Propagate thread->control */
ret = count;
sprintf(pg_result, "OK: rem_device_all");
goto out;
Expand Down Expand Up @@ -1716,10 +1715,9 @@ static void spin(struct pktgen_dev *pkt_dev, __u64 spin_until_us)
printk(KERN_INFO "sleeping for %d\n", (int)(spin_until_us - now));
while (now < spin_until_us) {
/* TODO: optimise sleeping behavior */
if (spin_until_us - now > (1000000/HZ)+1) {
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(1);
} else if (spin_until_us - now > 100) {
if (spin_until_us - now > jiffies_to_usecs(1)+1)
schedule_timeout_interruptible(1);
else if (spin_until_us - now > 100) {
do_softirq();
if (!pkt_dev->running)
return;
Expand Down Expand Up @@ -2449,8 +2447,7 @@ static void pktgen_run_all_threads(void)
}
thread_unlock();

current->state = TASK_INTERRUPTIBLE;
schedule_timeout(HZ/8); /* Propagate thread->control */
schedule_timeout_interruptible(msecs_to_jiffies(125)); /* Propagate thread->control */

pktgen_wait_all_threads_run();
}
Expand Down
6 changes: 2 additions & 4 deletions trunk/net/ipv4/ipconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -1103,10 +1103,8 @@ static int __init ic_dynamic(void)
#endif

jiff = jiffies + (d->next ? CONF_INTER_TIMEOUT : timeout);
while (time_before(jiffies, jiff) && !ic_got_reply) {
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(1);
}
while (time_before(jiffies, jiff) && !ic_got_reply)
schedule_timeout_uninterruptible(1);
#ifdef IPCONFIG_DHCP
/* DHCP isn't done until we get a DHCPACK. */
if ((ic_got_reply & IC_BOOTP)
Expand Down
9 changes: 3 additions & 6 deletions trunk/net/irda/ircomm/ircomm_tty.c
Original file line number Diff line number Diff line change
Expand Up @@ -567,10 +567,8 @@ static void ircomm_tty_close(struct tty_struct *tty, struct file *filp)
self->tty = NULL;

if (self->blocked_open) {
if (self->close_delay) {
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(self->close_delay);
}
if (self->close_delay)
schedule_timeout_interruptible(self->close_delay);
wake_up_interruptible(&self->open_wait);
}

Expand Down Expand Up @@ -863,8 +861,7 @@ static void ircomm_tty_wait_until_sent(struct tty_struct *tty, int timeout)
spin_lock_irqsave(&self->spinlock, flags);
while (self->tx_skb && self->tx_skb->len) {
spin_unlock_irqrestore(&self->spinlock, flags);
current->state = TASK_INTERRUPTIBLE;
schedule_timeout(poll_time);
schedule_timeout_interruptible(poll_time);
spin_lock_irqsave(&self->spinlock, flags);
if (signal_pending(current))
break;
Expand Down
3 changes: 1 addition & 2 deletions trunk/net/sunrpc/svcsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1170,8 +1170,7 @@ svc_recv(struct svc_serv *serv, struct svc_rqst *rqstp, long timeout)
while (rqstp->rq_arghi < pages) {
struct page *p = alloc_page(GFP_KERNEL);
if (!p) {
set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ/2);
schedule_timeout_uninterruptible(msecs_to_jiffies(500));
continue;
}
rqstp->rq_argpages[rqstp->rq_arghi++] = p;
Expand Down

0 comments on commit 2d95e9a

Please sign in to comment.