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 BC0F5E7717F for ; Fri, 13 Dec 2024 00:49:55 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 2FFAD6B008A; Thu, 12 Dec 2024 19:49:55 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2AF7A6B008C; Thu, 12 Dec 2024 19:49:55 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 19EA36B0092; Thu, 12 Dec 2024 19:49:55 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id EE2EB6B008A for ; Thu, 12 Dec 2024 19:49:54 -0500 (EST) Received: from smtpin20.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 830AA1A0B5A for ; Fri, 13 Dec 2024 00:49:54 +0000 (UTC) X-FDA: 82888101702.20.7C5BE9B Received: from out-188.mta0.migadu.com (out-188.mta0.migadu.com [91.218.175.188]) by imf03.hostedemail.com (Postfix) with ESMTP id 5CEEC20011 for ; Fri, 13 Dec 2024 00:49:41 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=EDyPU9ta; spf=pass (imf03.hostedemail.com: domain of roman.gushchin@linux.dev designates 91.218.175.188 as permitted sender) smtp.mailfrom=roman.gushchin@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1734050975; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=5nIPWnjKprkNZasvPhVtfRiElviBP/q4ZO6QUFyEJt0=; b=8RbOqq0NySBuzfEJRKmWcytlQHVYmW5LUnsqRYvIaWvibSwLkuckA1CsoeaY6TeDXWg9tM keTWjWNSQGrlAmiLtlM6YxcLeRkZdiJubj3FXAVKdwXCp5+owV6oykhJ4bnvjh4VOZX9Ax f6uDnnE79KATMf5bZtQds+GgHVA2b1Y= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=EDyPU9ta; spf=pass (imf03.hostedemail.com: domain of roman.gushchin@linux.dev designates 91.218.175.188 as permitted sender) smtp.mailfrom=roman.gushchin@linux.dev; dmarc=pass (policy=none) header.from=linux.dev ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1734050975; a=rsa-sha256; cv=none; b=Y2uf9aoksVQuWCIFV9Xq8zK7wlapOQ+XP/PnOTYJllUdg0/iI1wcRNnBAMnhQxQl7UpXcc pKBzHZKeCI4OqUTi/GL+pmYA38yr/pgXA2J3VGpZ8h7NkJFFOZlxmaiqWDTAILAhGVMSeB MT8RsHtNIM0zWErtszk6psPcxJTDjKo= Date: Fri, 13 Dec 2024 00:49:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1734050990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=5nIPWnjKprkNZasvPhVtfRiElviBP/q4ZO6QUFyEJt0=; b=EDyPU9tafbgcXhGkaS3TjLXpnimikZgo4DCJaPiA+u7l+EolaHl1rMv+o0ISICVyg0nYJd n706QWoFTj8pQ0/W/qR9ggYM1FZt3W3reW9DcGOE2ADiFxDz200YdFI4oe7wC3q6l2mqIe fFR6/t269zyyxLpXYIxPyyYwcFtIjVg= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Roman Gushchin To: Rik van Riel Cc: Yosry Ahmed , Balbir Singh , Johannes Weiner , Michal Hocko , hakeel Butt , Muchun Song , Andrew Morton , cgroups@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, kernel-team@meta.com, Nhat Pham Subject: Re: [PATCH v2] memcg: allow exiting tasks to write back data to swap Message-ID: References: <20241212115754.38f798b3@fangorn> <20241212150003.1a0ed845@fangorn> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20241212150003.1a0ed845@fangorn> X-Migadu-Flow: FLOW_OUT X-Rspamd-Server: rspam05 X-Stat-Signature: s77n93m37cqiqqx71rf1dynz3fm4gw4w X-Rspamd-Queue-Id: 5CEEC20011 X-Rspam-User: X-HE-Tag: 1734050981-229348 X-HE-Meta: U2FsdGVkX18mBmuksT4zmGO2ZSonwfUObMv+Nzs80hYZAB9msg76ULNNXNfWJ3X+rF1h+9wOcen8CopxiR7NbylXnpeAmZ/k/fyXoH3X/EF1vt5GWM7SQgz7+A4SAmMm0Cn/R6bw8KKDvoHgi4x9O1NUNP6280q9tdoNMB4tzja7oOXcFV4UzYahJQRdNhiHJ4IZtVDF+t732WNcyLYcSJrlxBAzxBMISSA7xI2m0Ww10zBDvUoUYHSrDlNuMq6gTCh39G9faqbTvxiR+U/JdIJVf5BoIGoejDF0ZFl8i3k65vfm2dMZe6jZbbQqrejNpQpv3V4c+DXCTLGc4wlC2lKnwRgcz+/O5Y8O6NUBW+p9fLOtCPc8Nezc5eJMiGUt/Akm28bLZ7V2h2lEsKNGjr6RDm+kmwtiopwRz8x+HSBuUJTkYqcj4dEGR+iWdqq+1zuQY0+zOoTVbJi+a/x00DBKKYbDatY8thrs/Vi0duTDmg/1RlH4vR7BvWHGQa89Mq0fqmTZqqHPdouHWhyaKNOwXZpsmJ4DxZT/45Ud5ccUXkgScjaRMTJZWV8OZBdApdwphuOnQtpPM47/X/bE0hhXh/4HpYj4etU6uKZKD4tQHZIXwJIBKgpbvFXv3fOD7oLfhixsWg2iplbdsuvZQG+c5UNPFyZwnLHM5zroOT125z3Rsd6yhDj3cImJK7X35/BAoa3l6YqA24vIalLf/OOmoSTC+ZMgtfbtsXc1o3J5uhN00B/cqGJpUGGN+K9avkI6z4lOqMj1VYIp4XiGgo2RXGD8F0/1AKMwKXOl3NMiyKDtRDZehLUwTjGWQU/SQRFl3d4put4CYlIGcoA3/A8suEXxUGRPxAQoK3FUbcEqFb1HREw5Ee4RA49dZ7ElAKnivgMbv/E1U5PK2YWvtFLnHent3StRxqoeIhIy5j4x9dJHhDYMg86E/MdApaLeVeoMA2mVh4u6qn820cj jFrau8GT VP5ocfST1MFpkViQ9E25pZfk9cqyco+OAboS5LGoR0Q3tpHDu5lmbq57eR+FX0NdE9aIAnUqzSwT5TJXg/NpE/v7sbz7foNinKX/EsQgCKrAVqxwPVMsDuXZE61qXCYVhpbqHUG60TYeuY/jYy490WHdM89QRxyd0OlGBRSwOMC8UAEJ6qZtJVS/zpw== 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: List-Subscribe: List-Unsubscribe: On Thu, Dec 12, 2024 at 03:00:03PM -0500, Rik van Riel wrote: > On Thu, 12 Dec 2024 18:31:57 +0000 > Roman Gushchin wrote: > > > Is it about a single task or groups of tasks or the entire cgroup? > > If former, why it's a problem? A tight memcg limit can slow things down > > in general and I don't see why we should treat the exit() path differently. > > > I think the exit path does need to be treated a little differently, > since this exit may be the only way such a cgroup can free up memory. It's true if all tasks in a cgroup are exiting. Otherwise there are other options (at least in theory). > > > If it's about the entire cgroup and we have essentially a deadlock, > > I feel like we need to look into the oom reaper side. > > You mean something like the below? > > I have not tested it yet, because we don't have any stuck > cgroups right now among the workloads that I'm monitoring. Yeah, something like this... Thanks!