[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4b05f63a-c1b7-1b36-4305-8ee9e34f0e04@linuxfoundation.org>
Date: Wed, 18 May 2022 16:23:46 -0600
From: Shuah Khan <skhan@...uxfoundation.org>
To: Suren Baghdasaryan <surenb@...gle.com>, akpm@...ux-foundation.org
Cc: mhocko@...e.com, rientjes@...gle.com, willy@...radead.org,
hannes@...xchg.org, guro@...com, minchan@...nel.org,
kirill@...temov.name, aarcange@...hat.com, brauner@...nel.org,
hch@...radead.org, oleg@...hat.com, david@...hat.com,
jannh@...gle.com, shakeelb@...gle.com, peterx@...hat.com,
jhubbard@...dia.com, shuah@...nel.org,
linux-kernel@...r.kernel.org, linux-mm@...ck.org,
linux-kselftest@...r.kernel.org, kernel-team@...roid.com,
Shuah Khan <skhan@...uxfoundation.org>
Subject: Re: [PATCH v3 1/1] selftests: vm: add process_mrelease tests
On 5/18/22 2:43 PM, Suren Baghdasaryan wrote:
> Introduce process_mrelease syscall sanity tests which include tests
> which expect to fail:
> - process_mrelease with invalid pidfd and flags inputs
> - process_mrelease on a live process with no pending signals
> and valid process_mrelease usage which is expected to succeed.
> Because process_mrelease has to be used against a process with a pending
> SIGKILL, it's possible that the process exits before process_mrelease
> gets called. In such cases we retry the test with a victim that allocates
> twice more memory up to 1GB. This would require the victim process to
> spend more time during exit and process_mrelease has a better chance of
> catching the process before it exits and succeeding.
>
> On success the test reports the amount of memory the child had to
> allocate for reaping to succeed. Sample output:
>
> $ mrelease_test
> Success reaping a child with 1MB of memory allocations
>
> On failure the test reports the failure. Sample outputs:
>
> $ mrelease_test
> All process_mrelease attempts failed!
>
> $ mrelease_test
> process_mrelease: Invalid argument
>
> Signed-off-by: Suren Baghdasaryan <surenb@...gle.com>
> ---
> Changes in v3:
> - Applied on git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm mm-stable,
> per Andrew
> - Fixed formatting for sample outputs in the description, per Shuah
> - Removed pidfd_open, process_mrelease, write_fault_pages functions, per Shuah
> - Moved child main routine into its own function, per Shuah
> - Followed tools/testing/selftests/pidfd/pidfd.h as a model to deal with
> undefined syscall numbers, per Shuah
>
Looks good to me Suren. Thank you.
Reviewed-by: Shuah Khan <skhan@...uxfoundation.org>
thanks,
-- Shuah
Powered by blists - more mailing lists