[Kamailio-Devel] Question about Timer and Jiffies in OpenSER/Kamailio 1.3 - 1.5
Carsten Bock
lists at bock.info
Thu Mar 26 17:39:23 CET 2009
Hi everybody,
i have a question regarding the timer and the "jiffies"-value in
OpenSER/Kamailio (i've checked from 1.3 and up).
Due to heavy usage (DB-Operations and so on), i have registered a
dedicated timer-process in my module, so it should not affect other
timer-operations (e.g. TM). According to timer.c from core, each new
Timer-Process creates it's own jiffies, by replacing the otherwise
shared jiffy value with a local definition of it:
if (!do_jiffies) {
jiffies = &local_jiffies;
ujiffies = &local_ujiffies;
}
Is there a particular reason to have it's own jiffy-value for each new
timer-process? What happens in our case, is that the "jiffy" value in
each process will sooner or later differ from the "jiffy" value in other
timer-processes. Since our timer-process uses the TM-API, to send
requests, this is crucial: The timeout, when sending requests is
calculated based on "get_jiffies()" + timeout. As a result, the timeout
of the sent request is incorrect (since the jiffies-value in our process
is lower than the value used by TM-Timer; the request almost immediately
timeouts).
Is there a particular reason, why each new timer-process should create
it's own jiffies rather than using the shared one?
I have a fix for 1.3 ready; my patched version uses the same jiffy in
all timer-processes. I would commit to SVN if no-one objects...
Thanks in advance and greetings from rainy Hamburg,
Carsten
More information about the Devel
mailing list