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 26AD5C28B20 for ; Wed, 2 Apr 2025 16:02:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id ADD40280003; Wed, 2 Apr 2025 12:02:10 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id A8DCA280001; Wed, 2 Apr 2025 12:02:10 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9A311280003; Wed, 2 Apr 2025 12:02:10 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 7AC2E280001 for ; Wed, 2 Apr 2025 12:02:10 -0400 (EDT) Received: from smtpin05.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id DFE40589F8 for ; Wed, 2 Apr 2025 16:02:11 +0000 (UTC) X-FDA: 83289570462.05.55E85ED Received: from out-174.mta1.migadu.com (out-174.mta1.migadu.com [95.215.58.174]) by imf29.hostedemail.com (Postfix) with ESMTP id 0D5AE120004 for ; Wed, 2 Apr 2025 16:02:09 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=SnUqiwNG; spf=pass (imf29.hostedemail.com: domain of shakeel.butt@linux.dev designates 95.215.58.174 as permitted sender) smtp.mailfrom=shakeel.butt@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=1743609730; 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=/JiTnDWrOw4/ephyEm9Qze5QTOtw1WA47YfgoERGCeA=; b=zqGN01t2byft58l6d/5kZVBxJIWhseXV2nGeJ/AvKd7+wwHn2q8QCD/jAwdL/MeTaOSkr+ IDFpx+ZOQBY7dtG5N1lYLpP+a2TzEeDj9h2ZKwdzjJPAOxxflIXi2Ok+43pJiHSjcUwrY+ dcpnCgwtsqx/iTR3/OPXF0tQFu8ZVtA= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1743609730; a=rsa-sha256; cv=none; b=2K54WPsTwIfBCG906KlQcqko3C2QVOiV2S5L/MQ8ibF3+DiyurgLDtrV/NBt1998uVnQdq dIQYtcR2U3MRe+yPc4eO6peLd37R7UZQ1jtAr9drqm15/zh6WMFjhZeabClNxHpaEjBr9R 7QrfsqrKE7UIoqplRMjPoQzXTzD6XYA= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=linux.dev header.s=key1 header.b=SnUqiwNG; spf=pass (imf29.hostedemail.com: domain of shakeel.butt@linux.dev designates 95.215.58.174 as permitted sender) smtp.mailfrom=shakeel.butt@linux.dev; dmarc=pass (policy=none) header.from=linux.dev Date: Wed, 2 Apr 2025 09:01:59 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1743609728; 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=/JiTnDWrOw4/ephyEm9Qze5QTOtw1WA47YfgoERGCeA=; b=SnUqiwNGh8mEp8ceCSuVJqNu6sO0Sw4G9JaSpakl7cQAZJM3BZMT6mRqHG3ILl3ZKWK2kO cHA9LGYybdOoavHgbF4TcT/2xVIblc9mhuPlxfYJrqTe+715TeVlzDjMMqepR/rs+Ji5W5 sKgfwIvF8stwhl2Ji7JItS0mRw3utdU= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: Johannes Weiner Cc: Michal Hocko , Andrew Morton , linux-mm@kvack.org, Rik van Riel , Roman Gushchin , Muchun Song , cgroups mailinglist , LKML , Michal Hocko Subject: Re: [PATCH] memcg, oom: do not bypass oom killer for dying tasks Message-ID: References: <20250402090117.130245-1-mhocko@kernel.org> <20250402152715.GA198651@cmpxchg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250402152715.GA198651@cmpxchg.org> X-Migadu-Flow: FLOW_OUT X-Stat-Signature: kugxk7si1fo6p4dfxdwi8qihthb4tzgs X-Rspam-User: X-Rspamd-Queue-Id: 0D5AE120004 X-Rspamd-Server: rspam08 X-HE-Tag: 1743609729-372528 X-HE-Meta: U2FsdGVkX198HRN1naXWGIQFbcouFFAl3YjMqZiAaIwqUXd8MfbygmSfzZwMokPlXpw21h3fF2Ihg6YTl4/cztWz+DJ0qrNW/Ve7rY4R+wKpMDcqys7Pzgu+LaqgC/HVykR5Op0k6cunrEYX0Fnce0EI9QIzbAiT4J86uVfPYNnNNMHEuv3YIZZAxLuQW46VkgFGEgQiWFYz5t5LOW4Fqp3rB4TY3Tm5hSGL/Lto4kW+GMaiSzdX3SrrfwWZL8WP1P7cyIkr+eP12fHH+pMaWJTrp5PP5fQ+EzceVaaNsIoBd35bNTFMRezAgTwN/+7wLAPMh3j05JR/LDbz3vs97QmFc6U8GpwPM2x0lyI13n8Z9Bl5pB1UvhniGHprRoWjsKVoUSGu9iHBrnv/0V1Sg5g8+Oxe7uNQVebtQml69pyc9Viz4LT0DKDyG+8LWc92BXuvr7YVaJRItWsW2tRz/hV5WcyhA4pGNz9RfhX8c46+bdiGxDdRg3YFzq7CMpNQUJ3rgywrdnq49dO+6cuQoESKPxiLzC76+SrB0IFskeRjEijKSQ2f61o3rNMu9fwmfVCWFQiWi/eb/Qn/mRfYQNeDHcRKqIzBGEimvmgzrgqG4nMld1MdLxOVngCw8mMMvg5iZVRTu3GeTkRVONfUSpzduj9Y+HI+odlbPC3EzerjL2KGEHGXmbRrYUq+ihkldZDvn3RFX/GaUR8qaVSR/auWk9mjZuS2sRc5oVWNMasxsSKPgPrp8d2laVxi2pCO9Qgi8pcDKjiKCt0k965NUsMNWFx6qcjYwLWsb8y8+6WxBlIoyGN8dZM8XxaBgnQS7xZ2IT/6oKZmEPuNhlwSRJr2QK4arAJHp2oOKEgwy8JXO9fJZX2qfQpV2MZJxLwth9qPljXvxaGFdIRMcx45PFm+tkZfAsrVwWPL9NWCDm/M8zUTIeFEgJuBoLaTVbfZd+nbdwO96OceGWwlWts clFpZoSF zxzaqFx4XWQitoiQ7ZHmuX+EWfI8lpsJvYMSVo9PhrSIEG7OP3dBZfo73xbaPtv8PWZjoGafvouQRwv0GxTYgFSDFyq42HPPim397v0h9bEvgtTbRRFtcidm0IOEdw0yHzkaF2StDL5UnEBbZR2F5wuq0owNV0NkydZ0IUaQu7sh2KXw0mw/jlOjj/p4SruMq+1xEgAVKdKGvt9NJ7rZExXEtI7u/mXvRSlLRKzgHQBoE8c1e5kzNyzact0sIpAgjapAAm9PyZph8pFODecrsewpq8X/60exejzUDc0ybADfRkL9aHzRDQPADElaJu3ZycDXh 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 Wed, Apr 02, 2025 at 11:27:15AM -0400, Johannes Weiner wrote: > On Wed, Apr 02, 2025 at 11:01:17AM +0200, Michal Hocko wrote: > > From: Michal Hocko > > > > 7775face2079 ("memcg: killed threads should not invoke memcg OOM killer") has added > > a bypass of the oom killer path for dying threads because a very > > specific workload (described in the changelog) could hit "no killable > > tasks" path. This itself is not fatal condition but it could be annoying > > if this was a common case. > > > > On the other hand the bypass has some issues on its own. Without > > triggering oom killer we won't be able to trigger async oom reclaim > > (oom_reaper) which can operate on killed tasks as well as long as they > > still have their mm available. This could be the case during futex > > cleanup when the memory as pointed out by Johannes in [1]. The said case > > is still not fully understood but let's drop this bypass that was mostly > > driven by an artificial workload and allow dying tasks to go into oom > > path. This will make the code easier to reason about and also help > > corner cases where oom_reaper could help to release memory. > > > > [1] https://lore.kernel.org/all/20241212183012.GB1026@cmpxchg.org/T/#u > > > > Suggested-by: Johannes Weiner > > Signed-off-by: Michal Hocko > > Thanks, yeah, the investigation stalled out over the new years break > and then... distractions. > > I think we'll eventually still need the second part of [2], to force > charge from dying OOM victims, but let's go with this for now. Agreed. > > Signed-off-by: Johannes Weiner > > [2] https://lore.kernel.org/all/20241212183012.GB1026@cmpxchg.org/ > Acked-by: Shakeel Butt