lkml.org 
[lkml]   [1998]   [Oct]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: arca-1-against-pre-2.1.127-3
On Sat, 31 Oct 1998, Mike Galbraith wrote:

>I had to do the following to my system. The isdn stuff is the CVS

Many thanks for the patch. I have not understood your problems with the
aic. Could you try to set JIFFIES_OFFSET to 0 (in include/linux/sched.h)
and see if the aic has still problems? The most common problem is that
drivers are used to set timer->expires to 0 when they want to execute the
timer ASAP. It' s trivial to set timer->expires to jiffies in such cases.
(the same is true for some timers that are set to ULONG_MAX while instead
should be set to jiffies + LONG_MAX).

>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,

No the nfsd patch seems fine after a short read.

>I missed at least one type warning (raw.c).

Good. It' s right too.

>--- 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)

I have not thought at what does your time_delta() because this part should
be just fine.

I merged all your good stuff (thanks ;-). Could you try to apply this my
incremental patch against arca-1 and see if _everything_ you use works
fine with JIFFIES_OFFSET set to 0 by hand?

Index: linux/drivers/block/md.c
diff -u linux/drivers/block/md.c:1.1.1.2 linux/drivers/block/md.c:1.1.1.2.4.1
--- linux/drivers/block/md.c:1.1.1.2 Fri Oct 9 17:40:58 1998
+++ linux/drivers/block/md.c Sat Oct 31 18:17:29 1998
@@ -1139,8 +1139,7 @@
while (blocksize*j/(jiffies-starttime+1)*HZ/1024 > SPEED_LIMIT)
{
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies+1;
- schedule();
+ schedule_timeout(1);
}

/*
Index: linux/drivers/isdn/isdn_tty.c
diff -u linux/drivers/isdn/isdn_tty.c:1.1.1.1 linux/drivers/isdn/isdn_tty.c:1.1.1.1.14.1
--- linux/drivers/isdn/isdn_tty.c:1.1.1.1 Fri Oct 2 19:23:28 1998
+++ linux/drivers/isdn/isdn_tty.c Sat Oct 31 18:17:31 1998
@@ -1820,9 +1820,8 @@
timeout = jiffies + HZ;
while (!(info->lsr & UART_LSR_TEMT)) {
current->state = TASK_INTERRUPTIBLE;
- current->timeout = jiffies + 20;
- schedule();
- if (jiffies > timeout)
+ schedule_timeout(20);
+ if (time_after(jiffies, timeout))
break;
}
}
@@ -1837,8 +1836,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 |
Index: linux/drivers/isdn/hisax/isdnl1.c
diff -u linux/drivers/isdn/hisax/isdnl1.c:1.1.1.1 linux/drivers/isdn/hisax/isdnl1.c:1.1.1.1.14.1
--- linux/drivers/isdn/hisax/isdnl1.c:1.1.1.1 Fri Oct 2 19:23:29 1998
+++ linux/drivers/isdn/hisax/isdnl1.c Sat Oct 31 18:17:31 1998
@@ -639,8 +639,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));
Index: linux/drivers/isdn/isdnloop/isdnloop.c
diff -u linux/drivers/isdn/isdnloop/isdnloop.c:1.1.1.1 linux/drivers/isdn/isdnloop/isdnloop.c:1.1.1.1.14.1
--- linux/drivers/isdn/isdnloop/isdnloop.c:1.1.1.1 Fri Oct 2 19:23:30 1998
+++ linux/drivers/isdn/isdnloop/isdnloop.c Sat Oct 31 18:17:32 1998
@@ -1179,11 +1179,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
Index: linux/fs/nfsd/nfssvc.c
diff -u linux/fs/nfsd/nfssvc.c:1.1.1.1 linux/fs/nfsd/nfssvc.c:1.1.1.1.14.1
--- linux/fs/nfsd/nfssvc.c:1.1.1.1 Fri Oct 2 19:22:37 1998
+++ linux/fs/nfsd/nfssvc.c Sat Oct 31 18:17:34 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;
Index: linux/net/ipv4/udp.c
diff -u linux/net/ipv4/udp.c:1.1.1.2 linux/net/ipv4/udp.c:1.1.1.2.4.1
--- linux/net/ipv4/udp.c:1.1.1.2 Fri Oct 9 17:44:25 1998
+++ linux/net/ipv4/udp.c Sat Oct 31 18:17:35 1998
@@ -1015,13 +1015,13 @@
}


-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;
udp_v4_unhash(sk);
- sk->dead = 1;
destroy_sock(sk);
+ sk->dead = 1;
}

static int udp_queue_rcv_skb(struct sock * sk, struct sk_buff *skb)



I also moved the dead = 1 down as in 2.0 btw. I don' t know if it' s
right...


-
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/

\
 
 \ /
  Last update: 2005-03-22 13:45    [W:0.136 / U:1.176 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site