Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1176460

Re: [PATCH] tools/perf, rbtree: Add RCU wrappers to make rbtree.h usable in user-space

Path csiph.com!aioe.org!bofh.it!news.nic.it!robomod
From Jon Christopherson <jon@jons.org>
Newsgroups linux.kernel
Subject Re: [PATCH] tools/perf, rbtree: Add RCU wrappers to make rbtree.h usable in user-space
Date Fri, 03 Jul 2015 12:10:01 +0200
Message-ID <pI64V-7ct-9@gated-at.bofh.it> (permalink)
References <pHB18-41K-3@gated-at.bofh.it> <pHB18-41K-1@gated-at.bofh.it> <pHD2V-5G5-11@gated-at.bofh.it> <pHMIX-3df-33@gated-at.bofh.it> <pHMIX-3df-31@gated-at.bofh.it> <pHXbj-1sI-7@gated-at.bofh.it> <pI3qp-5w3-7@gated-at.bofh.it>
X-Original-To Peter Zijlstra <peterz@infradead.org>, Rusty Russell <rusty@rustcorp.com.au>
Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=jons.org; s=google; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to:content-type:content-transfer-encoding; bh=gpi8K4A/cwYG7zdJPnWHtM5vg/S1+LhoD3knYFN9wP8=; b=nbmQl91P24cGEn2eZykevxsOnjHE+ajVUfwzwhMIsdr4tVwY2ZopYlO+1a+Ebwp1C5 tTtDdv12ZRKjVIbWspMeYAHNH/KDr+u0fLxw7agPumKTinZvK0KqpKao7lMIZnjD/SrD uKgCrwB4+8PQMjgRfkYIBKnH+K2E69Y3NP7Q8=
X-Google-Dkim-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to:content-type :content-transfer-encoding; bh=gpi8K4A/cwYG7zdJPnWHtM5vg/S1+LhoD3knYFN9wP8=; b=L6Hksbe4XRnbQ1frVq22XClb830yOEd9OXbSn5/YChKcReY7uPVP5Mtf+7pfUSRR9o FSMNxx6UWV5GKlkitcyBJcO5Gr6iHULzfKLch8vbt8NTC6/Lhyf9iPO0qLbQcnGY8ZAC iqlje5htt92WVA5xkrMB9buZF8FnzJyymyMJ1SdVKVQz8HPJoBncnMNoCmdt02ffklkG cHLV2rZRQbDN2pR3t12+oUAqNFKVYZ+hZvbNW4MwlFIA/HeM2qlMVbRWf8VVnv/yHGdw D6aGp9G/qdtSIq037nZDaFcYMr7tSGDIxJZYHlbi5VfNjB7RrTzQhhjZ1SAk4VOwS+k4 tkbg==
X-Gm-Message-State ALoCoQnyO2OEsk3aL11PkswBWRNJo6sbila5vQq76OGiAlT/m9+UcUcZf1krPlzdlw+FvBO4uXne
X-Received by 10.202.0.212 with SMTP id 203mr26962565oia.58.1435917610730; Fri, 03 Jul 2015 03:00:10 -0700 (PDT)
User-Agent Mozilla/5.0 (X11; Linux i686 on x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0
MIME-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 7bit
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Lines 42
Organization linux.* mail to news gateway
X-Original-Cc Tejun Heo <tj@kernel.org>, Jens Axboe <axboe@kernel.dk>, linux-kernel@vger.kernel.org, Arnaldo Carvalho de Melo <acme@kernel.org>
X-Original-Date Fri, 3 Jul 2015 05:00:09 -0500
X-Original-Message-ID <55965D29.5030602@jons.org>
X-Original-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>
X-Original-Sender linux-kernel-owner@vger.kernel.org
Xref aioe.org linux.kernel:1176460

Show key headers only | View raw


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/

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 2/2 block/for-linus] writeback: don't drain  bdi_writeback_congested on bdi destruction Tejun Heo <tj@kernel.org> - 2015-07-02 03:00 +0200
  Re: [PATCH] tools/perf, rbtree: Add RCU wrappers to make rbtree.h  usable in user-space Tejun Heo <tj@kernel.org> - 2015-07-02 15:30 +0200
    Re: [PATCH] tools/perf, rbtree: Add RCU wrappers to make rbtree.h usable in user-space Rusty Russell <rusty@rustcorp.com.au> - 2015-07-03 02:40 +0200
      Re: [PATCH] tools/perf, rbtree: Add RCU wrappers to make rbtree.h  usable in user-space Jon Christopherson <jon@jons.org> - 2015-07-03 12:10 +0200
      Re: [PATCH] tools/perf, rbtree: Add RCU wrappers to make rbtree.h  usable in user-space Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-07-05 10:50 +0200
  Re: [PATCH 2/2 block/for-linus] writeback: don't drain bdi_writeback_congested  on bdi destruction Jens Axboe <axboe@kernel.dk> - 2015-07-02 16:10 +0200

csiph-web