You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ian Holsman <Ia...@cnet.com> on 2001/04/08 18:50:48 UTC

Adding some new hooks

Hi.

I'd like to chat about adding some different type of hooks.
(sorry if they are there already.. but I didn't see them)

a global_init/global_fini hook, which called *once* on server activation
and termination (simillar to the process_init hook)

and a process_fini (so you can do cleanup of resources at the process
level).

the other thing which I would like to discuss is for a module to be able to
allocate memory on the scoreboard, without having to change the core files
to do it.

the reason for this:
we have a module which uses the Aho-Corasick method for substring matching.
this makes use of a large (20M) read-only state machine which 
could be shared by each thread/process on the machine.


Cheers
Ian

Re: Adding some new hooks

Posted by rb...@covalent.net.
On Mon, 9 Apr 2001, Harrie Hazewinkel wrote:

> rbb@covalent.net wrote:
> [snip]
> >
> > There are three global init hooks today, pre-config, post-config, and
> > open-logs.  We don't like termination hooks, because the same effect can
> > be acheived by using pool cleanups.
>
> In which of these hooks is the scoreboard created?
> In Apache 1.3 this was done after the open_logs.
> If so would it be an idea to move the scoreboard
> creation in the open_logs. It is somehow a logging
> mechanism (wide interpretation).

The scoreboard creation is it's own function, and there are no hooks
between creating the scoreboard and creating the child processes.  Once we
modify the shared memory logic and allow individual modules to add their
own data to the scoreboard, we will have a hook for creating the
scoreboard.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: Adding some new hooks

Posted by Harrie Hazewinkel <ha...@covalent.net>.
rbb@covalent.net wrote:
[snip]
> 
> There are three global init hooks today, pre-config, post-config, and
> open-logs.  We don't like termination hooks, because the same effect can
> be acheived by using pool cleanups.

In which of these hooks is the scoreboard created?
In Apache 1.3 this was done after the open_logs.
If so would it be an idea to move the scoreboard
creation in the open_logs. It is somehow a logging
mechanism (wide interpretation).

Harrie


Re: Adding some new hooks

Posted by rb...@covalent.net.
On Sun, 8 Apr 2001, Ian Holsman wrote:

> Hi.
>
> I'd like to chat about adding some different type of hooks.
> (sorry if they are there already.. but I didn't see them)
>
> a global_init/global_fini hook, which called *once* on server activation
> and termination (simillar to the process_init hook)

There are three global init hooks today, pre-config, post-config, and
open-logs.  We don't like termination hooks, because the same effect can
be acheived by using pool cleanups.

>
> and a process_fini (so you can do cleanup of resources at the process
> level).

Just register a cleanup with the pchild pool.

> the other thing which I would like to discuss is for a module to be able to
> allocate memory on the scoreboard, without having to change the core files
> to do it.

This is not possible until we re-write the shared memory logic.  This is
on my short list of things to implement in the next few weeks.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------