From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dy1-f175.google.com (mail-dy1-f175.google.com [74.125.82.175]) (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 1BF2519E7F7 for ; Thu, 21 May 2026 11:28:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.175 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779362900; cv=none; b=dWYgia/6q/yu1onMOHYXn4omKNq1KYZYR14N5k6crUNjLfVzTf/bEPds1DnLGdEzyWC7bfHWsDYYkFas1/LEY4xMNzk2knKIMd6Dgb+4rCZ3XLyg3RY/nhkjUn2wJRn6CvVa18UayVyRrDGnZozQ5cQ2lqoIsP/h3pnoyQCd3k4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1779362900; c=relaxed/simple; bh=/AMVM3vBzoFTnaZzN+zWcS7iQx9aqetmnCsN4HD66PM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=UX8OZNjNXdcNC4Vrsu+mykRCxKnN71KHxq4X2EhdJsb/7HXKAjUDJoSI/lIMYbZHbEn0VQvIu8J8u9qOOcMApmdRWM1WnBRsiiuv9EoCilyHXb/bvQIMe9TD7/vgyb4jwmoM3YCPt0PZmTeadW3/UnOV9kunpUVUTe8cLeeUIaA= 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=osXcrfhA; arc=none smtp.client-ip=74.125.82.175 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="osXcrfhA" Received: by mail-dy1-f175.google.com with SMTP id 5a478bee46e88-2f03d6cf77bso5994185eec.0 for ; Thu, 21 May 2026 04:28:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1779362898; x=1779967698; 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=VtjszhJJZ/cWn5ctRzPZFVh9lS+1tvhxhH2pqInaGro=; b=osXcrfhAVjJ8xScCZPvjPP0yJIYD+yt2DvNfEm8wfwc1bkFynOlKcVT2nrAq0lYeoy hii/F6fVUKtWtR3rwXdyE2aMmcd7qOUb8L4r+4Tu5Jzi+XN7925KyNZ+olKEZXpnaE4c lNxa3mRrgZfgUwyVeIFkmDbQ4q4UWmWvnW/96N2qUYeY7V6c494rbEF9s7rM6TuKk6fc 57g+BCRDzG5YEDnWAJfe8NLbMIscTT+Y95ABXZqSxHc0i1GVQ6YMdzI92MmAPOJKEotE /raq/J3sk6gEipMEUUfqKDoFD5y2b741E9zmJ2frYjDb/wLmOok+UnYas+rWdldENmsj 5qdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779362898; x=1779967698; 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=VtjszhJJZ/cWn5ctRzPZFVh9lS+1tvhxhH2pqInaGro=; b=sNuf6xLl+snb7hEEPZ3R5H++HEAG6wihHs2hTMSoiN2EPjGoK/n0/2DurupRC29Btg w6pZzR3hy/gtlIs9i2gXzVB6pEDCINSUzrfpP5/iQ1wMyE1/ZULmy9inYmvCfX2OQr9R 6tiSuaJ8XjbaRW/VcgBo4mQtIrSBStdhES89xx3pX34F4jWgJBX06Hp4NS0eyvjWW/t5 CAaHNpIHPDMwf6Odo6kwN6eaK8mbqxJSDIZc3VJ9lt/Maq7P7V6L/Q0EgORfeBW50EfQ bDXXF1KVGi11rs9G0EiPauJTTzNSQwA5SP9Yc0f1vTkFl5DB62thoRFhkurvykV8bDsM Mvug== X-Forwarded-Encrypted: i=1; AFNElJ+Rv97Dl3OiGRQKjUK12ievOI9CqbTncdrqSxmnc9TIOCACseG19Ag67i0AlCCpi3to0Chq1eTJlq4kPxM=@vger.kernel.org X-Gm-Message-State: AOJu0YyhY5pHb6E9dwkCk0LuPCvAldMwBR4VqO9W65bIb0Y6S70zasmG 1hJIVpsUzb5LiV2NAEV52keFJneCELfsuNmC79K2koGL36AQrLuhu5i3 X-Gm-Gg: Acq92OEeZGrGrfaeu6asV0pZ46tBkiyQYYbOn7s/eJMc3nAPX+Om5kgRp3vjPHmmejV TGNneLTY3KMVpsfbRSIwC8kpNVuMUmelR84bh55ZeIKT6xofnOi3w+sSSdG8DkFktlZjcr/y6Gi 42sZWPbyYDhfcdCdvfhY51E/5S5HyymjnDPBimvm2LpmZXOCrwTG147o17wIOSUzHWZ/QC5jv0I YAbB6+69BzMUfzaYn1d7+RPGQuVZqtCSFX+0VcIY8feFtMB3MOFepb6cXfl+2E++huqLoQIwP1v Jbin8a1CSjH5Pq02AACkpdqZy9OqZyTzTPPSAVHB/HSRidsFa5G4Pr9NaVuMu7pK8Op/EwxW4aE G/dPM8ZeW5d8+r+zwXGoYLq8076yV0wIoZhrWHkLMpZjdqwsuoAw9Ab9o5egOvDtyGMp5vaZ4PR kWh4ll9RUrL1+2zWPsVf7jp2uanr78LpP1/r8FVvcOc+pgCe5/FH60 X-Received: by 2002:a05:7301:6509:b0:2d9:db50:c6a5 with SMTP id 5a478bee46e88-3042ed45707mr1596574eec.0.1779362898201; Thu, 21 May 2026 04:28:18 -0700 (PDT) Received: from wujing.localdomain ([74.48.213.230]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-304435be3ffsm270167eec.26.2026.05.21.04.28.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 May 2026 04:28:17 -0700 (PDT) From: Qiliang Yuan To: natalie.vock@gmx.de Cc: dev@lankhorst.se, mripard@kernel.org, tj@kernel.org, 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:12 +0800 Message-ID: <20260521112813.62104-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-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hi Natalie, On Thu, May 21, 2026 at 10:52 AM Natalie Vock wrote: > Interesting proposal, but inserting sleeps on allocation is never a good > idea and doesn't work like you might think it does. In graphics driver > land, lots of random things may result in buffer allocation functions > being called. [...] > Your approach could lead to every single > submission sleeping for at least 100ms, thus permanently destroying > performance. Thank you very much for the detailed explanation of the impact on TTM and Submit IOCTLs. You are absolutely right—injecting sleeps into the charge path, which is hit frequently during buffer validation and residency changes, would indeed be catastrophic for GPU performance. > Maarten's suggestion of preferentially evicting memory that is over the > high limit sounds like a better approach. I agree. Blocking the submission pipeline is not the right way to apply backpressure. I will abandon the current sleep-on-allocation approach and focus on implemented prioritized eviction as you and Maarten suggested. This ensures that reaching the "high" limit triggers a meaningful reclaim action rather than just stalling the GPU pipeline. Best regards, Qiliang