From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 81141C433EF for ; Thu, 19 May 2022 09:00:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 17D486B0072; Thu, 19 May 2022 05:00:44 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 12D536B0073; Thu, 19 May 2022 05:00:44 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 042696B0074; Thu, 19 May 2022 05:00:43 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id EA0426B0072 for ; Thu, 19 May 2022 05:00:43 -0400 (EDT) Received: from smtpin12.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id BF719808C7 for ; Thu, 19 May 2022 09:00:43 +0000 (UTC) X-FDA: 79481897166.12.7164C01 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by imf09.hostedemail.com (Postfix) with ESMTP id 822E41400CA for ; Thu, 19 May 2022 09:00:32 +0000 (UTC) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 9EC40B8224C; Thu, 19 May 2022 09:00:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 835FCC385AA; Thu, 19 May 2022 09:00:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1652950840; bh=dF0FH60gJWkqlbjGCCXS67g6UQvlG7opUBzrK6LwxmQ=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ZFmw0KIAaHHW7y+NPVu8+lfaadngQyO8TShE1cUfLmct+dUcAVYWBXpvyGIks4Z/F Umx5mDrQ8z6pdpxCdvS+yMjWq5xSfhcHEKk6FBsXNh5Sk9H0DtWjzR5cyftlDr5jvs UL4uUlVHJm/V7Oa8K3qLTWApAQ1mw34IG/T8V1eH369NzoxbJPhdELVrTTlJ/9tSEh R/2Jr6HhZ1ss0mWcsBl8m2TA9EaMP1R/8u9G+nWP22GxGTJI8v0fo4fz6e06M142Xa lTL2pt9Q2zPWvNveSoknOasWl/NsNGcJg4s8ExmHGML20mbL1Lps6RpXtaRTDPchw3 b9iqhvfElEWJQ== Date: Thu, 19 May 2022 11:00:32 +0200 From: Christian Brauner To: Suren Baghdasaryan Cc: akpm@linux-foundation.org, mhocko@suse.com, rientjes@google.com, willy@infradead.org, hannes@cmpxchg.org, guro@fb.com, minchan@kernel.org, kirill@shutemov.name, aarcange@redhat.com, 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 Subject: Re: [PATCH v3 1/1] selftests: vm: add process_mrelease tests Message-ID: <20220519090032.4wyjggifnfisgjbr@wittgenstein> References: <20220518204316.13131-1-surenb@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220518204316.13131-1-surenb@google.com> X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 822E41400CA X-Stat-Signature: mzpsk79tw7jj9k4s7q8m4r8xyexdkedw X-Rspam-User: Authentication-Results: imf09.hostedemail.com; dkim=pass header.d=kernel.org header.s=k20201202 header.b=ZFmw0KIA; spf=pass (imf09.hostedemail.com: domain of brauner@kernel.org designates 145.40.68.75 as permitted sender) smtp.mailfrom=brauner@kernel.org; dmarc=pass (policy=none) header.from=kernel.org X-HE-Tag: 1652950832-531465 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Wed, May 18, 2022 at 01:43:16PM -0700, 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 > --- Thanks your adding selftests, Suren! Acked-by: Christian Brauner (Microsoft)