From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Max Kellermann <max@duempel.org>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: conntrackd won't start, "can't open multicast server!"
Date: Thu, 10 Jan 2008 00:06:51 +0100 [thread overview]
Message-ID: <4785538B.9020609@netfilter.org> (raw)
In-Reply-To: <20080107115510.GA22230@swift.blarg.de>
Max Kellermann wrote:
> Waking up daemons without a reason is sloppy design most of the time.
> A quick look at the conntrackd code made me believe that conntrackd
> just doesn't check when the next scheduled event is due, and instead
> performs a check on all alarm objects in the current step 5 times a
> second. That is easily fixable, and not only saves CPU cycles and
> power, but also leads to better overall design.
Indeed. This makes a lot sense to me. I have committed a patch to SVN to
wake up the daemon only if there is any alarm event to process instead
of polling. I'll do some testing of it tomorrow.
> The whole alarm.c looks like duplicated effort, you could have used
> libevent instead.
Well, I think that libevent is too much since conntrackd handles not
that many descriptors and the alarm implementation is enough for what
conntrackd needs IMO.
> By the way, I saw an add_alarm() in cache_timer.c, but its callback
> function "timeout()" neither sets a new "expires" value, nor does it
> delete the alarm object. That may lead to integer underflow in the
> next do_alarm_run() invocation.
I have also changed this since I needed it for the lastest commit.
However, AFAICS such underflow doesn't ever happen in 0.9.5.
>> I'll investigate this. Are you using 0.9.5 or a SVN snapshot? Are
>> you using the `alarm' mode (formely known as `persistent')?
>
> I am using the most recent release, i.e. 0.9.5. I have no idea about
> "alarm" or "persistent" mode, and I did not find any documentation on
> this. I am using the "stats" example configuration from the tarball.
Please, could you check out a working copy from SVN and tell me if the
problem that you're reporting persists?
--
"Los honestos son inadaptados sociales" -- Les Luthiers
next prev parent reply other threads:[~2008-01-09 23:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-04 8:10 conntrackd won't start, "can't open multicast server!" Max Kellermann
2008-01-05 14:31 ` Pablo Neira Ayuso
2008-01-05 17:29 ` Max Kellermann
2008-01-07 11:09 ` Pablo Neira Ayuso
2008-01-07 11:55 ` Max Kellermann
2008-01-09 23:06 ` Pablo Neira Ayuso [this message]
2008-01-14 9:40 ` Max Kellermann
2008-01-14 15:41 ` Pablo Neira Ayuso
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4785538B.9020609@netfilter.org \
--to=pablo@netfilter.org \
--cc=max@duempel.org \
--cc=netfilter-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.