userlevel should not need to know about HZ?

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kernel people tell me users should never need to know the value of HZ
used by the currently running kernel. One kernel hacker even told me
that Linus once changed the value from 100 to 1000 just to see user
space programs break.

However, it is needed for the buffer parameter in TBF. The tc-tbf(8)
manpage:

	If your buffer is too small, packets may be dropped because more
	tokens arrive per timer tick than fit in your bucket.  The mini-
	mum buffer size can be calculated by dividing the rate by HZ.

My kernel (2.6.12), for example, doesn't have a CONFIG option in
/proc/config.gz. I only found out the correct HZ value by looking into
/usr/include/asm/param.h, and even there are two values: 1000 for
__KERNEL__ and 250 for the rest. Newer kernels have CONFIG options and
1000 is just one of the possible values.

So, how do we reliably calculate the minimum value for buffer/burst/maxburts?

_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux