You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Harrie Hazewinkel <ha...@covalent.net> on 2001/05/21 18:33:26 UTC

[PATCH] Scoreboard change requested.

Hi,

I would like to see the applied patch applied to the scoreboard.
It does not involve any functionality change, but just
order change of the components in the scoreboard.

Unless there is a real reason for this order

> typedef struct {
>     worker_score servers[HARD_SERVER_LIMIT][HARD_THREAD_LIMIT];
>     process_score parent[HARD_SERVER_LIMIT];
>     global_score global;
> } scoreboard;

I would like the following order.
 
> typedef struct {
>     global_score global;
>     process_score parent[HARD_SERVER_LIMIT];
>     worker_score servers[HARD_SERVER_LIMIT][HARD_THREAD_LIMIT];
> } scoreboard;

My reasoning is:

The global_score is a fixed size and thus the offset
to the first parent variable is then fixed.
Secondly, the offsett to the 'servers' is then depending
only on 1 variable the HARD_SERVER_LIMIT. Where also the
records of the workers are reference via a pointer/linked
list from the parents.

This would ease calculating of the offsets in an external
module (in my case SNMP) and do not have to know the
compiled value of HARD_SERVER_LIMT. I can get those
values from the mpm_show function.

Patch attached, thanks if you apply it.


Harrie 
-- 
address: Covalent Technologies, 645 Howard St, San Francisco, CA - 94105
phone: +1-415-536-5221                               fax:+1-415-536-5210
personal website: http://www.lisanza.net/

Re: [PATCH] Scoreboard change requested.

Posted by dean gaudet <dg...@arctic.org>.
On Mon, 21 May 2001, Harrie Hazewinkel wrote:

> This would ease calculating of the offsets in an external
> module (in my case SNMP) and do not have to know the
> compiled value of HARD_SERVER_LIMT. I can get those
> values from the mpm_show function.

this is one of the many reasons the /proc interface to gathering info for
/bin/ps is much better than the /dev/kmem interface.  (with a /proc-like
interface you can hide implementation details.)

-dean