summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-10-23 20:55:01 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2007-11-16 08:27:36 -0800
commite20e6446bdf5afd61b1139efca510a187b3d1c38 (patch)
treeafcb03c2f048e1f001c7d4a493aa77cb10bd0740 /net
parentd876cd16fb5c5c98f1fd0c2cb8d5d1122de51ae8 (diff)
Fix advertised packet scheduler timer resolution
patch 3c0cfc135829b98f7a4894938652f9ef78e24237 in mainline The fourth parameter of /proc/net/psched is supposed to show the timer resultion and is used by HTB userspace to calculate the necessary burst rate. Currently we show the clock resolution, which results in a too low burst rate when the two differ. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'net')
-rw-r--r--net/sched/sch_api.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index dee0d5fb39c5..8f1bcf62b51a 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -1225,10 +1225,13 @@ EXPORT_SYMBOL(tcf_destroy_chain);
#ifdef CONFIG_PROC_FS
static int psched_show(struct seq_file *seq, void *v)
{
+ struct timespec ts;
+
+ hrtimer_get_res(CLOCK_MONOTONIC, &ts);
seq_printf(seq, "%08x %08x %08x %08x\n",
(u32)NSEC_PER_USEC, (u32)PSCHED_US2NS(1),
1000000,
- (u32)NSEC_PER_SEC/(u32)ktime_to_ns(KTIME_MONOTONIC_RES));
+ (u32)NSEC_PER_SEC/(u32)ktime_to_ns(timespec_to_ktime(ts)));
return 0;
}