From: Shakeel Butt Subject: Re: [PATCH v4 3/4] selftests: cgroup: fix alloc_anon_noexit() instantly freeing memory Date: Sat, 23 Apr 2022 14:03:12 +0000 Message-ID: <20220423140312.fxsxjwcebvor2x5l@google.com> References: <20220421234426.3494842-1-yosryahmed@google.com> <20220421234426.3494842-4-yosryahmed@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Return-path: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=fa8nrg7PnSBHWiz/ixAu3+CbgP2gabmfB3kka70Ad0U=; b=RBzRm8aigFAmC2YQq4Au63IrMg4vk5mNEbXU0HTFREh1S8MkXIo2r1//dLE4dyUX/e 6NozTIV4b1f9CJCUnvT4w7Sx7ybqXpLGTEuCwKk4b3Cr+DCdjlOpNBVoS7xw+1IljbxX WY9TJe1wbjl3aDMWyDZjVVUsZQ+WpulkaJM5CwkywnoIXR0oQof2FUp7skcLKtWIfukx VknJtnGg5S6NNilEWi8UYh+oR7TXcfJ/JyaSL8lv6ju9ciyY4p8a1ydjQvkXybSBiEhR MVC/MmsNWdd9lqggkQCwKJIffrY3xA8wW9Gow+xt10wW2staPBbArzYc4Kx+820Ntvm+ KDpg== In-Reply-To: <20220421234426.3494842-4-yosryahmed-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> List-ID: Content-Transfer-Encoding: 7bit To: Yosry Ahmed Cc: Johannes Weiner , Michal Hocko , Andrew Morton , Roman Gushchin , David Rientjes , Tejun Heo , Zefan Li , Jonathan Corbet , Shuah Khan , Yu Zhao , Dave Hansen , Wei Xu , Greg Thelen , Chen Wandun , Vaibhav Jain , Michal =?utf-8?Q?Koutn=C3=BD?= , Tim Chen , Dan Schatzberg , cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-doc-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-mm-Bw31MaZKKs0@public.gmane.org On Thu, Apr 21, 2022 at 11:44:25PM +0000, Yosry Ahmed wrote: > Currently, alloc_anon_noexit() calls alloc_anon() which instantly frees > the allocated memory. alloc_anon_noexit() is usually used with > cg_run_nowait() to run a process in the background that allocates > memory. It makes sense for the background process to keep the memory > allocated and not instantly free it (otherwise there is no point of > running it in the background). > > Signed-off-by: Yosry Ahmed > Acked-by: Roman Gushchin Acked-by: Shakeel Butt