Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=3c0cfc135829b98f7a4894938652f9ef78e24237 Commit: 3c0cfc135829b98f7a4894938652f9ef78e24237 Parent: 32d1316b91424423d7b44944f18cdaca268f3db2 Author: Patrick McHardy <[EMAIL PROTECTED]> AuthorDate: Wed Oct 10 16:32:41 2007 -0700 Committer: David S. Miller <[EMAIL PROTECTED]> CommitDate: Wed Oct 10 16:55:59 2007 -0700
[NET_SCHED]: Show timer resolution instead of clock resolution in /proc/net/psched 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 <[EMAIL PROTECTED]> Signed-off-by: David S. Miller <[EMAIL PROTECTED]> --- net/sched/sch_api.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 39d3278..8ae137e 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -1226,10 +1226,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; } - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html