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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to