From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f53.google.com (mail-dl1-f53.google.com [74.125.82.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1E6B03BBA09 for ; Thu, 21 May 2026 11:28:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779362912; cv=none; b=GX2t3fXvCk6U8IsJjo9+DQTQHqRQAWC+lS3lCFzdhbh2tNY0cTY0oeRFdHmKxfgfmmU0gnL3vX5qTIaYaP70pwp+9JeCKY6ABebsuXh4OdUJsfSv2R3GsIbPHNSIU3y891r8SKf4b7g/t3R+af43qLJtc4aVVadf3FpNxzzQFJE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779362912; c=relaxed/simple; bh=pJ0LmjTRmoJJRpU0IfmiM4SBFKpGeMquloKlltNZ11Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FEO9ccSYXRzJxYldNQXvKuK3qht/b10D6PnVc0gySrjQuQoatJH3DBSluL0sBAf1uhWb0PvxkTEgBNJir6OZKywzGKW5PNumK/t71uPsoR6+f6kzyRMWjJ7PMtUcgJqEN4xh3RFUUPJ2PvG+uqxjrjm7OVySAWOgq3kVJCceGjg= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=p48g+76n; arc=none smtp.client-ip=74.125.82.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="p48g+76n" Received: by mail-dl1-f53.google.com with SMTP id a92af1059eb24-12c19d23b19so8130285c88.0 for ; Thu, 21 May 2026 04:28:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779362910; x=1779967710; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=lJyNQp/avb8w2S5x2BnqyHifPaEtYXGBN4t4d2EgLfE=; b=p48g+76nhu+sdYIGzI3ugpvf3j6ZoE52cAckMK+mFMZCYM/+xrw2VqYoqJUe77XgDZ e11ffI9m6S2MTv3fk9PiYvSO7+7F6c3YO4GTyxRvkgLcvoj6nH/mNqA3xX+gQ5xt5rfV qjLD4CFA8/YVtevP0UoEbURDJFnTfZqkK9SHiRSaw8vLR6cmHbrs1lEiev11bYtaWXkC RYX8B9ZOWOZIH7WA3OhxTnSAswqRtFsdYts3qbFjx8cHagHI8z3aXtK6q+TsH4I9Z9YY 3T16RptpsnYKW2vHE5U4RDL3ncHSEw5aqGqTe9wp2/rHXiwVEgaLxrpNT2m+y/BkAv+2 hCkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779362910; x=1779967710; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=lJyNQp/avb8w2S5x2BnqyHifPaEtYXGBN4t4d2EgLfE=; b=qnY80heIKqBky/5gACGC6lRDZKmAnzbCtmEl8ArZzfj5O2JbcidTUbodsc/tfhxzM4 KMylTVV5DSWONNnwEvkpjiGqtzdOCyIySqjwhCZoVq6vVUFj/IIQZpDdLzVMK2RAbz73 fXkeeOIwwL5hEfqHA5Dg0YmLRDgdEVmlkP1NKDmWqKRll7v+Ec3UMblshJOti13BCDiS HGJSfwN9brRmjqHDQHo6TGfMmi27Oa/+Qc+DiIEpCzGSPdPBSSz4Erv/etl9ZUGfKUcR XrcpAyNM72yT2ekRrbzoKFx9n/uex5DS3JCRY0qDzP+TFN5Fw8xc4VuG/uEVOqKK7Wq1 WqoQ== X-Forwarded-Encrypted: i=1; AFNElJ+vxIICJ6SznCk3rTOkhAj9/Ch7EAzFwaDff47plXkdeboKyfxuMS7r3PqqvgJo/BywndmCVbpSPBHOvo4=@vger.kernel.org X-Gm-Message-State: AOJu0YxssPu2lHC+Z+Bp1+r6PE6K4RAGrrNsgVCPEkWPyD1G1erAN7cb UQof4yeQBB8qz+TPWQxlfmpUu2vMUtrYmzcYDiUto6HfuQ3tNH729rq0 X-Gm-Gg: Acq92OEvTzlHafn6+hZDBylwyQ0LRreh3FvVBjQeKx4BiHajorkkVStIWHREXp4iv1w izEovDpTSOfTvYD8RIU+N4hUY+8jpGHcSlicJXgDexSU61UbG3gLk/GMgtBM4g2cT3x3783DIHG nQzdNm7c4Lo6GYQBXcFKMEDZ5Z/9IlZY2yyE89eA6FnwisLMkw0yO8ApWCpc5a7SlPk1fR15TVC vzxilDPVJlNj3H3Fdg7NjSQQoNc3I5ClGZXKa5uJGcn6B2MXREMFbfgtHtIqxdm7lggaFeAmiLs +0gFBtWkfodTV0MC69SqZuL9iFXZ86iTedLB13yaXPHMBtaD2tyj0ULEMGXhGBbHjKuTiJ7P8hM dOGJyZgfLqfkNfkpy3fmMNmZSWN2Ts+tw2QgLztcskLXMlSqsjCRUfYRmCoAlh1YC1DnEfEa1ZW H8269W4qpAIWND91X0nUR4JQBJF3ECPFg= X-Received: by 2002:a05:7022:42b:b0:128:d7a7:5271 with SMTP id a92af1059eb24-13632e57813mr1088992c88.28.1779362910227; Thu, 21 May 2026 04:28:30 -0700 (PDT) Received: from wujing.localdomain ([74.48.213.230]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-13651ae2824sm56138c88.0.2026.05.21.04.28.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2026 04:28:29 -0700 (PDT) From: Qiliang Yuan To: tj@kernel.org Cc: dev@lankhorst.se, mripard@kernel.org, natalie.vock@gmx.de, hannes@cmpxchg.org, mkoutny@suse.com, cgroups@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] cgroup/dmem: implement dmem.high soft limit and throttling Date: Thu, 21 May 2026 19:28:25 +0800 Message-ID: <20260521112825.62249-1-realwujing@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hello Tejun, On Wed, May 20, 2026 at 09:52 AM Tejun Heo wrote: > I'm not sure about complicating dmem control model without implementing > reclaim. What are we slowing them down for if the only recovery action is > killing them? Thank you for the feedback. Your point about the lack of a reclaim path is well-taken. Simple throttling without a way to recover resources is indeed incomplete and inconsistent with the cgroup v2 philosophy. To address this from several perspectives in v2: 1. Recovery Path: As suggested by Maarten Lankhorst, we will pivot to a reclaim-centric model. Exceeding `dmem.high` will trigger a prioritized eviction process, where memory objects from over-limit cgroups are targeted first for reclaim. This provides the meaningful "recovery action" you mentioned. 2. Backpressure: Throttling will then serve as a secondary tool to synchronize user-space demand with the kernel's reclaim speed, preventing bursty workloads from overwhelming the system before reclaim can finish. 3. Graceful Degradation: For GPU compute jobs, this model provides a managed "pressure point" that allows transient peaks to be handled via rebalancing rather than immediate, fatal allocation failures (max/OOM). The goal for v2 is to achieve convergence with the `memory.high` model, pairing prioritized reclaim with backpressure. Thanks, Qiliang