From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753517AbbF2UeP (ORCPT ); Mon, 29 Jun 2015 16:34:15 -0400 Received: from mga03.intel.com ([134.134.136.65]:23667 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753181AbbF2Ud7 (ORCPT ); Mon, 29 Jun 2015 16:33:59 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.15,372,1432623600"; d="scan'208";a="737142756" Message-ID: <1435610036.10883.11.camel@picadillo> Subject: Re: [PATCH v7 06/10] trace: Add lock-free tracing_map From: Tom Zanussi To: Steven Rostedt Cc: daniel.wagner@bmw-carit.de, masami.hiramatsu.pt@hitachi.com, namhyung@kernel.org, josh@joshtriplett.org, andi@firstfloor.org, linux-kernel@vger.kernel.org Date: Mon, 29 Jun 2015 15:33:56 -0500 In-Reply-To: <20150612165203.51ad8d2b@gandalf.local.home> References: <20150612165203.51ad8d2b@gandalf.local.home> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4 (3.10.4-4.fc20) Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 2015-06-12 at 16:52 -0400, Steven Rostedt wrote: > On Mon, 8 Jun 2015 16:32:05 -0500 > Tom Zanussi wrote: > > > +/** > > + * tracing_map_init - Allocate and clear a map's tracing_map_elts > > + * @map: The tracing_map to initialize > > + * > > + * Creates and sets up a map to contain a max_size number of entries > > + * equal to a size of 2 ** map_bits. Before using, the map fields > > + * should be added to the map with tracing_map_add_key_field() and > > + * tracing_map_add_key_field(). tracing_map_init() should then be > > Hmm, it's suppose to be added with tracing_map_add_key_field() twice? > Also fixed in the new version, coming shortly, thanks for the input. Tom > -- Steve > > > + * called to allocate the array of tracing_map_elts, in order to avoid > > + * allocating anything in the map insertion path. The user-specified > > + * map_size reflect the max number of entries requested by the user - > > + * internally we double that in order to keep the table sparse and > > + * keep collisions manageable. > > + * > > + * See tracing_map.h for a description of tracing_map_ops. > > + * > > + * Return: the tracing_map * if successful, ERR_PTR if not. > > + */