[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] Hacks for getting around CONFIG_HZ



On Thu, 2009-10-08 at 10:26 +0200, Marco P. wrote:
> Hello everyone,
> i recently stumbled upon the CONFIG_HZ linux kernel parameter.
> It is set to 250 on the system I'm using, meaning that if I create a  
> timed event that tries to fire as fast as possible, it will be  
> triggered at most 250 times for each second, or every 4 milliseconds.
> 
> I know this is unlikely, but do you know any hack to get around this?
> i.e. increase the frequency without modifying the kernel configuration  
> and rebooting, I can't do that!)

Weirdly enough, I don't think you are completely correct.  I think that
you are correct if you are using time based events.  But I think if you
are doing IO driven events that you can end up with an event that is
fired many more times per second than there are ticks because of how the
kernel handles sleeping processes that have wakeup conditions.

Why, exactly, do you need an event that will fire more than 250 times a
second?  What are you using it for?  Will polling work instead?

-- 
A word is nothing more or less than the series of historical
connotations given to it. That's HOW we derive meaning, and to claim
that there is an arbitrary meaning of words above and beyond the way
people use them is a blatant misunderstanding of the nature of language.
-- Anonymous blogger
-- Eric Hopper (hopper@xxxxxxxxxxxxxxx http://www.omnifarious.org/~hopper)--

Attachment: signature.asc
Description: This is a digitally signed message part