]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[NET_SCHED]: Export real timer resolution in /proc/net/psched
authorPatrick McHardy <kaber@trash.net>
Fri, 16 Mar 2007 08:23:28 +0000 (01:23 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:26:15 +0000 (22:26 -0700)
The timer resolution exported in /proc/net/psched is used by userspace to
calculate HTB's burst values. Currently it is set to HZ, since we're now
using hrtimers, use KTIME_MONOTONIC_RES, which makes HTB use smaller burst
values.

This patch also affects libnl, which incorrectly uses this value for
the SFQ perturbation parameter, which is always in seconds, and some
routing cache values, which are in USER_HZ, so both cases are broken
anyway.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_api.c

index 6bc395cb235be482b2c345d04ae8ab4d43b73830..047ae62ff4fad201d377866778fd9d9ba5ee647b 100644 (file)
@@ -1216,7 +1216,7 @@ static int psched_show(struct seq_file *seq, void *v)
 {
        seq_printf(seq, "%08x %08x %08x %08x\n",
                   (u32)NSEC_PER_USEC, (u32)PSCHED_US2NS(1),
-                  1000000, HZ);
+                  1000000, (u32)NSEC_PER_SEC/ktime_to_ns(KTIME_MONOTONIC_RES));
 
        return 0;
 }