netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Roman Gushchin <guro@fb.com>
To: Stanislav Fomichev <sdf@google.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"bpf@vger.kernel.org" <bpf@vger.kernel.org>,
	"davem@davemloft.net" <davem@davemloft.net>,
	"ast@kernel.org" <ast@kernel.org>,
	"daniel@iogearbox.net" <daniel@iogearbox.net>
Subject: Re: [PATCH bpf-next v4 3/4] bpf: cgroup: properly use bpf_prog_array api
Date: Tue, 28 May 2019 21:48:29 +0000	[thread overview]
Message-ID: <20190528214823.GC27847@tower.DHCP.thefacebook.com> (raw)
In-Reply-To: <20190528211444.166437-3-sdf@google.com>

On Tue, May 28, 2019 at 02:14:43PM -0700, Stanislav Fomichev wrote:
> Now that we don't have __rcu markers on the bpf_prog_array helpers,
> let's use proper rcu_dereference_protected to obtain array pointer
> under mutex.
> 
> We also don't need __rcu annotations on cgroup_bpf.inactive since
> it's not read/updated concurrently.
> 
> v4:
> * drop cgroup_rcu_xyz wrappers and use rcu APIs directly; presumably
>   should be more clear to understand which mutex/refcount protects
>   each particular place
> 
> v3:
> * amend cgroup_rcu_dereference to include percpu_ref_is_dying;
>   cgroup_bpf is now reference counted and we don't hold cgroup_mutex
>   anymore in cgroup_bpf_release
> 
> v2:
> * replace xchg with rcu_swap_protected
> 
> Cc: Roman Gushchin <guro@fb.com>
> Signed-off-by: Stanislav Fomichev <sdf@google.com>

Yeah, the looks even better.

Acked-by: Roman Gushchin <guro@fb.com>

Thanks!

  reply	other threads:[~2019-05-28 21:49 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-28 21:14 [PATCH bpf-next v4 1/4] bpf: remove __rcu annotations from bpf_prog_array Stanislav Fomichev
2019-05-28 21:14 ` [PATCH bpf-next v4 2/4] bpf: media: properly use bpf_prog_array api Stanislav Fomichev
2019-05-28 21:14 ` [PATCH bpf-next v4 3/4] bpf: cgroup: " Stanislav Fomichev
2019-05-28 21:48   ` Roman Gushchin [this message]
2019-05-28 21:14 ` [PATCH bpf-next v4 4/4] bpf: tracing: " Stanislav Fomichev
2019-05-29 14:08 ` [PATCH bpf-next v4 1/4] bpf: remove __rcu annotations from bpf_prog_array Daniel Borkmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190528214823.GC27847@tower.DHCP.thefacebook.com \
    --to=guro@fb.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=sdf@google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).