Re: [GIT PULL] Kselftest second fixes update for Linux 6.6-rc2

2023-09-15 Thread pr-tracker-bot
The pull request you sent on Fri, 15 Sep 2023 12:37:09 -0600: > git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest > tags/linux-kselftest-fixes-6.6-rc2 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/57d88e8a5974644039fbc47806bac7bb12025636 Thank

[PATCH 0/9] mm/damon: implement DAMOS apply intervals

2023-09-15 Thread SeongJae Park
Changes from RFC (https://lore.kernel.org/damon/20230910034048.59191-1...@kernel.org/) - Add kselftest for damos_apply_interval_us sysfs file - Rebase on latest mm-unstable DAMON-based operation schemes are applied for every aggregation interval. That is mainly because schemes are using

[PATCH 7/9] selftests/damon/sysfs: test DAMOS apply intervals

2023-09-15 Thread SeongJae Park
Update DAMON selftests to test existence of the file for reading/writing DAMOS apply interval under each scheme directory. Signed-off-by: SeongJae Park --- tools/testing/selftests/damon/sysfs.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/damon/sysfs.sh

Re: [PATCH bpf-next v3 0/9] arm32, bpf: add support for cpuv4 insns

2023-09-15 Thread patchwork-bot+netdevbpf
Hello: This series was applied to bpf/bpf-next.git (master) by Alexei Starovoitov : On Thu, 7 Sep 2023 23:05:41 + you wrote: > Changes in V2 -> V3 > - Added comments at places where there could be confustion. > - In the patch for DIV64, fix the if-else case that would never run. > - In the

Re: [PATCH bpf-next v3 9/9] MAINTAINERS: Add myself for ARM32 BPF JIT maintainer.

2023-09-15 Thread Alexei Starovoitov
On Fri, Sep 8, 2023 at 7:50 AM Puranjay Mohan wrote: > > On Fri, Sep 8, 2023 at 3:49 PM Daniel Borkmann wrote: > > > > On 9/8/23 10:37 AM, Russell King (Oracle) wrote: > > > On Thu, Sep 07, 2023 at 11:05:50PM +, Puranjay Mohan wrote: > > >> As Shubham has been inactive since 2017, Add myself

Re: [PATCH 2/3] userfaultfd: UFFDIO_REMAP uABI

2023-09-15 Thread Suren Baghdasaryan
On Fri, Sep 15, 2023 at 4:34 PM Jann Horn wrote: > > On Thu, Sep 14, 2023 at 5:26 PM Suren Baghdasaryan wrote: > > +/* > > + * The mmap_lock for reading is held by the caller. Just move the page > > + * from src_pmd to dst_pmd if possible, and return true if succeeded > > + * in moving the page.

Re: [PATCH 2/3] userfaultfd: UFFDIO_REMAP uABI

2023-09-15 Thread Jann Horn
On Thu, Sep 14, 2023 at 5:26 PM Suren Baghdasaryan wrote: > +/* > + * The mmap_lock for reading is held by the caller. Just move the page > + * from src_pmd to dst_pmd if possible, and return true if succeeded > + * in moving the page. > + */ > +static int remap_pages_pte(struct mm_struct

Re: [PATCH] selftests/user_events: Fix to unmount tracefs when test created mount

2023-09-15 Thread Mark Brown
On Fri, Sep 15, 2023 at 10:27:54PM +, Beau Belgrave wrote: > Fix to unmount tracefs if the self-test mounted it to allow testing. > If tracefs was already mounted, this does nothing. Reviewed-by: Mark Brown signature.asc Description: PGP signature

[PATCH] selftests/user_events: Fix to unmount tracefs when test created mount

2023-09-15 Thread Beau Belgrave
Fix to unmount tracefs if the self-test mounted it to allow testing. If tracefs was already mounted, this does nothing. Suggested-by: Mark Brown Link: https://lore.kernel.org/all/29fce076-746c-4650-8358-b4e0fa215...@sirena.org.uk/ Fixes: a06023a8f78d ("selftests/user_events: Fix failures when

Re: [PATCH 2/2] tools/power/x86/intel_pstate_tracer: Use pygnuplot package for Gnuplot

2023-09-15 Thread Doug Smythies
On Fri, Sep 15, 2023 at 2:31 PM Mario Limonciello wrote: > On 9/15/2023 16:15, Doug Smythies wrote: > > On 2023.09.15 03:41 Swapnil Sapkal wrote: > > > >> In intel_pstate_tracer.py, Gnuplot is used to generate 2D plots. > >> In current implementation this tracer gives error while importing > >>

Re: [PATCH 2/2] tools/power/x86/intel_pstate_tracer: Use pygnuplot package for Gnuplot

2023-09-15 Thread Mario Limonciello
On 9/15/2023 16:15, Doug Smythies wrote: On 2023.09.15 03:41 Swapnil Sapkal wrote: In intel_pstate_tracer.py, Gnuplot is used to generate 2D plots. In current implementation this tracer gives error while importing the module because Gnuplot is imported from package Gnuplot-py which does not

RE: [PATCH 2/2] tools/power/x86/intel_pstate_tracer: Use pygnuplot package for Gnuplot

2023-09-15 Thread Doug Smythies
On 2023.09.15 03:41 Swapnil Sapkal wrote: > In intel_pstate_tracer.py, Gnuplot is used to generate 2D plots. > In current implementation this tracer gives error while importing > the module because Gnuplot is imported from package Gnuplot-py which > does not support python 3.x. Fix this by using

Re: [RFC PATCH] kunit: Add a macro to wrap a deferred action function

2023-09-15 Thread Sami Tolvanen
Hi David, On Thu, Sep 14, 2023 at 10:01 PM David Gow wrote: > > KUnit's deferred action API accepts a void(*)(void *) function pointer > which is called when the test is exited. However, we very frequently > want to use existing functions which accept a single pointer, but which > may not be of

[GIT PULL] Kselftest second fixes update for Linux 6.6-rc2

2023-09-15 Thread Shuah Khan
Hi Linus, Please pull the following second Kselftest fixes update for Linux 6.6-rc2. This kselftest fixes update for Linux 6.6-rc2 consists of important fixes to user_events test and ftrace test. user_events test has been enabled for default run in Linux 6.6-rc1. The following fixes are for

Re: [PATCH v2] selftests/user_events: Fix failures when user_events is not installed

2023-09-15 Thread Shuah Khan
On 9/15/23 09:54, Shuah Khan wrote: On 9/12/23 11:46, Steven Rostedt wrote: On Tue, 12 Sep 2023 10:12:34 -0700 Beau Belgrave wrote: I guess I was wrong and some people do care ;-) -- Steve It looks like this change got applied [1] to the fixes branch of linux-kselftest. I can either send

Re: [PATCH v2] selftests/user_events: Fix failures when user_events is not installed

2023-09-15 Thread Shuah Khan
On 9/12/23 11:46, Steven Rostedt wrote: On Tue, 12 Sep 2023 10:12:34 -0700 Beau Belgrave wrote: I guess I was wrong and some people do care ;-) -- Steve It looks like this change got applied [1] to the fixes branch of linux-kselftest. I can either send a V3 with this addressed or build a

[PATCH v2 6/6] selftests/resctrl: Reduce failures due to outliers in MBA/MBM tests

2023-09-15 Thread Ilpo Järvinen
The initial value of 5% chosen for the maximum allowed percentage difference between resctrl mbm value and IMC mbm value in commit 06bd03a57f8c ("selftests/resctrl: Fix MBA/MBM results reporting format") was "randomly chosen value" (as admitted by the changelog). When running tests in our lab

[PATCH v2 5/6] selftests/resctrl: Fix feature checks

2023-09-15 Thread Ilpo Järvinen
The MBA and CMT tests expect support of other features to be able to run. When platform only supports MBA but not MBM, MBA test will fail with: Failed to open total bw file: No such file or directory When platform only supports CMT but not CAT, CMT test will fail with: Failed to open bit mask

[PATCH v2 2/6] selftests/resctrl: Remove duplicate feature check from CMT test

2023-09-15 Thread Ilpo Järvinen
The test runner run_cmt_test() in resctrl_tests.c checks for CMT feature and does not run cmt_resctrl_val() if CMT is not supported. Then cmt_resctrl_val() also check is CMT is supported. Remove the duplicated feature check for CMT from cmt_resctrl_val(). Signed-off-by: Ilpo Järvinen Cc: ---

[PATCH v2 0/6] selftests/resctrl: Fixes to failing tests

2023-09-15 Thread Ilpo Järvinen
Fix three issues with resctrl selftests. The signal handling fix became necessary after the mount/umount fixes. The other two came up when I ran resctrl selftests across the server fleet in our lab to validate the upcoming CAT test rewrite (the rewrite is not part of this series). These are

[PATCH v2 1/6] selftests/resctrl: Extend signal handler coverage to unmount on receiving signal

2023-09-15 Thread Ilpo Järvinen
Unmounting resctrl FS has been moved into the per test functions in resctrl_tests.c by commit caddc0fbe495 ("selftests/resctrl: Move resctrl FS mount/umount to higher level"). In case a signal (SIGINT, SIGTERM, or SIGHUP) is received, the running selftest is aborted by ctrlc_handler() which then

[PATCH v2 4/6] selftests/resctrl: Refactor feature check to use resource and feature name

2023-09-15 Thread Ilpo Järvinen
Feature check in validate_resctrl_feature_request() takes in the test name string and maps that to what to check per test. Pass resource and feature names to validate_resctrl_feature_request() directly rather than deriving them from the test name inside the function which makes the feature check

[PATCH v2 3/6] selftests/resctrl: Move _GNU_SOURCE define into Makefile

2023-09-15 Thread Ilpo Järvinen
Currently, _GNU_SOURCE is defined in resctrl.h. Defining _GNU_SOURCE has a large impact on what gets defined when including headers either before or after it. This can result in compile failures if .c file decides to include a standard header file before resctrl.h. It is safer to define

Re: [PATCH -fixes] riscv: kselftests: Fix mm build by removing testcases subdirectory

2023-09-15 Thread Charlie Jenkins
On Fri, Sep 15, 2023 at 12:01:13PM +0200, Alexandre Ghiti wrote: > kselftests fails to build because the mm/testcases subdirectory is not > created and then the compiler fails to output the binary there. > > So fix this by simply removing this subdirectory which is not very > useful. > >

Re: [RFC PATCH 9/9] iov_iter: Add benchmarking kunit tests for UBUF/IOVEC

2023-09-15 Thread David Howells
David Laight wrote: > You could also just not do the copy! > Although you need (say) asm volatile("\n",:::"memory") to > stop it all being completely optimised away. > That might show up a difference in the 'out_of_line' test > where 15% on top on the data copies is massive - it may be > that

RE: [RFC PATCH 9/9] iov_iter: Add benchmarking kunit tests for UBUF/IOVEC

2023-09-15 Thread David Laight
From: David Howells > Sent: 15 September 2023 13:36 > > David Laight wrote: > > > I was thinking of import_iovec() - or whatever its current > > name is. > > That doesn't actually access the buffer described by the iovec[]. > > > That really needs a single structure that contains the iov_iter

[PATCH] kunit: Check for kunit_parse_glob_filter() failure

2023-09-15 Thread Dan Carpenter
Smatch complains that the missing error checks would lead to a crash: lib/kunit/executor_test.c:40 parse_filter_test() error: double free of 'filter.test_glob' We may as well do it right... Fixes: a127b154a8f2 ("kunit: tool: allow filtering test cases via glob") Signed-off-by: Dan

Re: [RFC PATCH 9/9] iov_iter: Add benchmarking kunit tests for UBUF/IOVEC

2023-09-15 Thread David Howells
David Laight wrote: > I was thinking of import_iovec() - or whatever its current > name is. That doesn't actually access the buffer described by the iovec[]. > That really needs a single structure that contains the iov_iter > and the cache[] (which the caller pretty much always allocates > in

[PATCH 0/2] Report FEAT_SVE_B16B16 to userspace

2023-09-15 Thread Mark Brown
SVE 2.1 introduced a new feature FEAT_SVE_B16B16 which adds instructions supporting the BFloat16 floating point format. Report this to userspace through the ID registers and hwcap. Signed-off-by: Mark Brown --- Mark Brown (2): arm64/sve: Report FEAT_SVE_B16B16 to userspace

[PATCH 1/2] arm64/sve: Report FEAT_SVE_B16B16 to userspace

2023-09-15 Thread Mark Brown
SVE 2.1 introduced a new feature FEAT_SVE_B16B16 which adds instructions supporting the BFloat16 floating point format. Report this to userspace through the ID registers and hwcap. Reported-by: Peter Maydell Signed-off-by: Mark Brown --- Documentation/arch/arm64/cpu-feature-registers.rst | 2

[PATCH 2/2] kselftest/arm64: Verify HWCAP2_SVE_B16B16

2023-09-15 Thread Mark Brown
Validate that SVE B16B16 support is reported correctly and consistently to userspace. Signed-off-by: Mark Brown --- tools/testing/selftests/arm64/abi/hwcap.c | 13 + 1 file changed, 13 insertions(+) diff --git a/tools/testing/selftests/arm64/abi/hwcap.c

Re: [RFC PATCH 9/9] iov_iter: Add benchmarking kunit tests for UBUF/IOVEC

2023-09-15 Thread David Howells
David Laight wrote: > Isn't that going to be completely dominated by the cache fills > from memory? > > I'd have thought you'd need to use something with a lot of > small fragments so that the iteration code dominates the copy. Okay, if I switch it to using MAP_ANON for the big 256MiB buffer,

RE: [RFC PATCH 9/9] iov_iter: Add benchmarking kunit tests for UBUF/IOVEC

2023-09-15 Thread David Laight
From: David Howells > Sent: 15 September 2023 12:23 > > David Laight wrote: > > > > > Some measurements can be made using readv() and writev() > > > > on /dev/zero and /dev/null. > > > > > > Forget /dev/null; that doesn't actually engage any iteration code. The > > > same > > > for writing to

[PATCH v2 10/10] selftests/pcie_bwctrl: Create selftests

2023-09-15 Thread Ilpo Järvinen
Create selftests for PCIe BW control through the PCIe cooling device sysfs interface. First, the BW control selftest finds the PCIe port to test with. By default, the PCIe port with the highest bus speed is selected but another PCIe port can be provided with -d parameter. The actual test steps

Re: [RFC PATCH 9/9] iov_iter: Add benchmarking kunit tests for UBUF/IOVEC

2023-09-15 Thread David Howells
David Laight wrote: > > > Some measurements can be made using readv() and writev() > > > on /dev/zero and /dev/null. > > > > Forget /dev/null; that doesn't actually engage any iteration code. The same > > for writing to /dev/zero. Reading from /dev/zero does its own iteration > > thing > >

RE: [RFC PATCH 9/9] iov_iter: Add benchmarking kunit tests for UBUF/IOVEC

2023-09-15 Thread David Laight
From: David Howells > Sent: 15 September 2023 11:10 > > David Laight wrote: > > > > Add kunit tests to benchmark 256MiB copies to a UBUF iterator and an IOVEC > > > iterator. This attaches a userspace VM with a mapped file in it > > > temporarily to the test thread. > > > > Isn't that going to

[PATCH 2/2] tools/power/x86/intel_pstate_tracer: Use pygnuplot package for Gnuplot

2023-09-15 Thread Swapnil Sapkal
In intel_pstate_tracer.py, Gnuplot is used to generate 2D plots. In current implementation this tracer gives error while importing the module because Gnuplot is imported from package Gnuplot-py which does not support python 3.x. Fix this by using pygnuplot package to import this module.

[PATCH 1/2] selftests/amd-pstate: Fix broken paths to run workloads in amd-pstate-ut

2023-09-15 Thread Swapnil Sapkal
In selftests/amd-pstate, tbench and gitsource microbenchmarks are used to compare the performance with different governors. In Current implementation relative path to run `amd_pstate_tracer.py` broken. Fixed this by using absolute paths. Also selftests/amd-pstate uses distro `perf` to capture

[PATCH 0/2] Fix issues observed with selftests/amd-pstate

2023-09-15 Thread Swapnil Sapkal
This series fixes the issues observed with selftests/amd-pstate while running performance comparison tests with different governors. First patch changes relative paths with absolute path and also change it with correct path wherever it is broken. The second patch fixes error observed while

Re: [RFC PATCH 9/9] iov_iter: Add benchmarking kunit tests for UBUF/IOVEC

2023-09-15 Thread David Howells
David Laight wrote: > > Add kunit tests to benchmark 256MiB copies to a UBUF iterator and an IOVEC > > iterator. This attaches a userspace VM with a mapped file in it > > temporarily to the test thread. > > Isn't that going to be completely dominated by the cache fills > from memory? Yes...

[PATCH -fixes] riscv: kselftests: Fix mm build by removing testcases subdirectory

2023-09-15 Thread Alexandre Ghiti
kselftests fails to build because the mm/testcases subdirectory is not created and then the compiler fails to output the binary there. So fix this by simply removing this subdirectory which is not very useful. Signed-off-by: Alexandre Ghiti --- tools/testing/selftests/riscv/mm/Makefile

Re: [PATCH RESEND v3 1/2] selftests/resctrl: Fix schemata write error check

2023-09-15 Thread Maciej Wieczór-Retman
On 2023-09-14 at 08:14:25 -0700, Reinette Chatre wrote: >Hi Maciej, > >On 9/13/2023 11:01 PM, Maciej Wieczór-Retman wrote: >> On 2023-09-13 at 11:49:19 -0700, Reinette Chatre wrote: >>> On 9/12/2023 10:59 PM, Maciej Wieczór-Retman wrote: On 2023-09-12 at 09:00:28 -0700, Reinette Chatre wrote:

[PATCH] kunit: Fix a null-ptr-deref bug in kunit_run_case_catch_errors()

2023-09-15 Thread Jinjie Ruan
Inject fault while probing kunit-test.ko, the below null-ptr-deref occurs. In kunit_run_case_catch_errors(), if the first kunit_try_catch_run() fails in kthread_run(), the kunit_try_run_case() will not run, so the kunit_resource_test_init() and kunit_resource_test_cases() will not run. And if the

RE: [RFC PATCH 9/9] iov_iter: Add benchmarking kunit tests for UBUF/IOVEC

2023-09-15 Thread David Laight
From: David Howells > Sent: 14 September 2023 23:15 > > Add kunit tests to benchmark 256MiB copies to a UBUF iterator and an IOVEC > iterator. This attaches a userspace VM with a mapped file in it > temporarily to the test thread. Isn't that going to be completely dominated by the cache fills

Re: [PATCH net] selftests: tls: swap the TX and RX sockets in some tests

2023-09-15 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (main) by David S. Miller : On Tue, 12 Sep 2023 16:16:25 +0200 you wrote: > tls.sendmsg_large and tls.sendmsg_multiple are trying to send through > the self->cfd socket (only configured with TLS_RX) and to receive through > the self->fd socket

Re: [PATCH v3 9/9] KVM: riscv: selftests: Add sstc timer test

2023-09-15 Thread Haibo Xu
On Thu, Sep 14, 2023 at 6:15 PM Andrew Jones wrote: > > On Thu, Sep 14, 2023 at 10:52:15AM +0100, Conor Dooley wrote: > > On Thu, Sep 14, 2023 at 11:36:01AM +0200, Andrew Jones wrote: > > > > +static inline void cpu_relax(void) > > > > +{ > > > > +#ifdef __riscv_zihintpause > > > > + asm

Re: [PATCH v3 9/9] KVM: riscv: selftests: Add sstc timer test

2023-09-15 Thread Haibo Xu
On Thu, Sep 14, 2023 at 5:52 PM Andrew Jones wrote: > > On Thu, Sep 14, 2023 at 09:37:03AM +0800, Haibo Xu wrote: > > Add a KVM selftests to validate the Sstc timer functionality. > > The test was ported from arm64 arch timer test. > > I just tried this test out. Running it over and over again on

Re: [PATCH v3 8/9] KVM: riscv: selftests: Change vcpu_has_ext to a common function

2023-09-15 Thread Haibo Xu
On Thu, Sep 14, 2023 at 5:05 PM Andrew Jones wrote: > > On Thu, Sep 14, 2023 at 09:37:02AM +0800, Haibo Xu wrote: > > Move vcpu_has_ext to the processor.c and rename it to __vcpu_has_ext > > so that other test cases can use it for vCPU extension check. > > > > Signed-off-by: Haibo Xu > > --- > >

Re: [PATCH v3 5/9] KVM: riscv: selftests: Switch to use macro from csr.h

2023-09-15 Thread Haibo Xu
On Thu, Sep 14, 2023 at 4:52 PM Andrew Jones wrote: > > On Thu, Sep 14, 2023 at 09:36:59AM +0800, Haibo Xu wrote: > > Signed-off-by: Haibo Xu > > --- > > tools/testing/selftests/kvm/include/riscv/processor.h | 8 +--- > > 1 file changed, 1 insertion(+), 7 deletions(-) > > > > diff --git

Re: [PATCH v3 4/9] tools: riscv: Add header file csr.h

2023-09-15 Thread Haibo Xu
On Thu, Sep 14, 2023 at 4:14 PM Andrew Jones wrote: > > On Thu, Sep 14, 2023 at 09:36:58AM +0800, Haibo Xu wrote: > > Borrow the csr definitions and operations from kernel's > > arch/riscv/include/asm/csr.h to tools/ for riscv. Since > > only 64bit was supported for RISC-V KVM selftests, add > >