Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S261869AbVCYWsv (ORCPT ); Fri, 25 Mar 2005 17:48:51 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S261845AbVCYWsc (ORCPT ); Fri, 25 Mar 2005 17:48:32 -0500 Received: from twinlark.arctic.org ([207.7.145.18]:44161 "EHLO twinlark.arctic.org") by vger.kernel.org with ESMTP id S261872AbVCYWpX (ORCPT ); Fri, 25 Mar 2005 17:45:23 -0500 Date: Fri, 25 Mar 2005 14:45:19 -0800 (PST) From: dean gaudet To: Guillaume Thouvenin cc: Andrew Morton , Greg KH , lkml , Evgeniy Polyakov , Jay Lan , Erich Focht , Ram , Gerrit Huizenga , elsa-devel Subject: Re: [patch 1/2] fork_connector: add a fork connector In-Reply-To: <1111745010.684.49.camel@frecb000711.frec.bull.fr> Message-ID: References: <1111745010.684.49.camel@frecb000711.frec.bull.fr> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1118 Lines: 28 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/