Subject: Re: sparc64 and PF/ALTQ
To: None <port-sparc64@netbsd.org>
From: Miles Nordin <carton@Ivy.NET>
List: port-sparc64
Date: 05/28/2005 21:22:51
--pgp-sign-Multipart_Sat_May_28_21:22:51_2005-1
Content-Type: text/plain; charset=US-ASCII

>>>>> "mh" == Martin Husemann <martin@duskware.de> writes:

    mh> Ah, that's %tick in sparc64 terms - how is that related to
    mh> ALTQ?

ALTQ has to keep track of time in at least two places.  

One, there's a token bucket between ALTQ and the traditional interface
driver's hardware output queue.  ALTQ leaks packets from its own hairy
queueing structures out to the interface at just below wire speed, so
the interface's hardware FIFO stays mostly empty.

Two, queueing disciplines like HFSC have 'realtime' queues that must
get a committed bitrate.  Once this is satisfied, HFSC gives out the
remaining bandwidth with a link-sharing ratio that maybe doesn't need
to know about time in quite such a strict way.

ALTQ hooks the timer interrupt so that, if packets have accumulated in
either of these two places, they can be slowly emptied onto the
interface even when no new traffic is coming in.  This is why I bought
alpha for ALTQ, because of the 1024Hz timer interrupt.  Also, on some
architectures ALTQ measures the CPU clock rate and looks at the cycle
counter to know with high granularity how much time has passed, so it
can make finely quantitized decisions about whether to dequeue some
packet when invoked from an interface output path.

These are the two places I can think of that ALTQ interacts with MD
stuff.  Any idea from that why it might be disappearing packets?

I tried with 'options ALTQ_NOPCC', and it didn't help.  but...looking
at sys/altq/altq_subr.c I see that's silly because the option does
nothing on sparc64---it is for i386 and alpha only.  On sparc64 it
uses microtime().  not sure this has anything to do with the problem
whatsoever though.

--pgp-sign-Multipart_Sat_May_28_21:22:51_2005-1
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.6 (NetBSD)

iQCVAwUAQpkZa4nCBbTaW/4dAQJ5kwQAjAfj49YX9EPyUCHfnIOGzxbBrhuS0lat
p3Q30H/RnwzmkgFh2N2dSsrGrPxMNTW4UgPoDLLQ6FlrgXTpqPN4WOS22FIieAuD
vqPuvVusiTx3ly2m/gUkUXxGombJOG5Ab1U36ENYZMaDKaZ5gnlBDzidQxbxE654
w/D/Jm4eggM=
=jUu8
-----END PGP SIGNATURE-----

--pgp-sign-Multipart_Sat_May_28_21:22:51_2005-1--