Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754838AbbGCKAV (ORCPT ); Fri, 3 Jul 2015 06:00:21 -0400 Received: from mail-ob0-f173.google.com ([209.85.214.173]:35593 "EHLO mail-ob0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754677AbbGCKAL (ORCPT ); Fri, 3 Jul 2015 06:00:11 -0400 Subject: Re: [PATCH] tools/perf, rbtree: Add RCU wrappers to make rbtree.h usable in user-space To: Peter Zijlstra , Rusty Russell References: <20150702005253.GA26440@mtj.duckdns.org> <20150702005337.GB26440@mtj.duckdns.org> <5594A9B6.2050100@jons.org> <5594AD98.4050402@jons.org> <20150702132103.GB30677@mtj.duckdns.org> <87k2uiqo5b.fsf@rustcorp.com.au> <20150703071446.GE19282@twins.programming.kicks-ass.net> Cc: Tejun Heo , Jens Axboe , linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo From: Jon Christopherson Message-ID: <55965D29.5030602@jons.org> Date: Fri, 3 Jul 2015 05:00:09 -0500 User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0 MIME-Version: 1.0 In-Reply-To: <20150703071446.GE19282@twins.programming.kicks-ass.net> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1386 Lines: 42 On 07/03/2015 02:14 AM, Peter Zijlstra wrote: > On Fri, Jul 03, 2015 at 06:21:12AM +0930, Rusty Russell wrote: >> Looks like Peter Zijlstra is the one to take this fix... > > acme is the steward of tools/perf/ This is the full context of the patch mentioned: https://lkml.org/lkml/2015/6/17/129 > >>>> diff --git a/tools/perf/util/include/linux/rcupdate.h >>>> b/tools/perf/util/include/linux/rcupdate.h >>>> new file mode 100644 >>>> index 0000000..51c0f45 >>>> --- /dev/null >>>> +++ b/tools/perf/util/include/linux/rcupdate.h >>>> @@ -0,0 +1,9 @@ >>>> +#ifndef PERF_LINUX_RCUPDATE_H_ >>>> +#define PERF_LINUX_RCUPDATE_H_ >>>> + >>>> +/* Simple trivial wrappers for now, we don't use RCU in perf user-space >>>> (yet): */ >>>> +#define WRITE_ONCE(var, val) ((var) = (val)) > > It looks like perf includes linux/compiler.h so it should already have this. > >>>> +#define rcu_assign_pointer(ptr, val) WRITE_ONCE(ptr, val) > > That's plain wrong, WRITE_ONCE(*(ptr), (val)) > The original author of the patch appears to be Ingo. Syntax aside .. it solves the issue mentioned. Perhaps a corrected version could be included instead. -Jon -- 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/