Messages in this thread Patch in this message | | | Date | Sat, 31 Oct 1998 15:10:55 +0100 (CET) | From | Mike Galbraith <> | Subject | Re: arca-1-against-pre-2.1.127-3 |
| |
On Sat, 31 Oct 1998, Andrea Arcangeli wrote:
> I' ve done a diff from my tree (with my new code) against pre-2.1.127-3. > > This my diff includes: > > o My fully jiffy wrap compliant schedule_timeout() and > interruptible_sleep_on_timeout(). My drivers are all uptodate > with these new functions, other drivers can not compile. I had > not the time to update other hardare too. Notify me if something > doesn't compile and I' ll sent you an incremental patch ASAP.
Hi Andrea,
I had to do the following to my system. The isdn stuff is the CVS tree, not stock. The aic7xxx driver has a problem with this patch. It will not boot because it keeps track of the last reset time, and you didn't modify it to handle the offset. I was going to try to fix it, but when I thought about it, if the machine were to run long enough to wrap jiffies, the old reset time being relative to the pre-wrap jiffies will kill the logic anyway. I guess that the right fix for these kind of things is to use gettimeofday for last_reset? (I just killed the offset to be able to boot quickly)
Some (all?) of this may be wrong, but will serve to show where I had troubles. The nfs change has a high probability of being down right stupid :^/ Anyway, it's running and everything seems to work. Also, I missed at least one type warning (raw.c).
-Mike
--- include/linux/timer.h.org Sat Oct 31 09:08:31 1998 +++ include/linux/timer.h Sat Oct 31 09:38:17 1998 @@ -99,4 +99,8 @@ return((long)((a) - (b)) >= 0L); } +extern inline unsigned long time_delta(unsigned long now, unsigned long then) +{ + return now < then ? ~then + now + 1 : now - then; +} #endif --- drivers/block/md.c.org Sat Oct 31 08:17:21 1998 +++ drivers/block/md.c Sat Oct 31 09:40:19 1998 @@ -1136,11 +1136,10 @@ /* * Let's sleep some if we are faster than our speed limit: */ - while (blocksize*j/(jiffies-starttime+1)*HZ/1024 > SPEED_LIMIT) + while (blocksize*j/(time_delta(jiffies,starttime)+1)*HZ/1024 > SPEED_LIMIT) { current->state = TASK_INTERRUPTIBLE; - current->timeout = jiffies+1; - schedule(); + schedule_timeout(1); } /* --- drivers/isdn/hisax/isdnl1.c.org Sat Oct 31 09:50:37 1998 +++ drivers/isdn/hisax/isdnl1.c Sat Oct 31 09:52:10 1998 @@ -716,8 +716,7 @@ sti(); current->state = TASK_INTERRUPTIBLE; /* Timeout 10ms */ - current->timeout = jiffies + (10 * HZ) / 1000; - schedule(); + schedule_timeout((10 * HZ) / 1000); restore_flags(flags); printk(KERN_INFO "%s: IRQ %d count %d\n", CardType[cs->typ], cs->irq, kstat_irqs(cs->irq)); --- drivers/isdn/isdn_tty.c.org Sat Oct 31 09:55:34 1998 +++ drivers/isdn/isdn_tty.c Sat Oct 31 10:16:56 1998 @@ -2084,12 +2084,11 @@ * has completely drained; this is especially * important if there is a transmit FIFO! */ - timeout = jiffies + HZ; + timeout = jiffies; while (!(info->lsr & UART_LSR_TEMT)) { current->state = TASK_INTERRUPTIBLE; - current->timeout = jiffies + 20; - schedule(); - if (jiffies > timeout) + schedule_timeout(20); + if (time_delta(jiffies,timeout) > HZ) break; } } @@ -2104,8 +2103,7 @@ tty->closing = 0; if (info->blocked_open) { current->state = TASK_INTERRUPTIBLE; - current->timeout = jiffies + 50; - schedule(); + schedule_timeout(50); wake_up_interruptible(&info->open_wait); } info->flags &= ~(ISDN_ASYNC_NORMAL_ACTIVE | ISDN_ASYNC_CALLOUT_ACTIVE | --- ./drivers/isdn/isdnloop/isdnloop.c.org Sat Oct 31 10:19:04 1998 +++ ./drivers/isdn/isdnloop/isdnloop.c Sat Oct 31 10:20:14 1998 @@ -1187,11 +1187,9 @@ if (!card->leased) { card->leased = 1; while (card->ptype == ISDN_PTYPE_UNKNOWN) { - current->timeout = jiffies + 10; - schedule(); + schedule_timeout(10); } - current->timeout = jiffies + 10; - schedule(); + schedule_timeout(10); sprintf(cbuf, "00;FV2ON\n01;EAZ1\n02;EAZ2\n"); i = isdnloop_writecmd(cbuf, strlen(cbuf), 0, card); printk(KERN_INFO --- fs/nfsd/nfssvc.c.org Sat Oct 31 11:57:04 1998 +++ fs/nfsd/nfssvc.c Sat Oct 31 12:02:08 1998 @@ -115,7 +115,7 @@ * Find a socket with data available and call its * recvfrom routine. */ - while ((err = svc_recv(serv, rqstp)) == -EAGAIN) + while ((err = svc_recv(serv, rqstp, MAX_SCHEDULE_TIMEOUT)) == -EAGAIN) ; if (err < 0) break; --- net/ipv4/udp.c.org Sat Oct 31 12:16:17 1998 +++ net/ipv4/udp.c Sat Oct 31 12:16:35 1998 @@ -1015,7 +1015,7 @@ } -static void udp_close(struct sock *sk, unsigned long timeout) +static void udp_close(struct sock *sk, long timeout) { /* See for explanation: raw_close in ipv4/raw.c */ sk->state = TCP_CLOSE;
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/
| |