| To: | Krishna Kumar <kumarkr@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] net/ipv4/*, net/core/neighbour.c jiffies cleanup |
| From: | Linus Torvalds <torvalds@xxxxxxxxxxxxx> |
| Date: | Wed, 7 Nov 2001 21:26:11 -0800 (PST) |
| Cc: | Andreas Dilger <adilger@xxxxxxxxxxxxx>, <ak@xxxxxx>, <andrewm@xxxxxxxxxx>, "David S. Miller" <davem@xxxxxxxxxx>, <jgarzik@xxxxxxxxxxxxxxxx>, <kuznet@xxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>, <netdev@xxxxxxxxxxx>, <owner-netdev@xxxxxxxxxxx>, <tim@xxxxxxxxxxxxxxxxxxxxxx> |
| In-reply-to: | <OF80A3FFE5.FC1D4628-ON88256AFE.0010957E@xxxxxxxxxxxxxxx> |
| Sender: | owner-netdev@xxxxxxxxxxx |
On Wed, 7 Nov 2001, Krishna Kumar wrote:
> >
> > In short: It is wrong to do
> >
> > if (jiffies <= start+HZ)
> >
> > and it is _right_ to do
> >
> > if (jiffies - start <= HZ)
>
> Actually this last part is wrong, isn't it ? jiffies <= start + HZ is also
> a correct way to do it, since start+HZ will overflow to the current value
> of jiffies when HZ time elapses. So the above two statements are IDENTICAL.
No.
Try it out with a few examples. You'll see.
Linus
|
| Previous by Date: | Re: [PATCH] net/ipv4/*, net/core/neighbour.c jiffies cleanup, David S. Miller |
|---|---|
| Next by Date: | Re: [PATCH] net/ipv4/*, net/core/neighbour.c jiffies cleanup, Krishna Kumar |
| Previous by Thread: | Re: [PATCH] net/ipv4/*, net/core/neighbour.c jiffies cleanup, Krishna Kumar |
| Next by Thread: | Re: [PATCH] net/ipv4/*, net/core/neighbour.c jiffies cleanup, Krishna Kumar |
| Indexes: | [Date] [Thread] [Top] [All Lists] |