From: Shuah Khan <skhan@linuxfoundation.org>
To: Suren Baghdasaryan <surenb@google.com>, akpm@linux-foundation.org
Cc: mhocko@suse.com, rientjes@google.com, willy@infradead.org,
hannes@cmpxchg.org, guro@fb.com, minchan@kernel.org,
kirill@shutemov.name, aarcange@redhat.com, brauner@kernel.org,
hch@infradead.org, oleg@redhat.com, david@redhat.com,
jannh@google.com, shakeelb@google.com, peterx@redhat.com,
jhubbard@nvidia.com, shuah@kernel.org,
linux-kernel@vger.kernel.org, linux-mm@kvack.org,
linux-kselftest@vger.kernel.org, kernel-team@android.com,
Shuah Khan <skhan@linuxfoundation.org>
Subject: Re: [PATCH v3 1/1] selftests: vm: add process_mrelease tests
Date: Wed, 18 May 2022 16:23:46 -0600 [thread overview]
Message-ID: <4b05f63a-c1b7-1b36-4305-8ee9e34f0e04@linuxfoundation.org> (raw)
In-Reply-To: <20220518204316.13131-1-surenb@google.com>
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@google.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@linuxfoundation.org>
thanks,
-- Shuah
next prev parent reply other threads:[~2022-05-18 22:23 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-18 20:43 [PATCH v3 1/1] selftests: vm: add process_mrelease tests Suren Baghdasaryan
2022-05-18 22:23 ` Shuah Khan [this message]
2022-05-19 9:00 ` Christian Brauner
2022-05-21 14:01 ` Muhammad Usama Anjum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4b05f63a-c1b7-1b36-4305-8ee9e34f0e04@linuxfoundation.org \
--to=skhan@linuxfoundation.org \
--cc=aarcange@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=brauner@kernel.org \
--cc=david@redhat.com \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=hch@infradead.org \
--cc=jannh@google.com \
--cc=jhubbard@nvidia.com \
--cc=kernel-team@android.com \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=minchan@kernel.org \
--cc=oleg@redhat.com \
--cc=peterx@redhat.com \
--cc=rientjes@google.com \
--cc=shakeelb@google.com \
--cc=shuah@kernel.org \
--cc=surenb@google.com \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).