Re: [patch 1/2] fork_connector: add a fork connector

dean gaudet
2005-03-25T22:48:51Z

On Fri, 25 Mar 2005, Guillaume Thouvenin wrote:

...
> The lmbench shows that the overhead (the construction and the sending
> of the message) in the fork() routine is around 7%.
...
> + /*
> + * size of data is the number of characters
> + * printed plus one for the trailing '\0'
> + */
> + memset(msg->data, '\0', CN_FORK_INFO_SIZE);
> + msg->len = scnprintf(msg->data, CN_FORK_INFO_SIZE-1,
> + "%i %i %i",
> + smp_processor_id(), parent, child) + 1;

i'm certain that if you used a struct {} and filled in 3 fields rather
than zeroing 64 bytes of memory, and doing 3 conversions to decimal ascii
then you'd see a marked decrease in the overhead of this. it's not clear
to me why you need ascii here -- the rest of the existing bsd accounting
code is not ascii (i'm assuming the purpose of the fork connector is for
accounting).

-dean