Re: [PATCH 24/24] selftests/resctrl: Ignore failures from L2 CAT test with <= 2 bits

2023-11-03 Thread Reinette Chatre
Hi Ilpo, On 11/3/2023 3:24 AM, Ilpo Järvinen wrote: > On Thu, 2 Nov 2023, Reinette Chatre wrote: >> On 10/24/2023 2:26 AM, Ilpo Järvinen wrote: >>> L2 CAT test with low number of bits tends to occasionally fail because >>> of what seems random variation. The margin is quite small to begin with >>>

Re: [PATCH 23/24] selftests/resctrl: Add L2 CAT test

2023-11-03 Thread Reinette Chatre
Hi Ilpo, On 11/3/2023 3:39 AM, Ilpo Järvinen wrote: > On Thu, 2 Nov 2023, Reinette Chatre wrote: >> On 10/24/2023 2:26 AM, Ilpo Järvinen wrote: > >>> Add L2 CAT selftest. As measuring L2 misses is not easily available >>> with perf, use L3 accesses as a proxy for L2 CAT working or not. >> >> I un

Re: [PATCH 18/24] selftests/resctrl: Introduce generalized test framework

2023-11-03 Thread Reinette Chatre
Hi Ilpo, On 11/3/2023 2:54 AM, Ilpo Järvinen wrote: > On Thu, 2 Nov 2023, Reinette Chatre wrote: >> On 10/24/2023 2:26 AM, Ilpo Järvinen wrote: >> ... >>> diff --git a/tools/testing/selftests/resctrl/resctrl.h >>> b/tools/testing/selftests/resctrl/resctrl.h >>> index ec6efd36f60a..e017adf1390d 10

Re: [PATCH 16/24] selftests/resctrl: Rewrite Cache Allocation Technology (CAT) test

2023-11-03 Thread Reinette Chatre
Hi Ilpo, On 11/3/2023 3:57 AM, Ilpo Järvinen wrote: > On Thu, 2 Nov 2023, Reinette Chatre wrote: >> On 10/24/2023 2:26 AM, Ilpo Järvinen wrote: ... >>> /* >>> - * Change schemata. Write schemata to specified >>> - * con_mon grp, mon_grp in resctrl FS. >>> - * Run 5 times in order to get average

Re: [PATCH 17/24] selftests/resctrl: Create struct for input parameter

2023-11-03 Thread Reinette Chatre
Hi Ilpo, On 11/3/2023 4:24 AM, Ilpo Järvinen wrote: > On Thu, 2 Nov 2023, Reinette Chatre wrote: >> On 10/24/2023 2:26 AM, Ilpo Järvinen wrote: >> >>> diff --git a/tools/testing/selftests/resctrl/mba_test.c >>> b/tools/testing/selftests/resctrl/mba_test.c >>> index d3bf4368341e..5157a3f74fee 1006

Re: [PATCH 05/24] selftests/resctrl: Create cache_size() helper

2023-11-03 Thread Reinette Chatre
Hi Ilpo, On 11/3/2023 1:53 AM, Ilpo Järvinen wrote: > > Yes, I'm more than happy to rename them. This naming was what you > suggested earlier. (I used cache_alloc_size() or something like that > initially and you were against using "alloc" in the name.) My apologies for giving poor guidance.

[PATCH] selftests: bpf: config.aarch64: disable CONFIG_DEBUG_INFO_REDUCED

2023-11-03 Thread Anders Roxell
Building an arm64 kernel and seftests/bpf with defconfig + selftests/bpf/config and selftests/bpf/config.aarch64 the fragment CONFIG_DEBUG_INFO_REDUCED is enabled in arm64's defconfig, it should be disabled in file sefltests/bpf/config.aarch64 since if its not disabled CONFIG_DEBUG_INFO_BTF wont be

[PATCH 2/2] selftests: mm: fix some build warnings

2023-11-03 Thread Muhammad Usama Anjum
Fix build warnings: pagemap_ioctl.c:1154:38: warning: format ‘%s’ expects a matching ‘char *’ argument [-Wformat=] pagemap_ioctl.c:1162:51: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 2 has type ‘int’ [-Wformat=] pagemap_ioctl.c:1192:51: warning: format ‘%ld’ expects a

[PATCH 1/2] selftests: mm: skip whole test instead of failure

2023-11-03 Thread Muhammad Usama Anjum
Some architectures don't support userfaultfd. Skip running the whole test on them instead of registering the failure. Reported-by: Ryan Roberts Closes: https://lore.kernel.org/all/f8463381-2697-49e9-9460-9dc734528...@arm.com Fixes: 46fd75d4a3c9 ("selftests: mm: add pagemap ioctl tests") Signed-of

[PATCH 2/2] selftests/mm: Add hugetlb_fault_after_madv to .gitignore

2023-11-03 Thread Breno Leitao
commit 116d57303a05 ("selftests/mm: add a new test for madv and hugetlb") added a new test case, but, it didn't add the binary name in tools/testing/selftests/mm/.gitignore. Add hugetlb_fault_after_madv to tools/testing/selftests/mm/.gitignore. Fixes: 116d57303a05 ("selftests/mm: add a new test f

[PATCH 1/2] selftests/mm: restore number of hugepages

2023-11-03 Thread Breno Leitao
The test mm `hugetlb_fault_after_madv` selftest needs one and only one huge page to run, thus it sets `/proc/sys/vm/nr_hugepages` to 1. The problem is that further tests require the previous number of hugepages allocated in order to succeed. Save the number of huge pages before changing it, and r

Re: [PATCH v2 2/2] selftests/mm: Add a new test for madv and hugetlb

2023-11-03 Thread Ryan Roberts
On 03/11/2023 13:59, Breno Leitao wrote: > Hello Ryan, > > On Thu, Nov 02, 2023 at 12:29:54PM +, Ryan Roberts wrote: >> On 02/11/2023 12:24, Ryan Roberts wrote: >>> On 05/10/2023 17:39, Breno Leitao wrote: Create a selftest that exercises the race between page faults and madvise(MADV

Re: [PATCH v2 2/2] selftests/mm: Add a new test for madv and hugetlb

2023-11-03 Thread Breno Leitao
Hello Ryan, On Thu, Nov 02, 2023 at 12:29:54PM +, Ryan Roberts wrote: > On 02/11/2023 12:24, Ryan Roberts wrote: > > On 05/10/2023 17:39, Breno Leitao wrote: > >> Create a selftest that exercises the race between page faults and > >> madvise(MADV_DONTNEED) in the same huge page. Do it by runni

Re: [PATCH v3 11/11] selftests: error out if kernel header files are not yet built

2023-11-03 Thread Peter Zijlstra
On Fri, Nov 03, 2023 at 01:59:28PM +0100, David Hildenbrand wrote: > Okay. the question is if your workflow can be easily adjusted, or if we can > improve that header handling as a whole. So on IRC the following was suggested: make O=defconfig-build headers ; make O=defconfig-build -C tools/t

Re: [PATCH v3 11/11] selftests: error out if kernel header files are not yet built

2023-11-03 Thread David Hildenbrand
On 03.11.23 13:46, Peter Zijlstra wrote: On Fri, Nov 03, 2023 at 01:22:54PM +0100, David Hildenbrand wrote: On 03.11.23 13:16, Peter Zijlstra wrote: On Tue, Jun 06, 2023 at 12:16:37AM -0700, John Hubbard wrote: As per a discussion with Muhammad Usama Anjum [1], the following is how one is supp

Re: [PATCH v3 11/11] selftests: error out if kernel header files are not yet built

2023-11-03 Thread David Hildenbrand
On 03.11.23 13:59, David Hildenbrand wrote: On 03.11.23 13:46, Peter Zijlstra wrote: On Fri, Nov 03, 2023 at 01:22:54PM +0100, David Hildenbrand wrote: On 03.11.23 13:16, Peter Zijlstra wrote: On Tue, Jun 06, 2023 at 12:16:37AM -0700, John Hubbard wrote: As per a discussion with Muhammad Usam

Re: [PATCH v3 11/11] selftests: error out if kernel header files are not yet built

2023-11-03 Thread Peter Zijlstra
On Fri, Nov 03, 2023 at 01:22:54PM +0100, David Hildenbrand wrote: > On 03.11.23 13:16, Peter Zijlstra wrote: > > On Tue, Jun 06, 2023 at 12:16:37AM -0700, John Hubbard wrote: > > > As per a discussion with Muhammad Usama Anjum [1], the following is how > > > one is supposed to build selftests: > >

Re: [PATCH v3 11/11] selftests: error out if kernel header files are not yet built

2023-11-03 Thread David Hildenbrand
On 03.11.23 13:16, Peter Zijlstra wrote: On Tue, Jun 06, 2023 at 12:16:37AM -0700, John Hubbard wrote: As per a discussion with Muhammad Usama Anjum [1], the following is how one is supposed to build selftests: make headers && make -C tools/testing/selftests/mm Change the selftest build s

Re: [PATCH v3 11/11] selftests: error out if kernel header files are not yet built

2023-11-03 Thread Peter Zijlstra
On Tue, Jun 06, 2023 at 12:16:37AM -0700, John Hubbard wrote: > As per a discussion with Muhammad Usama Anjum [1], the following is how > one is supposed to build selftests: > > make headers && make -C tools/testing/selftests/mm > > Change the selftest build system's lib.mk to fail out with a

Re: [PATCH 03/24] selftests/resctrl: Refactor get_cbm_mask()

2023-11-03 Thread Ilpo Järvinen
On Thu, 2 Nov 2023, Reinette Chatre wrote: > On 10/24/2023 2:26 AM, Ilpo Järvinen wrote: > > > @@ -229,6 +228,31 @@ int get_cbm_mask(char *cache_type, char *cbm_mask) > > return 0; > > } > > > > +/* > > + * get_cbm_mask - Get cbm bit mask > > I know you just copied code here but please kee

Re: [PATCH 17/24] selftests/resctrl: Create struct for input parameter

2023-11-03 Thread Ilpo Järvinen
On Thu, 2 Nov 2023, Reinette Chatre wrote: > On 10/24/2023 2:26 AM, Ilpo Järvinen wrote: > > > diff --git a/tools/testing/selftests/resctrl/mba_test.c > > b/tools/testing/selftests/resctrl/mba_test.c > > index d3bf4368341e..5157a3f74fee 100644 > > --- a/tools/testing/selftests/resctrl/mba_test.c

Re: [PATCH 16/24] selftests/resctrl: Rewrite Cache Allocation Technology (CAT) test

2023-11-03 Thread Ilpo Järvinen
On Thu, 2 Nov 2023, Reinette Chatre wrote: > On 10/24/2023 2:26 AM, Ilpo Järvinen wrote: > > CAT test spawns two processes into two different control groups with > > exclusive schemata. Both the processes alloc a buffer from memory > > matching their allocated LLC block size and flush the entire bu

Re: [PATCH 23/24] selftests/resctrl: Add L2 CAT test

2023-11-03 Thread Ilpo Järvinen
On Thu, 2 Nov 2023, Reinette Chatre wrote: > On 10/24/2023 2:26 AM, Ilpo Järvinen wrote: > > Add L2 CAT selftest. As measuring L2 misses is not easily available > > with perf, use L3 accesses as a proxy for L2 CAT working or not. > > I understand the exact measurement is not available but I do no

Re: [PATCH 24/24] selftests/resctrl: Ignore failures from L2 CAT test with <= 2 bits

2023-11-03 Thread Ilpo Järvinen
On Thu, 2 Nov 2023, Reinette Chatre wrote: > On 10/24/2023 2:26 AM, Ilpo Järvinen wrote: > > L2 CAT test with low number of bits tends to occasionally fail because > > of what seems random variation. The margin is quite small to begin with > > for <= 2 bits in CBM. At times, the result can even bec

Re: [PATCH 18/24] selftests/resctrl: Introduce generalized test framework

2023-11-03 Thread Ilpo Järvinen
On Thu, 2 Nov 2023, Reinette Chatre wrote: > On 10/24/2023 2:26 AM, Ilpo Järvinen wrote: > ... > > diff --git a/tools/testing/selftests/resctrl/resctrl.h > > b/tools/testing/selftests/resctrl/resctrl.h > > index ec6efd36f60a..e017adf1390d 100644 > > > @@ -233,25 +183,26 @@ int main(int argc, char

Re: [PATCH 10/24] selftests/resctrl: Remove nested calls in perf event handling

2023-11-03 Thread Ilpo Järvinen
On Thu, 2 Nov 2023, Reinette Chatre wrote: > Hi Ilpo, > > On 10/24/2023 2:26 AM, Ilpo Järvinen wrote: > > Perf event handling has functions that are the sole caller of another > > perf event handling related function: > > - reset_enable_llc_perf() calls perf_event_open_llc_miss() > > - reset_

Re: [PATCHv2 net] selftests: pmtu.sh: fix result checking

2023-11-03 Thread patchwork-bot+netdevbpf
Hello: This patch was applied to netdev/net.git (main) by David S. Miller : On Tue, 31 Oct 2023 11:47:32 +0800 you wrote: > In the PMTU test, when all previous tests are skipped and the new test > passes, the exit code is set to 0. However, the current check mistakenly > treats this as an assignm

Re: [PATCH 09/24] selftests/resctrl: Remove unnecessary __u64 -> unsigned long conversion

2023-11-03 Thread Ilpo Järvinen
On Thu, 2 Nov 2023, Reinette Chatre wrote: > On 10/24/2023 2:26 AM, Ilpo Järvinen wrote: > > Perf counters are __u64 but the code converts them to unsigned long > > before printing them out. > > > > Remove unnecessary type conversion and the potential loss of meaningful > > bits due to different s

Re: [PATCH 05/24] selftests/resctrl: Create cache_size() helper

2023-11-03 Thread Ilpo Järvinen
On Thu, 2 Nov 2023, Reinette Chatre wrote: > Hi Ilpo, > > On 10/24/2023 2:26 AM, Ilpo Järvinen wrote: > > CAT and CMT tests calculate the span size from the n-bits cache > > allocation on their own. > > > > Add cache_size() helper which calculates size of the cache portion for > > the given numb