netdev
[Top] [All Lists]

Re: PSCHED_TDIFF_SAFE bug introduced in 2.4.19-pre5

To: devik@xxxxxx (Martin Devera)
Subject: Re: PSCHED_TDIFF_SAFE bug introduced in 2.4.19-pre5
From: Alexey Kuznetsov <kuznet@xxxxxxxxxxxxx>
Date: Sun, 12 May 2002 20:35:47 +0400 (MSD)
Cc: kuznet@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <Pine.LNX.4.44.0205051726480.12674-100000@luxik.cdi.cz> from "Martin Devera" at May 5, 2 05:41:19 pm
Sender: owner-netdev@xxxxxxxxxxx
Hello!

> I think you are responsible for the change.

Yes.


> even if tv1<tv2 which can be true when time wraps (which is true
> at least with PSCHED_TIME_SOURCE == JIFFIES)

No, psched_time_t cannot wrap for our life.


> one HTB user switched to 2.4.19-pre7.

I think this discipline simply calls the function with tv1 < tv2.
In this case the function is supposed to return a negative number
and used to do this. Actually, invalid behaviour with unsigned bound
was one of bugs fixed.


> Here the return value will be always positive and < bound.

It must not be positive when tv1 < tv2, psched_diff_t is signed.
Well, taking into account that it is not used in current kernel
with tv1 < tv2, it can be changed to return 0, but surely not to "bound".

I did not see HTB qdisc, but plain logic tells me that otherwise
you will see a delay ~bound, when an immediate send is expected instead.

Alexey

<Prev in Thread] Current Thread [Next in Thread>