[Kamailio-Devel] [ openser-Bugs-2721849 ] Timer and Jiffies in OpenSER/Kamailio 1.3 - 1.5
SourceForge.net
noreply at sourceforge.net
Wed Apr 29 17:56:10 CEST 2009
Bugs item #2721849, was opened at 2009-03-30 09:20
Message generated for change (Comment added) made by carstenbock
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=2721849&group_id=139143
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: core
Group: ver 1.3.x
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Carsten Bock (carstenbock)
Assigned to: Nobody/Anonymous (nobody)
Summary: Timer and Jiffies in OpenSER/Kamailio 1.3 - 1.5
Initial Comment:
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
----------------------------------------------------------------------
>Comment By: Carsten Bock (carstenbock)
Date: 2009-04-29 15:56
Message:
Committed the patch to Release 1.3 - 1.5
----------------------------------------------------------------------
Comment By: Carsten Bock (carstenbock)
Date: 2009-03-30 13:51
Message:
I will commit a fix and close this issue.
----------------------------------------------------------------------
Comment By: Iñaki Baz Castillo (ibc_sf)
Date: 2009-03-30 13:06
Message:
Can this report be closed then?
----------------------------------------------------------------------
Comment By: Daniel-Constantin Mierla (miconda)
Date: 2009-03-30 09:35
Message:
Actually your patch is ok. No need for jiffies per timer, only the first
one has to do it. All ok.
----------------------------------------------------------------------
Comment By: Daniel-Constantin Mierla (miconda)
Date: 2009-03-30 09:30
Message:
As I can see, the behaviour is controlled by do_jiffies parameter. If the
backward compatibility is preserved, you can commit. Make default behaviour
the one that was so far. Thanks, Daniel
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=743020&aid=2721849&group_id=139143
More information about the Devel
mailing list