Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp1549008iob; Thu, 19 May 2022 08:52:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwIAraBSmH9Qs2GnVk0wlsa8Xn7U/qOpjdCzhFaHYk2Y5WwTQ01lNbrAgahEsO2C9AylTTN X-Received: by 2002:a17:90b:1e47:b0:1df:caa8:1b3c with SMTP id pi7-20020a17090b1e4700b001dfcaa81b3cmr5847088pjb.69.1652975533806; Thu, 19 May 2022 08:52:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652975533; cv=none; d=google.com; s=arc-20160816; b=OCtYzR/Gkv8PWFTF6ZCPzMKukaLUcBGgXVgc7gOeD9dq7XRjld1XfY71krWb3rZzDt FwAoWl52ePTwgM6/m08wSvutlqm/SJze5wonoDqm/ozhW4LCbjYygEvwvHkVlNdrMJ7a YEMI66cMIFP8G82GjhBVibMyOWgaokkz6k7amyXm9GucV7IN8bCfqHEOh4EKBH5nNhdB HodcSbxGn+eRej+qXcxSxOQp4+JGb7r1kRxOEv32UZvd9toc2rSMAihKDKOHYhF6HomG 7UJIKabOPANsAHFG5sAzpcPCrtdEhQn87XJNpcvUc4AVBABvJ4UxEGRIsQu52zIrTYdg cy4Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=VAD8+RD0zPmOeIZmYUK99Hwr7+5c/zyDvObmS3oayw4=; b=dmEFsNotRvrLbw1oAfN2ThEE1jZi201YKxmCxwPrsFvohyXgMfkWHRgY9fwh0vSRK5 vsrra+mWqMBkOYgAr10pFlwkjxbXLRys2vQb5UDHPCJPjBoMPCI9WUhnW69x4G0ynkLL IUu50GGfvEnZ2vuBa5kKQbASyK1KP5pTyIGuRrIZCfiIs+Xibc3HxDb/e7T7q25n1X9G zbU/laFfkMuZkkftvubcGu97HrciFpsWGI4ggP0Gr6hP/Dv7AUVrLcwwEnG8+tuWwx+5 H8ulMRjf9p7KeQPl59e44V6Eoz49qD6gjoFer/6tOmCUEZkRe9FkxxA+NZ4GcnbYiOIO cOOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZFmw0KIA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s71-20020a63774a000000b003c6a370aa3fsi7036528pgc.439.2022.05.19.08.52.01; Thu, 19 May 2022 08:52:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ZFmw0KIA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235373AbiESJAn (ORCPT + 99 others); Thu, 19 May 2022 05:00:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45062 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233283AbiESJAm (ORCPT ); Thu, 19 May 2022 05:00:42 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61F15A5022; Thu, 19 May 2022 02:00:41 -0700 (PDT) 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 dfw.source.kernel.org (Postfix) with ESMTPS id F2A93617C7; Thu, 19 May 2022 09:00:40 +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-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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)