lkml.org 
[lkml]   [2005]   [Mar]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch 1/2] fork_connector: add a fork connector
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 majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-04-06 13:30    [W:0.087 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site