[PATCH] cpufreq: amd-pstate: adjust min/max limit perf

2024-02-26 Thread Meng Li
The min/max limit perf values calculated based on frequency may exceed the reasonable range of perf(highest perf, lowest perf). Signed-off-by: Meng Li --- drivers/cpufreq/amd-pstate.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/cpufreq/amd-pstate.c

[PATCH v5 3/3] selftests/resctrl: Move cleanups out of individual tests

2024-02-26 Thread Maciej Wieczor-Retman
Every test calls its cleanup function at the end of it's test function. After the cleanup function pointer is added to the test framework this can be simplified to executing the callback function at the end of the generic test running function. Make test cleanup functions static and call them from

[PATCH v5 2/3] selftests/resctrl: Simplify cleanup in ctrl-c handler

2024-02-26 Thread Maciej Wieczor-Retman
Ctrl-c handler isn't aware of what test is currently running. Because of that it executes all cleanups even if they aren't necessary. Since the ctrl-c handler uses the sa_sigaction system no parameters can be passed to it as function arguments. Add a global variable to make ctrl-c handler aware of

[PATCH v5 1/3] selftests/resctrl: Add cleanup function to test framework

2024-02-26 Thread Maciej Wieczor-Retman
Resctrl selftests use very similar functions to cleanup after themselves. This creates a lot of code duplication. Also not being hooked to the test framework means that ctrl-c handler isn't aware of what test is currently running and executes all cleanups even though only one is needed. Add a func

[PATCH v5 0/3] selftests/resctrl: Simplify test cleanup functions

2024-02-26 Thread Maciej Wieczor-Retman
Cleaning up after tests is implemented separately for individual tests and called at the end of each test execution. Since these functions are very similar and a more generalized test framework was introduced a function pointer in the resctrl_test struct can be used to reduce the amount of function

[PATCH] cpufreq/amd-pstate: fix setting policy current frequency value

2024-02-26 Thread Meng Li
When scaling min/max freq values were being setted, the value of policy->cur need to update. Signed-off-by: Meng Li --- drivers/cpufreq/amd-pstate.c | 17 - 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/drivers/cpufreq/amd-pstate.c b/drivers/cpufreq/amd-pstate.c

Re: [PATCH] kunit: Setup DMA masks on the kunit device

2024-02-26 Thread David Gow
On Wed, 21 Feb 2024 at 20:53, Maxime Ripard wrote: > > Commit d393acce7b3f ("drm/tests: Switch to kunit devices") switched the > DRM device creation helpers from an ad-hoc implementation to the new > kunit device creation helpers introduced in commit d03c720e03bd ("kunit: > Add APIs for managing d

Re: [PATCH v4 4/5] KVM: selftests: aarch64: Introduce pmu_event_filter_test

2024-02-26 Thread Shaoqin Huang
Hi Oliver, On 2/2/24 16:34, Oliver Upton wrote: On Thu, Feb 01, 2024 at 09:56:53PM -0500, Shaoqin Huang wrote: Introduce pmu_event_filter_test for arm64 platforms. The test configures PMUv3 for a vCPU, and sets different pmu event filters for the vCPU, and check if the guest can see those event

Re: [PATCH net-next 0/8] mptcp: various small improvements

2024-02-26 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net-next.git (main) by Jakub Kicinski : On Fri, 23 Feb 2024 21:17:52 +0100 you wrote: > This series brings various small improvements to MPTCP and its > selftests: > > Patch 1 prints an error if there are duplicated subtests names. It is > important to ha

Re: [PATCH v4 1/5] KVM: selftests: aarch64: Make the [create|destroy]_vpmu_vm() public

2024-02-26 Thread Shaoqin Huang
Hi Oliver, On 2/2/24 15:36, Oliver Upton wrote: On Thu, Feb 01, 2024 at 09:56:50PM -0500, Shaoqin Huang wrote: [...] diff --git a/tools/testing/selftests/kvm/include/aarch64/vpmu.h b/tools/testing/selftests/kvm/include/aarch64/vpmu.h new file mode 100644 index ..0a56183644ee ---

Re: [PATCH net 00/10] mptcp: more misc. fixes for v6.8

2024-02-26 Thread patchwork-bot+netdevbpf
Hello: This series was applied to netdev/net.git (main) by Jakub Kicinski : On Fri, 23 Feb 2024 17:14:10 +0100 you wrote: > This series includes 6 types of fixes: > > - Patch 1 fixes v4 mapped in v6 addresses support for the userspace PM, > when asking to delete a subflow. It was done everywhe

Re: [PATCH v3 0/8] Use TAP in some more x86 KVM selftests

2024-02-26 Thread Sean Christopherson
On Thu, 08 Feb 2024 21:48:36 +0100, Thomas Huth wrote: > Basic idea of this series is now to use the kselftest_harness.h > framework to get TAP output in the tests, so that it is easier > for the user to see what is going on, and e.g. to be able to > detect whether a certain test is part of the tes

[PATCH 1/1] KVM: selftests: close the memfd in some gmem tests

2024-02-26 Thread Dongli Zhang
Add the missing close(fd) in guest_memfd_test.c and private_mem_conversions_test.c. Signed-off-by: Dongli Zhang --- tools/testing/selftests/kvm/guest_memfd_test.c | 3 +++ .../selftests/kvm/x86_64/private_mem_conversions_test.c| 2 ++ 2 files changed, 5 insertions(+) dif

Re: [PATCH 2/2] selftests: dmabuf-heap: add config file for the test

2024-02-26 Thread T.J. Mercier
On Mon, Feb 26, 2024 at 12:00 AM Muhammad Usama Anjum wrote: > > The config fragment enlists all the config options needed for the test. > This config is merged into the kernel's config on which this test is > run. > > Signed-off-by: Muhammad Usama Anjum > --- > tools/testing/selftests/dmabuf-he

Re: [PATCH 1/2] selftests/dmabuf-heap: conform test to TAP format output

2024-02-26 Thread T.J. Mercier
On Sun, Feb 25, 2024 at 11:59 PM Muhammad Usama Anjum wrote: > > Conform the layout, informational and status messages to TAP. No > functional change is intended other than the layout of output messages. > > Signed-off-by: Muhammad Usama Anjum > --- > .../selftests/dmabuf-heaps/dmabuf-heap.c

Re: [PATCH v4 0/3] selftests/resctrl: Simplify test cleanup functions

2024-02-26 Thread Reinette Chatre
Hi Maciej, On 2/26/2024 5:05 AM, Maciej Wieczor-Retman wrote: > Cleaning up after tests is implemented separately for individual tests > and called at the end of each test execution. Since these functions are > very similar and a more generalized test framework was introduced a > function pointer

Re: [PATCH net-next 03/10] net/tcp: Move tcp_inbound_hash() from headers

2024-02-26 Thread Dmitry Safonov
On Mon, Feb 26, 2024 at 8:43 PM Simon Horman wrote: > > On Sat, Feb 24, 2024 at 09:04:11AM +, Dmitry Safonov wrote: [..] > > + if (req) { > > + if (tcp_rsk_used_ao(req) != !!aoh) { > > + u8 keyid, rnext, maclen; > > + > > + if (aoh) { > >

[PATCH v5 8/8] mm: huge_memory: enable debugfs to split huge pages to any order.

2024-02-26 Thread Zi Yan
From: Zi Yan It is used to test split_huge_page_to_list_to_order for pagecache THPs. Also add test cases for split_huge_page_to_list_to_order via both debugfs. Signed-off-by: Zi Yan --- mm/huge_memory.c | 34 -- .../selftests/mm/split_huge_page_test.c |

[PATCH v5 7/8] mm: thp: split huge page to any lower order pages

2024-02-26 Thread Zi Yan
From: Zi Yan To split a THP to any lower order pages, we need to reform THPs on subpages at given order and add page refcount based on the new page order. Also we need to reinitialize page_deferred_list after removing the page from the split_queue, otherwise a subsequent split will see list corru

[PATCH v5 6/8] mm: page_owner: add support for splitting to any order in split page_owner.

2024-02-26 Thread Zi Yan
From: Zi Yan It adds a new_order parameter to set new page order in page owner. It prepares for upcoming changes to support split huge page to any lower order. Signed-off-by: Zi Yan --- include/linux/page_owner.h | 13 - mm/huge_memory.c | 2 +- mm/page_alloc.c

[PATCH v5 5/8] mm: memcg: make memcg huge page split support any order split.

2024-02-26 Thread Zi Yan
From: Zi Yan It sets memcg information for the pages after the split. A new parameter new_order is added to tell the order of subpages in the new page, always 0 for now. It prepares for upcoming changes to support split huge page to any lower order. Signed-off-by: Zi Yan Acked-by: David Hildenb

[PATCH v5 4/8] mm/page_owner: use order instead of nr in split_page_owner()

2024-02-26 Thread Zi Yan
From: Zi Yan We do not have non power of two pages, using nr is error prone if nr is not power-of-two. Use page order instead. Signed-off-by: Zi Yan Acked-by: David Hildenbrand --- include/linux/page_owner.h | 9 - mm/huge_memory.c | 2 +- mm/page_alloc.c| 4 ++--

[PATCH v5 3/8] mm/memcg: use order instead of nr in split_page_memcg()

2024-02-26 Thread Zi Yan
From: Zi Yan We do not have non power of two pages, using nr is error prone if nr is not power-of-two. Use page order instead. Signed-off-by: Zi Yan Acked-by: David Hildenbrand --- include/linux/memcontrol.h | 4 ++-- mm/huge_memory.c | 5 +++-- mm/memcontrol.c| 3 ++- m

[PATCH v5 2/8] mm: Support order-1 folios in the page cache

2024-02-26 Thread Zi Yan
From: "Matthew Wilcox (Oracle)" Folios of order 1 have no space to store the deferred list. This is not a problem for the page cache as file-backed folios are never placed on the deferred list. All we need to do is prevent the core MM from touching the deferred list for order 1 folios and remov

[PATCH v5 1/8] mm/huge_memory: only split PMD mapping when necessary in unmap_folio()

2024-02-26 Thread Zi Yan
From: Zi Yan As multi-size THP support is added, not all THPs are PMD-mapped, thus during a huge page split, there is no need to always split PMD mapping in unmap_folio(). Make it conditional. Signed-off-by: Zi Yan --- mm/huge_memory.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(

[PATCH v5 0/8] Split a folio to any lower order folios

2024-02-26 Thread Zi Yan
From: Zi Yan Hi all, File folio supports any order and multi-size THP is upstreamed[1], so both file and anonymous folios can be >0 order. Currently, split_huge_page() only splits a huge page to order-0 pages, but splitting to orders higher than 0 might better utilize large folios, if done prope

Re: [PATCH net-next 03/10] net/tcp: Move tcp_inbound_hash() from headers

2024-02-26 Thread Simon Horman
On Sat, Feb 24, 2024 at 09:04:11AM +, Dmitry Safonov wrote: > Two reasons: > 1. It's grown up enough > 2. In order to not do header spaghetti by including >, which is necessary for TCP tracepoints. > > Signed-off-by: Dmitry Safonov ... > diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c > in

Re: [PATCH 2/2] selftests/harness: Merge TEST_F_FORK() into TEST_F()

2024-02-26 Thread Mickaël Salaün
On Mon, Feb 26, 2024 at 11:04:12AM -0800, Kees Cook wrote: > On Mon, Feb 26, 2024 at 05:23:35PM +0100, Mickaël Salaün wrote: > > Remplace Landlock-specific TEST_F_FORK() with an improved TEST_F() which > > brings four related changes: > > > > Run TEST_F()'s tests in a grandchild process to make it

Re: [PATCH 2/2] selftests/harness: Merge TEST_F_FORK() into TEST_F()

2024-02-26 Thread Kees Cook
On Mon, Feb 26, 2024 at 05:23:35PM +0100, Mickaël Salaün wrote: > Remplace Landlock-specific TEST_F_FORK() with an improved TEST_F() which > brings four related changes: > > Run TEST_F()'s tests in a grandchild process to make it possible to > drop privileges and delegate teardown to the parent. >

Re: [PATCH 3/4] selftests/resctrl: Add support for MBM and MBA tests on AMD

2024-02-26 Thread Moger, Babu
Hi Reinette On 2/23/24 16:39, Reinette Chatre wrote: > Hi Babu, > > On 2/23/2024 11:47 AM, Moger, Babu wrote: >> On 2/23/24 13:30, Moger, Babu wrote: >>> On 2/23/24 04:53, Ilpo Järvinen wrote: On Thu, 22 Feb 2024, Babu Moger wrote: > @@ -131,8 +130,7 @@ static void run_mba_test(const cha

Re: [PATCH net 10/10] selftests: mptcp: explicitly trigger the listener diag code-path

2024-02-26 Thread Simon Horman
On Fri, Feb 23, 2024 at 05:14:20PM +0100, Matthieu Baerts (NGI0) wrote: > From: Paolo Abeni > > The mptcp diag interface already experienced a few locking bugs > that lockdep and appropriate coverage have detected in advance. > > Let's add a test-case triggering the relevant code path, to preven

Re: [PATCH v2] selftests/ftrace: Limit length in subsystem-enable tests

2024-02-26 Thread Steven Rostedt
On Mon, 26 Feb 2024 15:09:38 +0900 Masami Hiramatsu (Google) wrote: > On Mon, 26 Feb 2024 11:18:16 +0800 > Yuanhe Shu wrote: > > > While sched* events being traced and sched* events continuously happen, > > "[xx] event tracing - enable/disable with subsystem level files" would > > not stop as o

Re: [PATCH net-next v3 00/11] selftests: kselftest_harness: support using xfail

2024-02-26 Thread Jakub Kicinski
On Mon, 26 Feb 2024 17:27:34 +0100 Mickaël Salaün wrote: > > would you be able to take a look at those changes? landlock seems to be > > the sole user of the "no_print" functionality in the selftest harness. > > If the patches look good I'll create a branch based on Linus's tree > > so that anyone

[PATCH 2/2] selftests/harness: Merge TEST_F_FORK() into TEST_F()

2024-02-26 Thread Mickaël Salaün
Remplace Landlock-specific TEST_F_FORK() with an improved TEST_F() which brings four related changes: Run TEST_F()'s tests in a grandchild process to make it possible to drop privileges and delegate teardown to the parent. Compared to TEST_F_FORK(), simplify handling of the test grandchild proces

[PATCH 1/2] selftests/landlock: Redefine TEST_F() as TEST_F_FORK()

2024-02-26 Thread Mickaël Salaün
This has the effect of creating a new test process for either TEST_F() or TEST_F_FORK(), which doesn't change tests but will ease potential backports. See next commit for the TEST_F_FORK() merge into TEST_F(). Cc: Günther Noack Cc: Jakub Kicinski Cc: Kees Cook Cc: Shuah Khan Cc: Will Drewry

Re: [PATCH net-next v3 00/11] selftests: kselftest_harness: support using xfail

2024-02-26 Thread Mickaël Salaün
On Fri, Feb 23, 2024 at 04:02:59PM -0800, Jakub Kicinski wrote: > On Tue, 20 Feb 2024 11:22:24 -0800 Jakub Kicinski wrote: > > When running selftests for our subsystem in our CI we'd like all > > tests to pass. Currently some tests use SKIP for cases they > > expect to fail, because the kselftest_h

[PATCH 0/2] Merge TEST_F_FORK() into TEST_F()

2024-02-26 Thread Mickaël Salaün
Hi, This is a long due cleanup to merge TEST_F_FORK() into TEST_F(). This should simplify Jakub's patches by removing the step counter: https://lore.kernel.org/r/20240220192235.2953484-1-k...@kernel.org Regards, Mickaël Salaün (2): selftests/landlock: Redefine TEST_F() as TEST_F_FORK() self

Re: kselftest/next kselftest-livepatch: 1 runs, 1 regressions (v6.8-rc1-53-gae638551ab64a)

2024-02-26 Thread Marcos Paulo de Souza
On Fri, 23 Feb 2024 21:59:44 -0800 (PST) "kernelci.org bot" wrote: > kselftest/next kselftest-livepatch: 1 runs, 1 regressions > (v6.8-rc1-53-gae638551ab64a) > > Regressions Summary > --- > > platform| arch | lab | compiler | defconfig >|

Re: [PATCH] kunit: Setup DMA masks on the kunit device

2024-02-26 Thread Guenter Roeck
On Wed, Feb 21, 2024 at 01:53:24PM +0100, Maxime Ripard wrote: > Commit d393acce7b3f ("drm/tests: Switch to kunit devices") switched the > DRM device creation helpers from an ad-hoc implementation to the new > kunit device creation helpers introduced in commit d03c720e03bd ("kunit: > Add APIs for m

[PATCH v4 0/3] selftests/resctrl: Simplify test cleanup functions

2024-02-26 Thread Maciej Wieczor-Retman
Cleaning up after tests is implemented separately for individual tests and called at the end of each test execution. Since these functions are very similar and a more generalized test framework was introduced a function pointer in the resctrl_test struct can be used to reduce the amount of function

[PATCH v4 3/3] selftests/resctrl: Move cleanups out of individual tests

2024-02-26 Thread Maciej Wieczor-Retman
Every test calls its cleanup function at the end of it's test function. After the cleanup function pointer is added to the test framework this can be simplified to executing the callback function at the end of the generic test running function. Make test cleanup functions static and call them from

[PATCH v4 2/3] selftests/resctrl: Simplify cleanup in ctrl-c handler

2024-02-26 Thread Maciej Wieczor-Retman
Ctrl-c handler isn't aware of what test is currently running. Because of that it executes all cleanups even if they aren't necessary. Since the ctrl-c handler uses the sa_sigaction system no parameters can be passed to it as function arguments. Add a global variable to make ctrl-c handler aware of

[PATCH v4 1/3] selftests/resctrl: Add cleanup function to test framework

2024-02-26 Thread Maciej Wieczor-Retman
Resctrl selftests use very similar functions to cleanup after themselves. This creates a lot of code duplication. Also not being hooked to the test framework means that ctrl-c handler isn't aware of what test is currently running and executes all cleanups even though only one is needed. Add a func

Re: [PATCH v3] kselftest: Add basic test for probing the rust sample modules

2024-02-26 Thread Laura Nao
Hi Shuah, On 2/23/24 23:02, Shuah Khan wrote: > On 2/23/24 14:48, Shuah Khan wrote: >> On 2/22/24 09:29, Laura Nao wrote: >>> Add new basic kselftest that checks if the available rust sample modules >>> can be added and removed correctly. >>> >>> Signed-off-by: Laura Nao >>> Reviewed-by: Sergio G

[PATCH v4] kselftest: Add basic test for probing the rust sample modules

2024-02-26 Thread Laura Nao
Add new basic kselftest that checks if the available rust sample modules can be added and removed correctly. Signed-off-by: Laura Nao Reviewed-by: Sergio Gonzalez Collado Reviewed-by: Muhammad Usama Anjum --- Depends on: - https://lore.kernel.org/all/20240102141528.169947-1-laura@collabora

Re: [PATCH v3 2/3] selftests/resctrl: Simplify cleanup in ctrl-c handler

2024-02-26 Thread Maciej Wieczor-Retman
On 2024-02-23 at 13:18:22 -0800, Reinette Chatre wrote: >Hi Maciej, > >On 2/22/2024 4:07 AM, Maciej Wieczor-Retman wrote: > } >> diff --git a/tools/testing/selftests/resctrl/resctrl_val.c >> b/tools/testing/selftests/resctrl/resctrl_val.c >> index 5a49f07a6c85..0134aa2f896a 100644 >> --- a/t

Re: [PATCH v3 3/3] selftests/resctrl: Move cleanups out of individual tests

2024-02-26 Thread Maciej Wieczor-Retman
On 2024-02-23 at 13:18:32 -0800, Reinette Chatre wrote: >Hi Maciej, > >On 2/22/2024 4:07 AM, Maciej Wieczor-Retman wrote: >> diff --git a/tools/testing/selftests/resctrl/resctrl_tests.c >> b/tools/testing/selftests/resctrl/resctrl_tests.c >> index 161f5365b4f0..bae08d1221ec 100644 >> --- a/tools/t

Re: [PATCH v6 0/5] selftests/resctrl: Add non-contiguous CBMs in Intel CAT selftest

2024-02-26 Thread Maciej Wieczor-Retman
Hi Shuah, On 2024-02-23 at 15:37:11 -0700, Shuah Khan wrote: > >Hi Reinette, > >Okay ran a quick test. Why does this test leave "/sys/fs/resctrl" >mounted when it exits. Can we fix this to unmount before the test >exits? I also wasn't able to reproduce this unmounting issue: - with unmounted resc

[PATCH 2/2] selftests: dmabuf-heap: add config file for the test

2024-02-26 Thread Muhammad Usama Anjum
The config fragment enlists all the config options needed for the test. This config is merged into the kernel's config on which this test is run. Signed-off-by: Muhammad Usama Anjum --- tools/testing/selftests/dmabuf-heaps/config | 4 1 file changed, 4 insertions(+) create mode 100644 tool