Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755450AbbGPRuN (ORCPT ); Thu, 16 Jul 2015 13:50:13 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:58754 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751628AbbGPRuL (ORCPT ); Thu, 16 Jul 2015 13:50:11 -0400 Date: Thu, 16 Jul 2015 19:49:46 +0200 From: Peter Zijlstra To: Tom Zanussi Cc: rostedt@goodmis.org, daniel.wagner@bmw-carit.de, masami.hiramatsu.pt@hitachi.com, namhyung@kernel.org, josh@joshtriplett.org, andi@firstfloor.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v9 07/22] tracing: Add lock-free tracing_map Message-ID: <20150716174946.GH12596@twins.programming.kicks-ass.net> References: <777bd36975a1dd904fd6b72c4048474dd2327a65.1437066836.git.tom.zanussi@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <777bd36975a1dd904fd6b72c4048474dd2327a65.1437066836.git.tom.zanussi@linux.intel.com> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 833 Lines: 21 On Thu, Jul 16, 2015 at 12:22:40PM -0500, Tom Zanussi wrote: > + for (i = 0; i < elt->map->n_fields; i++) { > + atomic64_set(&dup_elt->fields[i].sum, > + atomic64_read(&elt->fields[i].sum)); > + dup_elt->fields[i].cmp_fn = elt->fields[i].cmp_fn; > + } > + > + return dup_elt; > +} So there is a lot of atomic64_{set,read}() in this patch set, what kind of magic properties do you assume they have? Note that atomic*_{set,read}() are weaker than {WRITE,READ}_ONCE(), so if you're assuming they do that, you're mistaken -- although it is on a TODO list someplace to go fix that. -- 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/