Re: [PATCH 1/2] sched: force update of blocked load of idle cpus

2017-11-10 Thread Brendan Jackman
Hi Todd, On Thu, Nov 09 2017 at 19:56, Todd Kjos wrote: >> @@ -8683,6 +8692,10 @@ static void nohz_balancer_kick(void) >> >> if (test_and_set_bit(NOHZ_BALANCE_KICK, nohz_flags(ilb_cpu))) >> return; >> + >> + if (only_update) >> + set_bit(NOHZ_STATS_KICK

Re: [PATCH 1/2] sched: force update of blocked load of idle cpus

2017-11-30 Thread Brendan Jackman
Hi Vincent, On Mon, Nov 20 2017 at 09:04, Vincent Guittot wrote: > On 24 October 2017 at 14:25, Brendan Jackman wrote: >> @@ -9062,7 +9109,12 @@ static __latent_entropy void >> run_rebalance_domains(struct softirq_action *h) >> * and abort nohz_idle_balance altog

Re: [PATCH] kunit: tool: Use qboot on QEMU x86_64

2025-01-31 Thread Brendan Jackman
On Fri, 31 Jan 2025 at 09:45, David Gow wrote: > One future idea would be to look into microvms, which might be even > faster. I'll give myself a TODO to experiment with those. Yeah, that would be cool although I think they require CONFIG_PARAVIRT which isn't an entirely negligible constraint. St

[PATCH] selftests/run_kselftest.sh: Fix help string for --per-test-log

2024-12-20 Thread Brendan Jackman
This is documented as --per_test_log but the argument is actually --per-test-log. Signed-off-by: Brendan Jackman --- tools/testing/selftests/run_kselftest.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/testing/selftests/run_kselftest.sh b/tools/testing/selftests

[PATCH] kunit: tool: Build GDB scripts

2025-01-21 Thread Brendan Jackman
at is just the overhead of running Kbuild at all, actually building the scripts is approximately free. Note also, to actually get the GDB scripts the user needs to enable CONFIG_SCRIPTS_GDB, but building the scripts_gdb target without that is still harmless. Signed-off-by: Brendan Jackman --- too

[PATCH] kunit: tool: Use qboot on QEMU x86_64

2025-01-24 Thread Brendan Jackman
https://lore.kernel.org/all/ca+i-1c0wyb-gz8mwh3wsvpbk-lf-uo+njvbasjpe1wxduro...@mail.gmail.com/ Both SeaBIOS and qboot are x86-specific. Signed-off-by: Brendan Jackman --- tools/testing/kunit/qemu_configs/x86_64.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/te

[PATCH v2 0/9] selftests/mm: Some cleanups from trying to run them

2025-02-21 Thread Brendan Jackman
serfaultfd-log Signed-off-by: Brendan Jackman --- Changes in v2 (Thanks to Dev for the reviews): - Improve and cleanup some error messages - Add some extra SKIPs - Fix misnaming of nr_cpus variable in uffd tests - Link to v1: https://lore.kernel.org/r/20250220-mm-selftests-v1-0-9bbf57d64...@

[PATCH v2 2/9] selftests/mm: Fix assumption that sudo is present

2025-02-21 Thread Brendan Jackman
l fails if that file doesn't exist, but in that case the test is still fine, so this just prints an error but doesn't break anything. I suspect that's probably deliberate. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/run_vmtests.sh | 22 ++ 1 fi

[PATCH v2 8/9] selftests/mm: Skip map_populate on weird filesystems

2025-02-21 Thread Brendan Jackman
It seems that 9pfs does not allow truncating unlinked files, Mark Brown has noted that NFS may also behave this way. It doesn't seem quite right to call this a "bug" but it's probably a special enough case that it makes sense for the test to just SKIP if it happens. Si

[PATCH v2 6/9] selftests/mm: Print some details when uffd-stress gets bad params

2025-02-21 Thread Brendan Jackman
So this can be debugged more easily. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/uffd-stress.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/mm/uffd-stress.c b/tools/testing/selftests/mm/uffd-stress.c index

[PATCH v2 9/9] selftests/mm: Skip gup_longerm tests on weird filesystems

2025-02-21 Thread Brendan Jackman
Some filesystems don't support funtract()ing unlinked files. They return ENOENT. In that case, skip the test. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/gup_longterm.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftes

[PATCH v2 5/9] selftests/mm/uffd: Rename nr_cpus -> nr_threads

2025-02-21 Thread Brendan Jackman
A later commit will bound this variable so it no longer necessarily matches the number of CPUs. Rename it appropriately. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/uffd-common.c | 8 tools/testing/selftests/mm/uffd-common.h | 2 +- tools/testing/selftests

[PATCH v2 4/9] selftests/mm: Skip uffd-wp-mremap if userfaultfd not available

2025-02-21 Thread Brendan Jackman
It's obvious that this should fail in that case, but still, save the reader the effort of figuring out that they've run into this by just SKIPping Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/uffd-wp-mremap.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-)

[PATCH v2 1/9] selftests/mm: Report errno when things fail in gup_longterm

2025-02-21 Thread Brendan Jackman
Just reporting failure doesn't tell you what went wrong. This can fail in different ways so report errno to help the reader get started debugging. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/gup_longterm.c | 37 ++- 1 file changed, 21 inser

[PATCH v2 7/9] selftests/mm: Don't fail uffd-stress if too many CPUs

2025-02-21 Thread Brendan Jackman
This calculation divides a fixed parameter by an environment-dependent parameter i.e. the number of CPUs. The simple way to avoid machine-specific failures here is to just put a cap on the max value of the latter. Suggested-by: Mateusz Guzik Signed-off-by: Brendan Jackman --- tools/testing

[PATCH v2 3/9] selftests/mm: Skip uffd-stress if userfaultfd not available

2025-02-21 Thread Brendan Jackman
It's pretty obvious that the test wouldn't work if you don't have the feature enabled. But, it's still useful to SKIP instead of failing so the reader can immediately tell that this is the reason why. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/uffd-stres

[PATCH 2/6] selftests/mm: Fix assumption that sudo is present

2025-02-20 Thread Brendan Jackman
l fails if that file doesn't exist, but in that case the test is still fine, so this just prints an error but doesn't break anything. I suspect that's probably deliberate. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/run_vmtests.sh | 22 ++ 1 fi

Re: [PATCH v2 8/9] selftests/mm: Skip map_populate on weird filesystems

2025-02-24 Thread Brendan Jackman
On Fri, 21 Feb 2025 at 19:26, Brendan Jackman wrote: > > It seems that 9pfs does not allow truncating unlinked files, Mark Brown > has noted that NFS may also behave this way. I have not investigated at all but I _think_ over the weekend I saw ftruncate() failure on a QEMU guest where

[PATCH RFC 4/4] mm/page_alloc_test: Add smoke-test for page allocation

2025-02-24 Thread Brendan Jackman
ssertions we can make by judicously peeking at allocator internals. Signed-off-by: Brendan Jackman --- mm/page_alloc_test.c | 139 ++- 1 file changed, 138 insertions(+), 1 deletion(-) diff --git a/mm/page_alloc_test.c b/mm/page_all

[PATCH RFC 0/4] mm: KUnit tests for the page allocator

2025-02-24 Thread Brendan Jackman
re so we should probably have some confidence that they will indeed come. [0] https://lore.kernel.org/linux-mm/20250129144320.2675822-1-jackm...@google.com/ Signed-off-by: Brendan Jackman --- Brendan Jackman (4): kunit: Allocate assertion data with GFP_ATOMIC mm/page_alloc_test: Add

[PATCH RFC 2/4] mm/page_alloc_test: Add empty KUnit boilerplate

2025-02-24 Thread Brendan Jackman
Add the Kbuild plumbing to create a new KUnit suite. Create the suite, with no tests inside it. Signed-off-by: Brendan Jackman --- mm/.kunitconfig | 2 ++ mm/Kconfig | 8 mm/Makefile | 2 ++ mm/page_alloc_test.c | 21 + 4 files changed, 33

[PATCH RFC 1/4] kunit: Allocate assertion data with GFP_ATOMIC

2025-02-24 Thread Brendan Jackman
memory reserves, instead it should be only used when truly needed. However, for test code that should not be expected to run in production systems it seems tolerable, given that it avoids creating more complex APIs. Signed-off-by: Brendan Jackman --- lib/kunit/assert.c | 2 +- lib/kunit/resourc

[PATCH RFC 3/4] mm/page_alloc_test: Add logic to isolate a node for testing

2025-02-24 Thread Brendan Jackman
g out some memory and then plug it back in to the isolated node. The node can then be used for testing. Because it's easy to miss code that needs enlightenment, which can lead to confusing test behaviour, also add some defensive checks to try and interference with the isolated node before the

[PATCH 5/6] selftests/mm: Print some details when uffd-stress gets bad params

2025-02-20 Thread Brendan Jackman
So this can be debugged more easily. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/uffd-stress.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/mm/uffd-stress.c b/tools/testing/selftests/mm/uffd-stress.c index

[PATCH 3/6] selftests/mm: Skip uffd-stress if userfaultfd not available

2025-02-20 Thread Brendan Jackman
It's pretty obvious that the test wouldn't work if you don't have the feature enabled. But, it's still useful to SKIP instead of failing so the reader can immediately tell that this is the reason why. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/uffd-stres

[PATCH 1/6] selftests/mm: Report errno when things fail

2025-02-20 Thread Brendan Jackman
Just reporting failure doesn't tell you what went wrong. This can fail in different ways so report errno to help the reader get started debugging. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/gup_longterm.c | 32 +++ 1 file changed, 16 inser

[PATCH 0/6] selftests/mm: Some cleanups from trying to run them

2025-02-20 Thread Brendan Jackman
, userfaultfd and memfd_secret. Signed-off-by: Brendan Jackman --- Brendan Jackman (6): selftests/mm: Report errno when things fail selftests/mm: Fix assumption that sudo is present selftests/mm: Skip uffd-stress if userfaultfd not available selftests/mm: Skip uffd-wp-mremap if

[PATCH 4/6] selftests/mm: Skip uffd-wp-mremap if userfaultfd not available

2025-02-20 Thread Brendan Jackman
It's obvious that this should fail in that case, but still, save the reader the effort of figuring out that they've run into this by just SKIPping Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/uffd-wp-mremap.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-)

[PATCH 6/6] selftests/mm: Don't fail uffd-stress if too many CPUs

2025-02-20 Thread Brendan Jackman
This calculation divides a fixed parameter by an environment-dependent parameter i.e. the number of CPUs. The simple way to avoid machine-specific failures here is to just put a cap on the max value of the latter. Suggested-by: Mateusz Guzik Signed-off-by: Brendan Jackman --- tools/testing

Re: [PATCH 5/6] selftests/mm: Print some details when uffd-stress gets bad params

2025-02-20 Thread Brendan Jackman
On Thu, 20 Feb 2025 at 16:03, Brendan Jackman wrote: > nr_pages_per_cpu = bytes / page_size / nr_cpus; > if (!nr_pages_per_cpu) { > - _err("invalid MiB"); > + _err("invalid MiB %lu (%lu / %lu / %lu)", > +

Re: [PATCH 6/6] selftests/mm: Don't fail uffd-stress if too many CPUs

2025-02-20 Thread Brendan Jackman
On Thu, 20 Feb 2025 at 16:55, Brendan Jackman wrote: > > On Thu, 20 Feb 2025 at 16:48, Dev Jain wrote: > > > > > > > > On 20/02/25 8:33 pm, Brendan Jackman wrote: > > > This calculation divides a fixed parameter by an environment-dependent > > > pa

Re: [PATCH 6/6] selftests/mm: Don't fail uffd-stress if too many CPUs

2025-02-20 Thread Brendan Jackman
On Thu, 20 Feb 2025 at 16:48, Dev Jain wrote: > > > > On 20/02/25 8:33 pm, Brendan Jackman wrote: > > This calculation divides a fixed parameter by an environment-dependent > > parameter i.e. the number of CPUs. > > > > The simple way to avoid machine-spe

Re: [PATCH 3/6] selftests/mm: Skip uffd-stress if userfaultfd not available

2025-02-20 Thread Brendan Jackman
On Thu, 20 Feb 2025 at 19:06, Dev Jain wrote: > > - if (uffd_get_features(&features)) > > - err("failed to get available features"); > > + if (uffd_get_features(&features) && errno == ENOENT) > > + ksft_exit_skip("failed to get avialable features (%d)\n", > > errno

Re: [PATCH RFC 4/4] mm/page_alloc_test: Add smoke-test for page allocation

2025-02-26 Thread Brendan Jackman
On Mon, 24 Feb 2025 at 15:47, Brendan Jackman wrote: > +static inline struct page *alloc_pages_force_nid(struct kunit *test, > +gfp_t gfp, int order, int > nid) > +{ > + NODEMASK_ALLOC(nodemask_t, nodemask, GFP_KERNEL); > +

Re: [PATCH RFC 3/4] mm/page_alloc_test: Add logic to isolate a node for testing

2025-02-26 Thread Brendan Jackman
On Tue, 25 Feb 2025 at 12:20, Brendan Jackman wrote: > > On Mon, 24 Feb 2025 at 19:34, Yosry Ahmed wrote: > > > +#ifdef CONFIG_KUNIT > > > > Why not CONFIG_PAGE_ALLOC_KUNIT_TEST? > > VISIBLE_IF_KUNIT is paired with #ifdef CONFIG_KUNIT elsewhere (I think > ther

Re: [PATCH RFC 0/4] mm: KUnit tests for the page allocator

2025-02-26 Thread Brendan Jackman
On Wed, 26 Feb 2025 at 12:52, David Hildenbrand wrote: > > > It seems possible that very little mm code cares if the memory we're > > managing actually exists. (For ASI code we did briefly experiment with > > tracking information about free pages in the page itself, but it's > > pretty sketchy an

Re: [PATCH RFC 0/4] mm: KUnit tests for the page allocator

2025-02-25 Thread Brendan Jackman
On Tue, Feb 25, 2025 at 11:01:47AM +0100, David Hildenbrand wrote: > > This is an RFC and not a PATCH because: > > > > 1. I have not taken much care to ensure the isolation is complete. > > There are probably sources of flakiness and nondeterminism in here. > > > > 2. I suspect the the basic

Re: [PATCH RFC 3/4] mm/page_alloc_test: Add logic to isolate a node for testing

2025-02-25 Thread Brendan Jackman
On Mon, 24 Feb 2025 at 19:34, Yosry Ahmed wrote: > > +#ifdef CONFIG_KUNIT > > Why not CONFIG_PAGE_ALLOC_KUNIT_TEST? VISIBLE_IF_KUNIT is paired with #ifdef CONFIG_KUNIT elsewhere (I think there might even be docs that do this in an example) so I just followed the pattern. #ifdef CONFIG_KUNIT -> t

Re: [PATCH RFC 4/4] mm/page_alloc_test: Add smoke-test for page allocation

2025-02-25 Thread Brendan Jackman
On Mon, 24 Feb 2025 at 19:26, Yosry Ahmed wrote: > > +static void action_nodemask_free(void *ctx) > > +{ > > + NODEMASK_FREE(ctx); > > +} > > + > > +/* > > + * Call __alloc_pages_noprof with a nodemask containing only the nid. > > + * > > + * Never returns NULL. > > + */ > > +static inline str

Re: [PATCH v2 8/9] selftests/mm: Skip map_populate on weird filesystems

2025-02-27 Thread Brendan Jackman
On Mon, 24 Feb 2025 at 11:25, Brendan Jackman wrote: > > On Fri, 21 Feb 2025 at 19:26, Brendan Jackman wrote: > > > > It seems that 9pfs does not allow truncating unlinked files, Mark Brown > > has noted that NFS may also behave this way. > > I have not investigated

[PATCH v3 03/10] selftests/mm: Skip uffd-wp-mremap if userfaultfd not available

2025-03-02 Thread Brendan Jackman
It's obvious that this should fail in that case, but still, save the reader the effort of figuring out that they've run into this by just SKIPping Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/uffd-wp-mremap.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-)

[PATCH v3 08/10] selftests/mm: Skip gup_longerm tests on weird filesystems

2025-03-01 Thread Brendan Jackman
Some filesystems don't support funtract()ing unlinked files. They return ENOENT. In that case, skip the test. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/gup_longterm.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftes

Re: [PATCH v3 03/10] selftests/mm: Skip uffd-wp-mremap if userfaultfd not available

2025-03-03 Thread Brendan Jackman
On Fri, Feb 28, 2025 at 10:55:00PM +0530, Dev Jain wrote: > > > On 28/02/25 10:24 pm, Brendan Jackman wrote: > > It's obvious that this should fail in that case, but still, save the > > reader the effort of figuring out that they've run into this by just >

Re: [PATCH v3 04/10] selftests/mm/uffd: Rename nr_cpus -> nr_threads

2025-03-03 Thread Brendan Jackman
On Fri, Feb 28, 2025 at 11:06:35PM +0530, Dev Jain wrote: > Taking a cursory look at the test, it creates three threads for each cpu. > The bounding of the variable is fine but that being the reason to rename the > variable is not making sense to me. Hmm yeah the name needs to be more abstract. Do

Re: [PATCH v3 04/10] selftests/mm/uffd: Rename nr_cpus -> nr_threads

2025-03-03 Thread Brendan Jackman
On Mon, Mar 03, 2025 at 03:48:38PM +0530, Dev Jain wrote: > > > On 03/03/25 3:17 pm, Brendan Jackman wrote: > > On Fri, Feb 28, 2025 at 11:06:35PM +0530, Dev Jain wrote: > > > Taking a cursory look at the test, it creates three threads for each cpu. > > > The bou

[PATCH v3 04/10] selftests/mm/uffd: Rename nr_cpus -> nr_threads

2025-03-03 Thread Brendan Jackman
A later commit will bound this variable so it no longer necessarily matches the number of CPUs. Rename it appropriately. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/uffd-common.c | 8 tools/testing/selftests/mm/uffd-common.h | 2 +- tools/testing/selftests

Re: [PATCH v2] kunit: tool: Fix bug in parsing test plan

2025-03-07 Thread Brendan Jackman
On Thu, 6 Mar 2025 at 19:20, Rae Moar wrote: > > A bug was identified where the KTAP below caused an infinite loop: > > TAP version 13 > ok 4 test_case > 1..4 > > The infinite loop was caused by the parser not parsing a test plan > if following a test result line. > > Fix this bug to correctly

Re: [PATCH] kunit: tool: Fix bug in parsing test plan

2025-03-06 Thread Brendan Jackman
On Thu, 6 Mar 2025 at 10:00, David Gow wrote: > > On Thu, 6 Mar 2025 at 08:29, Rae Moar wrote: > > > > A bug was identified where the KTAP below caused an infinite loop: > > > > TAP version 13 > > ok 4 test_case > > 1..4 > > > > The infinite loop was caused by the parser not parsing a test pla

Re: [PATCH v3 08/10] selftests/mm: Skip gup_longerm tests on weird filesystems

2025-03-06 Thread Brendan Jackman
On Thu, Mar 06, 2025 at 10:28:09AM +0100, David Hildenbrand wrote: > On 28.02.25 17:54, Brendan Jackman wrote: > > Some filesystems don't support funtract()ing unlinked files. They return > > ENOENT. In that case, skip the test. > > > > That's not documented

Re: [PATCH v3 08/10] selftests/mm: Skip gup_longerm tests on weird filesystems

2025-03-11 Thread Brendan Jackman
On Thu, 6 Mar 2025 at 15:40, David Hildenbrand wrote: > Yes, just skip 9pfs early, and mention in the commit message that 9pfs > has a history of being probematic with "use-after-unlink", maybe > mentioning the discussion I linked above. > > Maybe something like this would work? > > diff --git a/t

[PATCH v4 05/12] selftests/mm: Print some details when uffd-stress gets bad params

2025-03-11 Thread Brendan Jackman
So this can be debugged more easily. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/uffd-stress.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/mm/uffd-stress.c b/tools/testing/selftests/mm/uffd-stress.c index

[PATCH v4 00/12] selftests/mm: Some cleanups from trying to run them

2025-03-11 Thread Brendan Jackman
9abb9c99d8787c/README.md Hopefully that will eventually offer a way to provide a "canned" environment where the tests are known to work, which can be fairly easily reproduced by any developer. Signed-off-by: Brendan Jackman --- Changes in v4: - NOT ADDRESSED: still using errno==ENOENT

[PATCH v4 03/12] selftests/mm: Skip uffd-wp-mremap if userfaultfd not available

2025-03-11 Thread Brendan Jackman
It's obvious that this should fail in that case, but still, save the reader the effort of figuring out that they've run into this by just SKIPping Reviewed-by: Dev Jain Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/uffd-wp-mremap.c | 5 - 1 file changed, 4 insert

[PATCH v4 01/12] selftests/mm: Report errno when things fail in gup_longterm

2025-03-11 Thread Brendan Jackman
Just reporting failure doesn't tell you what went wrong. This can fail in different ways so report errno to help the reader get started debugging. Reviewed-by: Dev Jain Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/gup_longterm.c | 37 ++- 1

[PATCH v4 06/12] selftests/mm: Don't fail uffd-stress if too many CPUs

2025-03-11 Thread Brendan Jackman
This calculation divides a fixed parameter by an environment-dependent parameter i.e. the number of CPUs. The simple way to avoid machine-specific failures here is to just put a cap on the max value of the latter. Suggested-by: Mateusz Guzik Signed-off-by: Brendan Jackman --- tools/testing

[PATCH v4 04/12] selftests/mm/uffd: Rename nr_cpus -> nr_parallel

2025-03-11 Thread Brendan Jackman
A later commit will bound this variable so it no longer necessarily matches the number of CPUs. Rename it appropriately. Reviewed-by: Dev Jain Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/uffd-common.c | 8 tools/testing/selftests/mm/uffd-common.h | 2

[PATCH v4 07/12] selftests/mm: Skip map_populate on weird filesystems

2025-03-11 Thread Brendan Jackman
It seems that 9pfs does not allow truncating unlinked files, Mark Brown has noted that NFS may also behave this way. It doesn't seem quite right to call this a "bug" but it's probably a special enough case that it makes sense for the test to just SKIP if it happens. Si

[PATCH v4 08/12] selftests/mm: Skip gup_longterm tests on weird filesystems

2025-03-11 Thread Brendan Jackman
Some filesystems don't support ftruncate()ing unlinked files. They return ENOENT. In that case, skip the test. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/gup_longterm.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftes

[PATCH v4 09/12] selftests/mm: Drop unnecessary sudo usage

2025-03-11 Thread Brendan Jackman
This script must be run as root anyway (see all the writing to privileged files in /proc etc). Remove the unnecessary use of sudo to avoid breaking on single-user systems that don't have sudo. This also avoids confusing readers. Reviewed-by: Dev Jain Signed-off-by: Brendan Jackman ---

[PATCH v4 10/12] selftests/mm: Ensure uffd-wp-mremap gets pages of each size

2025-03-11 Thread Brendan Jackman
This test allocates a page of every available size and doesn't have any SKIP logic if the allocation fails. So, ensure it's available and skip the test if we can't do so. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/run_vmtests.sh | 23 ++-

[PATCH v4 12/12] selftests/mm/mlock: Print error on failure

2025-03-11 Thread Brendan Jackman
It's not really possible to start diagnosing this without knowing the actual error. Also update the mlock2 helper to behave like libc would by setting errno and returning -1. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/mlock-random-test.c | 4 ++-- tools/testing/selftes

[PATCH v4 11/12] selftests/mm: Skip mlock tests if nobody user can't read it

2025-03-11 Thread Brendan Jackman
cript can't safely fix that, just skip if it happens. Note that the stderr of the `ls` command is unfiltered meaning the user sees a "permission denied" error that can help inform them why the test was skipped. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/run_vmtes

[PATCH v4 02/12] selftests/mm: Skip uffd-stress if userfaultfd not available

2025-03-11 Thread Brendan Jackman
It's pretty obvious that the test wouldn't work if you don't have the feature enabled. But, it's still useful to SKIP instead of failing so the reader can immediately tell that this is the reason why. Reviewed-by: Dev Jain Signed-off-by: Brendan Jackman --- tools/testi

[PATCH v3 09/10] selftests/mm: Drop unnecessary sudo usage

2025-02-28 Thread Brendan Jackman
This script must be run as root anyway (see all the writing to privileged files in /proc etc). Remove the unnecessary use of sudo to avoid breaking on single-user systems that don't have sudo. This also avoids confusing readers. Signed-off-by: Brendan Jackman --- tools/testing/selftes

[PATCH v3 00/10] selftests/mm: Some cleanups from trying to run them

2025-02-28 Thread Brendan Jackman
run these test groups successfully: - mmap - gup_test - compaction - migration - page_frag - userfaultfd Signed-off-by: Brendan Jackman --- Changes in v3: - Added fix for userfaultfd tests. - Dropped attempts to use sudo. - Fixed garbage printf in uffd-stress. (Added EXTRA_CFLAGS=-Werror FORCE_

[PATCH v3 02/10] selftests/mm: Skip uffd-stress if userfaultfd not available

2025-02-28 Thread Brendan Jackman
It's pretty obvious that the test wouldn't work if you don't have the feature enabled. But, it's still useful to SKIP instead of failing so the reader can immediately tell that this is the reason why. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/uffd-stres

[PATCH v3 07/10] selftests/mm: Skip map_populate on weird filesystems

2025-02-28 Thread Brendan Jackman
It seems that 9pfs does not allow truncating unlinked files, Mark Brown has noted that NFS may also behave this way. It doesn't seem quite right to call this a "bug" but it's probably a special enough case that it makes sense for the test to just SKIP if it happens. Si

[PATCH v3 06/10] selftests/mm: Don't fail uffd-stress if too many CPUs

2025-02-28 Thread Brendan Jackman
This calculation divides a fixed parameter by an environment-dependent parameter i.e. the number of CPUs. The simple way to avoid machine-specific failures here is to just put a cap on the max value of the latter. Suggested-by: Mateusz Guzik Signed-off-by: Brendan Jackman --- tools/testing

[PATCH v3 01/10] selftests/mm: Report errno when things fail in gup_longterm

2025-02-28 Thread Brendan Jackman
Just reporting failure doesn't tell you what went wrong. This can fail in different ways so report errno to help the reader get started debugging. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/gup_longterm.c | 37 ++- 1 file changed, 21 inser

[PATCH v3 05/10] selftests/mm: Print some details when uffd-stress gets bad params

2025-02-28 Thread Brendan Jackman
So this can be debugged more easily. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/uffd-stress.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/mm/uffd-stress.c b/tools/testing/selftests/mm/uffd-stress.c index

[PATCH v3 10/10] selftests/mm: Ensure uffd-wp-mremap gets pages of each size

2025-02-28 Thread Brendan Jackman
This test allocates a page of every available size and doesn't have any SKIP logic if the allocation fails. So, ensure it's available and skip the test if we can't do so. Signed-off-by: Brendan Jackman --- tools/testing/selftests/mm/run_vmtests.sh | 23 ++-

Re: [PATCH v2 6/9] selftests/mm: Print some details when uffd-stress gets bad params

2025-02-28 Thread Brendan Jackman
On Fri, 21 Feb 2025 at 19:26, Brendan Jackman wrote: > nr_pages_per_cpu = bytes / page_size / nr_threads; > if (!nr_pages_per_cpu) { > - _err("invalid MiB"); > + _err("pages_per_cpu = 0, c

Re: [PATCH v3 08/10] selftests/mm: Skip gup_longerm tests on weird filesystems

2025-03-13 Thread Brendan Jackman
On Tue, Mar 11, 2025 at 08:53:02PM +0100, David Hildenbrand wrote: > > 2. 9pfs seems to pass the f_type through from the host. So you can't > > detect it this way anyway. > > > > [3. I guess overlayfs & friends would also be an issue here although > > that doesn't affect my usecase.] > > > > Anyw

Re: [PATCH v3 06/10] selftests/mm: Don't fail uffd-stress if too many CPUs

2025-03-05 Thread Brendan Jackman
On Fri, 28 Feb 2025 at 17:55, Brendan Jackman wrote: > > This calculation divides a fixed parameter by an environment-dependent > parameter i.e. the number of CPUs. > > The simple way to avoid machine-specific failures here is to just put a > cap on the max value of the latter

Re: [PATCH v3 08/10] selftests/mm: Skip gup_longerm tests on weird filesystems

2025-03-14 Thread Brendan Jackman
> > Even if it's a bug in QEMU, I think it is worth working around this > > one way or another. QEMU by far the most practical way to run these > > tests, and virtme-ng is probably the most popular/practical way to do > > that. > > I'm afraid yes. Although allocating temp files form 9pfs is rather

Re: [PATCH] kunit: tool: Fix bug in parsing test plan

2025-03-15 Thread Brendan Jackman
Hi Rae, On Thu, Mar 06, 2025 at 11:02:13AM -0500, Rae Moar wrote: > On Thu, Mar 6, 2025 at 7:26 AM Brendan Jackman wrote: > > Since I reported this bug, I discovered that the example above is in > > fact valid TAP: > > > > > The plan [...] must appear once, whether

[PATCH] selftests/mm: Add commentary about 9pfs bugs

2025-03-17 Thread Brendan Jackman
through Project Run run_vmtests.sh Successfully), add a dummy "skip tests for this specific reason" function that basically just serves as a hook to hang comments on. Signed-off-by: Brendan Jackman --- To: David Hildenbrand --- tools/testing/selftests/mm/gup_longterm.c | 6 +- too

Re: [PATCH v3 1/2] kunit: tool: Fix bug in parsing test plan

2025-03-20 Thread Brendan Jackman
On Wed Mar 19, 2025 at 9:11 PM UTC, Rae Moar wrote: > On Mon, Mar 17, 2025 at 12:13 PM Brendan Jackman wrote: > > > > On Fri, 14 Mar 2025 at 06:37, David Gow wrote: > > > > > > On Fri, 14 Mar 2025 at 03:27, Rae Moar wrote: > > > > > > >

Re: [PATCH v3 1/2] kunit: tool: Fix bug in parsing test plan

2025-03-17 Thread Brendan Jackman
On Fri, 14 Mar 2025 at 06:37, David Gow wrote: > > On Fri, 14 Mar 2025 at 03:27, Rae Moar wrote: > > > > A bug was identified where the KTAP below caused an infinite loop: > > > > TAP version 13 > > ok 4 test_case > > 1..4 > > > > The infinite loop was caused by the parser not parsing a test p

[tip:sched/core] sched/fair: Force balancing on NOHZ balance if local group has capacity

2017-10-10 Thread tip-bot for Brendan Jackman
Commit-ID: 583ffd99d7657755736d831bbc182612d1d2697d Gitweb: https://git.kernel.org/tip/583ffd99d7657755736d831bbc182612d1d2697d Author: Brendan Jackman AuthorDate: Thu, 5 Oct 2017 11:58:54 +0100 Committer: Ingo Molnar CommitDate: Tue, 10 Oct 2017 11:45:32 +0200 sched/fair: Force

[tip:sched/core] sched/fair: Sync task util before slow-path wakeup

2017-10-10 Thread tip-bot for Brendan Jackman
Commit-ID: ea16f0ea6c3dc9e1aa083bd3d1792ba02860526e Gitweb: https://git.kernel.org/tip/ea16f0ea6c3dc9e1aa083bd3d1792ba02860526e Author: Brendan Jackman AuthorDate: Thu, 5 Oct 2017 11:55:51 +0100 Committer: Ingo Molnar CommitDate: Tue, 10 Oct 2017 11:45:31 +0200 sched/fair: Sync task

[tip:sched/core] sched/fair: Remove unnecessary comparison with -1

2017-10-10 Thread tip-bot for Brendan Jackman
Commit-ID: e90381eaecf6d59c60fe396838e0e99789531419 Gitweb: https://git.kernel.org/tip/e90381eaecf6d59c60fe396838e0e99789531419 Author: Brendan Jackman AuthorDate: Thu, 5 Oct 2017 12:45:13 +0100 Committer: Ingo Molnar CommitDate: Tue, 10 Oct 2017 11:45:34 +0200 sched/fair: Remove

[tip:sched/core] sched/fair: Move select_task_rq_fair() slow-path into its own function

2017-10-10 Thread tip-bot for Brendan Jackman
Commit-ID: 18bd1b4bd53aba81d76d55e91a68310a227dc187 Gitweb: https://git.kernel.org/tip/18bd1b4bd53aba81d76d55e91a68310a227dc187 Author: Brendan Jackman AuthorDate: Thu, 5 Oct 2017 12:45:12 +0100 Committer: Ingo Molnar CommitDate: Tue, 10 Oct 2017 11:45:33 +0200 sched/fair: Move

[tip:sched/core] sched/fair: Fix find_idlest_group() when local group is not allowed

2017-10-10 Thread tip-bot for Brendan Jackman
Commit-ID: 0d10ab952e99f3e9f374898e93f45452b81e5711 Gitweb: https://git.kernel.org/tip/0d10ab952e99f3e9f374898e93f45452b81e5711 Author: Brendan Jackman AuthorDate: Thu, 5 Oct 2017 12:45:14 +0100 Committer: Ingo Molnar CommitDate: Tue, 10 Oct 2017 11:45:34 +0200 sched/fair: Fix

[tip:sched/core] sched/fair: Fix usage of find_idlest_group() when the local group is idlest

2017-10-10 Thread tip-bot for Brendan Jackman
Commit-ID: 93f50f90247e3e926bbe9830df089c64a5cec236 Gitweb: https://git.kernel.org/tip/93f50f90247e3e926bbe9830df089c64a5cec236 Author: Brendan Jackman AuthorDate: Thu, 5 Oct 2017 12:45:16 +0100 Committer: Ingo Molnar CommitDate: Tue, 10 Oct 2017 11:45:36 +0200 sched/fair: Fix usage

[tip:sched/core] sched/fair: Fix usage of find_idlest_group() when no groups are allowed

2017-10-10 Thread tip-bot for Brendan Jackman
Commit-ID: 6fee85ccbc76e8aeba43dc120c5fa3c5409a4e2c Gitweb: https://git.kernel.org/tip/6fee85ccbc76e8aeba43dc120c5fa3c5409a4e2c Author: Brendan Jackman AuthorDate: Thu, 5 Oct 2017 12:45:15 +0100 Committer: Ingo Molnar CommitDate: Tue, 10 Oct 2017 11:45:35 +0200 sched/fair: Fix usage

[tip:core/urgent] cpu/hotplug: Fix state name in takedown_cpu() comment

2017-12-06 Thread tip-bot for Brendan Jackman
Commit-ID: 5b1ead6800cb2241aeadcba32736c5836e59c7e1 Gitweb: https://git.kernel.org/tip/5b1ead6800cb2241aeadcba32736c5836e59c7e1 Author: Brendan Jackman AuthorDate: Wed, 6 Dec 2017 10:59:11 + Committer: Ingo Molnar CommitDate: Wed, 6 Dec 2017 19:28:45 +0100 cpu/hotplug: Fix state

<    1   2   3