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


Groups > linux.kernel > #1570103

Re: [PATCHv3 perf/core 0/6] Libbpf object pinning

From Arnaldo Carvalho de Melo <acme@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCHv3 perf/core 0/6] Libbpf object pinning
Date 2017-01-30 21:40 +0100
Message-ID <t5qU1-4V-3@gated-at.bofh.it> (permalink)
References <t3ZMe-3YK-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Em Thu, Jan 26, 2017 at 01:19:55PM -0800, Joe Stringer escreveu:
> This series adds pinning functionality for maps, programs, and objects.
> Library users may call bpf_map__pin(map, path) or bpf_program__pin(prog, path)
> to pin maps and programs separately, or use bpf_object__pin(obj, path) to
> pin all maps and programs from the BPF object to the path. The map and program
> variations require a path where it will be pinned in the filesystem,
> and the object variation will create named directories for each program with
> instances within, and mount the maps by name under the path.
> 
> For example, with the directory '/sys/fs/bpf/foo' and a BPF object which
> contains two instances of a program named 'bar', and a map named 'baz':
> /sys/fs/bpf/foo/bar/0
> /sys/fs/bpf/foo/bar/1
> /sys/fs/bpf/foo/baz

Thanks, applied, after some minor fixes.

- Arnaldo
 
> ---
> v3: Split out bpf_program__pin_instance().
>     Change the paths from PATH/{maps,progs}/foo to the above.
>     Drop the patches that were applied.
>     Add a perf test to check that pinning works.
> v2: Wang Nan provided improvements to patch 1.
>     Dropped patch 2 from v1.
>     Added acks for acked patches.
>     Split the bpf_obj__pin() to also provide map / program pinning APIs.
>     Allow users to provide full filesystem path (don't autodetect/mount BPFFS).
> v1: Initial post.
> 
> Joe Stringer (6):
>   tools lib bpf: Add BPF program pinning APIs.
>   tools lib bpf: Add bpf_map__pin()
>   tools lib bpf: Add bpf_object__pin()
>   tools perf util: Make rm_rf(path) argument const
>   tools lib api fs: Add bpf_fs filesystem detector
>   perf test: Add libbpf pinning test
> 
>  tools/lib/api/fs/fs.c  |  16 +++++
>  tools/lib/api/fs/fs.h  |   1 +
>  tools/lib/bpf/libbpf.c | 188 +++++++++++++++++++++++++++++++++++++++++++++++++
>  tools/lib/bpf/libbpf.h |   5 ++
>  tools/perf/tests/bpf.c |  42 ++++++++++-
>  tools/perf/util/util.c |   2 +-
>  tools/perf/util/util.h |   2 +-
>  7 files changed, 253 insertions(+), 3 deletions(-)
> 
> -- 
> 2.11.0

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


Thread

[PATCHv3 perf/core 0/6] Libbpf object pinning Joe Stringer <joe@ovn.org> - 2017-01-26 22:30 +0100
  [PATCHv3 perf/core 1/6] tools lib bpf: Add BPF program pinning APIs. Joe Stringer <joe@ovn.org> - 2017-01-26 22:30 +0100
    Re: [PATCHv3 perf/core 1/6] tools lib bpf: Add BPF program pinning  APIs. Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-01-30 21:30 +0100
      Re: [PATCHv3 perf/core 1/6] tools lib bpf: Add BPF program pinning APIs. Joe Stringer <joe@ovn.org> - 2017-01-30 22:20 +0100
        Re: [PATCHv3 perf/core 1/6] tools lib bpf: Add BPF program pinning  APIs. Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-01-31 02:10 +0100
          Re: [PATCHv3 perf/core 1/6] tools lib bpf: Add BPF program pinning  APIs. Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-01-31 17:10 +0100
            Re: [PATCHv3 perf/core 1/6] tools lib bpf: Add BPF program pinning  APIs. Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-01-31 17:20 +0100
              Re: [PATCHv3 perf/core 1/6] tools lib bpf: Add BPF program pinning  APIs. Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-01-31 17:50 +0100
    Re: [PATCHv3 perf/core 1/6] tools lib bpf: Add BPF program pinning  APIs. Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-01-30 21:30 +0100
    [tip:perf/core] tools lib bpf: Add BPF program pinning APIs tip-bot for Joe Stringer <tipbot@zytor.com> - 2017-02-01 15:50 +0100
  Re: [PATCHv3 perf/core 0/6] Libbpf object pinning Arnaldo Carvalho de Melo <acme@kernel.org> - 2017-01-30 21:40 +0100

csiph-web