netdev
[Top] [All Lists]

Re: [PATCH 2.6]: Make packet scheduler clock source configurable

To: "David S. Miller" <davem@xxxxxxxxxx>
Subject: Re: [PATCH 2.6]: Make packet scheduler clock source configurable
From: Patrick McHardy <kaber@xxxxxxxxx>
Date: Sat, 24 Jul 2004 01:18:50 +0200
Cc: shemminger@xxxxxxxx, netdev@xxxxxxxxxxx, devik@xxxxxx
In-reply-to: <20040723135459.2ee5c42c.davem@xxxxxxxxxx>
References: <40F34740.5040100@xxxxxxxxx> <1107.63.170.215.71.1089689716.squirrel@xxxxxxxxxxxx> <20040712205037.573411c0.davem@xxxxxxxxxx> <40F4862D.3070802@xxxxxxxxx> <40F4AC8B.40706@xxxxxxxxx> <20040721143110.4ab944bf.davem@xxxxxxxxxx> <41004F76.1080807@xxxxxxxxx> <20040722171752.341d2476.davem@xxxxxxxxxx> <41006150.9000702@xxxxxxxxx> <41014788.4070301@xxxxxxxxx> <20040723135459.2ee5c42c.davem@xxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413 Debian/1.6-5
David S. Miller wrote:
We can't use this stuff on Alpha, it's cycle counter overflows after
just 10 minutes.  It works very strangely, something like only the
lower 32-bits are guarenteed to be continually incrementing.

The code (although racy) can handle 32-bit cycle counters. get_cycles()
on alpha returns a 32-bit value, so psched_tick calls PSCHED_GET_TIME
to adjust psched_time_base once a second. It is basically the same as
before. This is the second condition for this too work, besides
get_cycles() incrementing at >1MHz, it needs to return either a 32-bit
value and really use the full 32 bit or return something bigger, which
is assumed not to overflow. Alpha seems to satisfy both conditions.

I'm going to apply your patch and delete the Alpha parts.
Meanwhile, ping Richard Henderson (rth@xxxxxxxxxx) or one
of the other Alpha experts for me to get confirmation on
this stuff.

Even better.

Regards
Patrick

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