<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/tools/bpf/runqslower, branch linux-5.19.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.19.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.19.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2022-04-11T03:17:16Z</updated>
<entry>
<title>tools/runqslower: Use libbpf 1.0 API mode instead of RLIMIT_MEMLOCK</title>
<updated>2022-04-11T03:17:16Z</updated>
<author>
<name>Yafang Shao</name>
</author>
<published>2022-04-09T12:59:58Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=451b5fbc2c56f19f39be4c9e11b3420a0c5f5d3d'/>
<id>urn:sha1:451b5fbc2c56f19f39be4c9e11b3420a0c5f5d3d</id>
<content type='text'>
Explicitly set libbpf 1.0 API mode, then we can avoid using the deprecated
RLIMIT_MEMLOCK.

Signed-off-by: Yafang Shao &lt;laoar.shao@gmail.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20220409125958.92629-5-laoar.shao@gmail.com
</content>
</entry>
<entry>
<title>tools/bpf: Rename 'struct event' to avoid naming conflict</title>
<updated>2022-01-15T01:21:25Z</updated>
<author>
<name>Naveen N. Rao</name>
</author>
<published>2022-01-06T11:45:08Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=88a71086c48ae98e93c0208044827621e9717f7e'/>
<id>urn:sha1:88a71086c48ae98e93c0208044827621e9717f7e</id>
<content type='text'>
On ppc64le, trying to build bpf seltests throws the below warning:
  In file included from runqslower.bpf.c:5:
  ./runqslower.h:7:8: error: redefinition of 'event'
  struct event {
	 ^
  /home/naveen/linux/tools/testing/selftests/bpf/tools/build/runqslower/vmlinux.h:156602:8:
  note: previous definition is here
  struct event {
	 ^

This happens since 'struct event' is defined in
drivers/net/ethernet/alteon/acenic.h . Rename the one in runqslower to a
more appropriate 'runq_event' to avoid the naming conflict.

Signed-off-by: Naveen N. Rao &lt;naveen.n.rao@linux.vnet.ibm.com&gt;
Acked-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Signed-off-by: Michael Ellerman &lt;mpe@ellerman.id.au&gt;
Link: https://lore.kernel.org/r/c13cb3767d26257ca4387b8296b632b433a58db6.1641468127.git.naveen.n.rao@linux.vnet.ibm.com

</content>
</entry>
<entry>
<title>tools/runqslower: Enable cross-building with clang</title>
<updated>2021-12-16T20:15:05Z</updated>
<author>
<name>Jean-Philippe Brucker</name>
</author>
<published>2021-12-16T16:38:42Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bb7b75e860eec31aa67b83935849fdc46418c13e'/>
<id>urn:sha1:bb7b75e860eec31aa67b83935849fdc46418c13e</id>
<content type='text'>
Cross-building using clang requires passing the "-target" flag rather
than using the CROSS_COMPILE prefix. Makefile.include transforms
CROSS_COMPILE into CLANG_CROSS_FLAGS. Add them to CFLAGS, and erase
CROSS_COMPILE for the bpftool build, since it needs to be executed on
the host.

Signed-off-by: Jean-Philippe Brucker &lt;jean-philippe@linaro.org&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Acked-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Link: https://lore.kernel.org/bpf/20211216163842.829836-6-jean-philippe@linaro.org
</content>
</entry>
<entry>
<title>Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net</title>
<updated>2021-11-18T21:13:16Z</updated>
<author>
<name>Jakub Kicinski</name>
</author>
<published>2021-11-18T21:13:16Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=50fc24944a2a0ef5aab571dcac17f6c5f2613f56'/>
<id>urn:sha1:50fc24944a2a0ef5aab571dcac17f6c5f2613f56</id>
<content type='text'>
Signed-off-by: Jakub Kicinski &lt;kuba@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools/runqslower: Fix cross-build</title>
<updated>2021-11-13T01:23:16Z</updated>
<author>
<name>Jean-Philippe Brucker</name>
</author>
<published>2021-11-12T15:51:30Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=e4ac80ef8198636a23866a59575917550328886f'/>
<id>urn:sha1:e4ac80ef8198636a23866a59575917550328886f</id>
<content type='text'>
Commit be79505caf3f ("tools/runqslower: Install libbpf headers when
building") uses the target libbpf to build the host bpftool, which
doesn't work when cross-building:

  make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -C tools/bpf/runqslower O=/tmp/runqslower
  ...
    LINK    /tmp/runqslower/bpftool/bpftool
  /usr/bin/ld: /tmp/runqslower/libbpf/libbpf.a(libbpf-in.o): Relocations in generic ELF (EM: 183)
  /usr/bin/ld: /tmp/runqslower/libbpf/libbpf.a: error adding symbols: file in wrong format
  collect2: error: ld returned 1 exit status

When cross-building, the target architecture differs from the host. The
bpftool used for building runqslower is executed on the host, and thus
must use a different libbpf than that used for runqslower itself.
Remove the LIBBPF_OUTPUT and LIBBPF_DESTDIR parameters, so the bpftool
build makes its own library if necessary.

In the selftests, pass the host bpftool, already a prerequisite for the
runqslower recipe, as BPFTOOL_OUTPUT. The runqslower Makefile will use
the bpftool that's already built for selftests instead of making a new
one.

Fixes: be79505caf3f ("tools/runqslower: Install libbpf headers when building")
Signed-off-by: Jean-Philippe Brucker &lt;jean-philippe@linaro.org&gt;
Signed-off-by: Daniel Borkmann &lt;daniel@iogearbox.net&gt;
Reviewed-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Link: https://lore.kernel.org/bpf/20211112155128.565680-1-jean-philippe@linaro.org
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
</content>
</entry>
<entry>
<title>tools/runqslower: Update perf_buffer__new() calls</title>
<updated>2021-11-12T00:54:06Z</updated>
<author>
<name>Andrii Nakryiko</name>
</author>
<published>2021-11-11T05:36:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=eda8bfa5b7c76d332ece1f24a3662ca843fd880a'/>
<id>urn:sha1:eda8bfa5b7c76d332ece1f24a3662ca843fd880a</id>
<content type='text'>
Use v1.0+ compatible variant of perf_buffer__new() call to prepare for
deprecation.

Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20211111053624.190580-9-andrii@kernel.org
</content>
</entry>
<entry>
<title>tools/runqslower: Install libbpf headers when building</title>
<updated>2021-10-08T18:54:15Z</updated>
<author>
<name>Quentin Monnet</name>
</author>
<published>2021-10-07T19:44:31Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=be79505caf3f99a2f9cca5946261085b333f7034'/>
<id>urn:sha1:be79505caf3f99a2f9cca5946261085b333f7034</id>
<content type='text'>
API headers from libbpf should not be accessed directly from the
library's source directory. Instead, they should be exported with "make
install_headers". Let's make sure that runqslower installs the
headers properly when building.

We use a libbpf_hdrs target to mark the logical dependency on libbpf's
headers export for a number of object files, even though the headers
should have been exported at this time (since bpftool needs them, and is
required to generate the skeleton or the vmlinux.h).

When descending from a parent Makefile, the specific output directories
for building the library and exporting the headers are configurable with
BPFOBJ_OUTPUT and BPF_DESTDIR, respectively. This is in addition to
OUTPUT, on top of which those variables are constructed by default.

Also adjust the Makefile for the BPF selftests. We pass a number of
variables to the "make" invocation, because we want to point runqslower
to the (target) libbpf shared with other tools, instead of building its
own version. In addition, runqslower relies on (target) bpftool, and we
also want to pass the proper variables to its Makefile so that bpftool
itself reuses the same libbpf.

Signed-off-by: Quentin Monnet &lt;quentin@isovalent.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20211007194438.34443-6-quentin@isovalent.com
</content>
</entry>
<entry>
<title>tools/runqslower: Use __state instead of state</title>
<updated>2021-07-07T16:42:26Z</updated>
<author>
<name>SanjayKumar Jeyakumar</name>
</author>
<published>2021-07-07T05:29:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5616e895ecc56db8ba959e53638031a21353e0e2'/>
<id>urn:sha1:5616e895ecc56db8ba959e53638031a21353e0e2</id>
<content type='text'>
Commit 2f064a59a11f ("sched: Change task_struct::state") renamed task-&gt;state
to task-&gt;__state in task_struct. Fix runqslower to use the new name of the
field.

Fixes: 2f064a59a11f ("sched: Change task_struct::state")
Signed-off-by: SanjayKumar Jeyakumar &lt;vjsanjay@gmail.com&gt;
Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Acked-by: Yonghong Song &lt;yhs@fb.com&gt;
Link: https://lore.kernel.org/bpf/20210707052914.21473-1-vjsanjay@gmail.com
</content>
</entry>
<entry>
<title>tools/runqslower: Allow substituting custom vmlinux.h for the build</title>
<updated>2021-03-03T04:14:02Z</updated>
<author>
<name>Andrii Nakryiko</name>
</author>
<published>2021-03-03T00:40:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=303dcc25b5c782547eb13b9f29426de843dd6f34'/>
<id>urn:sha1:303dcc25b5c782547eb13b9f29426de843dd6f34</id>
<content type='text'>
Just like was done for bpftool and selftests in ec23eb705620 ("tools/bpftool:
Allow substituting custom vmlinux.h for the build") and ca4db6389d61
("selftests/bpf: Allow substituting custom vmlinux.h for selftests build"),
allow to provide pre-generated vmlinux.h for runqslower build.

Signed-off-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Acked-by: Martin KaFai Lau &lt;kafai@fb.com&gt;
Acked-by: Yonghong Song &lt;yhs@fb.com&gt;
Link: https://lore.kernel.org/bpf/20210303004010.653954-1-andrii@kernel.org
</content>
</entry>
<entry>
<title>bpf: runqslower: Use task local storage</title>
<updated>2021-02-26T19:51:48Z</updated>
<author>
<name>Song Liu</name>
</author>
<published>2021-02-25T23:43:19Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ced47e30ab8b3ed986e28411f63e041b51c1fdf8'/>
<id>urn:sha1:ced47e30ab8b3ed986e28411f63e041b51c1fdf8</id>
<content type='text'>
Replace hashtab with task local storage in runqslower. This improves the
performance of these BPF programs. The following table summarizes average
runtime of these programs, in nanoseconds:

                          task-local   hash-prealloc   hash-no-prealloc
handle__sched_wakeup             125             340               3124
handle__sched_wakeup_new        2812            1510               2998
handle__sched_switch             151             208                991

Note that, task local storage gives better performance than hashtab for
handle__sched_wakeup and handle__sched_switch. On the other hand, for
handle__sched_wakeup_new, task local storage is slower than hashtab with
prealloc. This is because handle__sched_wakeup_new accesses the data for
the first time, so it has to allocate the data for task local storage.
Once the initial allocation is done, subsequent accesses, as those in
handle__sched_wakeup, are much faster with task local storage. If we
disable hashtab prealloc, task local storage is much faster for all 3
functions.

Signed-off-by: Song Liu &lt;songliubraving@fb.com&gt;
Signed-off-by: Alexei Starovoitov &lt;ast@kernel.org&gt;
Acked-by: Andrii Nakryiko &lt;andrii@kernel.org&gt;
Link: https://lore.kernel.org/bpf/20210225234319.336131-7-songliubraving@fb.com
</content>
</entry>
</feed>
