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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B555DEA4E04 for ; Mon, 2 Mar 2026 14:15:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 06C7A10E02C; Mon, 2 Mar 2026 14:15:57 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=linux.dev header.i=@linux.dev header.b="XB1pfTP5"; dkim-atps=neutral Received: from out-172.mta1.migadu.com (out-172.mta1.migadu.com [95.215.58.172]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0FB5110E02C for ; Mon, 2 Mar 2026 14:15:54 +0000 (UTC) Date: Mon, 2 Mar 2026 06:15:45 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1772460952; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=z/EVA7c5dM/CMIsC5H/wd0QWQksrsEBgYswy6gN4Re4=; b=XB1pfTP5+/ixFozi8gJbJackW08qw1bJDmRZcbeMcPTwK+lYX/rPcssduU7Prdja5dbtRP 9NWUyq14HBut2Cm59kPT4u1eEB4Wy0xZ5XB2qE7wEdgY917rXr7vFOMS2qqiCSEnTV/djD Yb7eQhEYVbKmZmf74r1qrW969/xBeKQ= X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Shakeel Butt To: Christian =?utf-8?B?S8O2bmln?= Cc: Dave Airlie , dri-devel@lists.freedesktop.org, tj@kernel.org, Johannes Weiner , Michal Hocko , Roman Gushchin , Muchun Song , cgroups@vger.kernel.org, Dave Chinner , Waiman Long , simona@ffwll.ch Subject: Re: [PATCH 07/16] memcg: add support for GPU page counters. (v4) Message-ID: References: <20260224020854.791201-1-airlied@gmail.com> <20260224020854.791201-8-airlied@gmail.com> <4fddf319-50c4-40ab-9e36-04d629a8855e@amd.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <4fddf319-50c4-40ab-9e36-04d629a8855e@amd.com> X-Migadu-Flow: FLOW_OUT X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Wed, Feb 25, 2026 at 10:09:55AM +0100, Christian König wrote: > On 2/24/26 20:28, Dave Airlie wrote: [...] > > > This has been a pain in the ass for desktop for years, and I'd like to > > fix it, the HPC use case if purely a driver for me doing the work. > > Wait a second. How does accounting to cgroups help with that in any way? > > The last time I looked into this problem the OOM killer worked based on the per task_struct stats which couldn't be influenced this way. > It depends on the context of the oom-killer. If the oom-killer is triggered due to memcg limits then only the processes in the scope of the memcg will be targetted by the oom-killer. With the specific setting, the oom-killer can kill all the processes in the target memcg. However nowadays the userspace oom-killer is preferred over the kernel oom-killer due to flexibility and configurability. Userspace oom-killers like systmd-oomd, Android's LMKD or fb-oomd are being used in containerized environments. Such oom-killers looks at memcg stats and hiding something something from memcg i.e. not charging to memcg will hide such usage from these oom-killers.