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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux