From patchwork Mon Jan 13 09:26:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 13936997 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 4640FE7719E for ; Mon, 13 Jan 2025 09:26:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 99CD310E28A; Mon, 13 Jan 2025 09:26:17 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="CaVPrLz+"; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 769D310E28A for ; Mon, 13 Jan 2025 09:26:16 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 177CD5C53CE; Mon, 13 Jan 2025 09:25:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 53031C4CED6; Mon, 13 Jan 2025 09:26:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1736760375; bh=zN8vr8gKCDgzIHKOCZHlsEiuMBVTM1Ku6GESR0iPOnU=; h=From:To:Cc:Subject:Date:From; b=CaVPrLz+r6HPfO9HFyVrJB4hKSMDjcmtu3+dgPLBrIl7QtqmXaawN8rPur9fcKrpd c5NsN4iZzowCkMfV5l2E0EjktHGL7M6Pgl6F2s47OtWP9oV/O4wWGVKNiSZNLOdGXr bhfIlKWuNK4Zmnp85Srcc+3YCoengoEQigiqR7o27ztz7yAwONzI44WDTSSZ1WN6T+ OJkxoeIuD/Z7jDRo1VuZ/hOveqLSyaUpKkIUTwcihFggaZDMtjhaGKsSYiPJMkqcEi AV3rQ73oW5fukQIxQuu2gvi+DS+NDHVsHeW658LdaxKG650rjMaLODsop/QjyNyN/V pd3vA92HFeXxw== From: Maxime Ripard To: Jonathan Corbet , Tejun Heo , Johannes Weiner , =?utf-8?q?Michal_Koutn=C3=BD?= , Simona Vetter , David Airlie Cc: Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard , dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org, cgroups@vger.kernel.org, kernel test robot Subject: [PATCH 1/4] cgroup/dmem: Select PAGE_COUNTER Date: Mon, 13 Jan 2025 10:26:05 +0100 Message-ID: <20250113092608.1349287-1-mripard@kernel.org> X-Mailer: git-send-email 2.47.1 MIME-Version: 1.0 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" The dmem cgroup the page counting API implemented behing the PAGE_COUNTER kconfig option. However, it doesn't select it, resulting in potential build breakages. Select PAGE_COUNTER. Fixes: b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202501111330.3VuUx8vf-lkp@intel.com/ Signed-off-by: Maxime Ripard Reviewed-by: Simona Vetter Acked-by: Tejun Heo --- init/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/init/Kconfig b/init/Kconfig index 61f50cafa815..5e5328506138 100644 --- a/init/Kconfig +++ b/init/Kconfig @@ -1137,10 +1137,11 @@ config CGROUP_RDMA Attaching processes with active RDMA resources to the cgroup hierarchy is allowed even if can cross the hierarchy's limit. config CGROUP_DMEM bool "Device memory controller (DMEM)" + select PAGE_COUNTER help The DMEM controller allows compatible devices to restrict device memory usage based on the cgroup hierarchy. As an example, it allows you to restrict VRAM usage for applications From patchwork Mon Jan 13 09:26:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 13936998 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 490C3E7719E for ; Mon, 13 Jan 2025 09:26:21 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C6F5B10E5D9; Mon, 13 Jan 2025 09:26:20 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="OzqWbx6h"; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2C7BA10E5DE for ; Mon, 13 Jan 2025 09:26:19 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id C5DC35C5427; Mon, 13 Jan 2025 09:25:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0F64EC4CED6; Mon, 13 Jan 2025 09:26:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1736760378; bh=lTKRTo6DTefkGzg59vzB2bAaoBDnmY8yk4vJ1qA9K1o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OzqWbx6hiBNHJ8tdDEY+OFJmaepO0rzL1ge9TJDXqJFtjZ8YP8OeUSx8s4vhGzkz1 m5vesovN2/YGcZKQsZk8IDJA+mrcaS1hsKvPaJG8C+TUUkUfoDkX4WRZvdvjqptzX7 v2+1wTJavbj4xzFyFVgychzvQdWjNWcULle4/kyQybGtSxZJqQotuOXr7JiLrmq8V8 T8XSyechRGTzby2gDsniqJxoA84UWR2TYMznUzAisOJ5QTPkwBrVy6IuHNpXt9QUcr G/pkJvrcQjD8gn4q3aNZ4vEeFt+jPJ/XOYk6eOJ7KnPRq39vIr3A4v1jqHxBljBTU/ 2u/lGv3bzfhQA== From: Maxime Ripard To: Jonathan Corbet , Tejun Heo , Johannes Weiner , =?utf-8?q?Michal_Koutn=C3=BD?= , Simona Vetter , David Airlie Cc: Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard , dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org, cgroups@vger.kernel.org, Stephen Rothwell Subject: [PATCH 2/4] cgroup/dmem: Fix parameters documentation Date: Mon, 13 Jan 2025 10:26:06 +0100 Message-ID: <20250113092608.1349287-2-mripard@kernel.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250113092608.1349287-1-mripard@kernel.org> References: <20250113092608.1349287-1-mripard@kernel.org> MIME-Version: 1.0 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" During the dmem cgroup development, the parameters to the dmem_cgroup_state_evict_valuable() and dmem_cgroup_try_charge() were changed, but the documentation wasn't adjusted accordingly. This results in a documentation build warning. Adjust the documentation to reflect what the final functions parameters are. Fixes: b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup") Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/r/20250113160334.1f09f881@canb.auug.org.au/ Signed-off-by: Maxime Ripard --- kernel/cgroup/dmem.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/kernel/cgroup/dmem.c b/kernel/cgroup/dmem.c index 52736ef0ccf2..ecea58abed6a 100644 --- a/kernel/cgroup/dmem.c +++ b/kernel/cgroup/dmem.c @@ -278,12 +278,10 @@ dmem_cgroup_calculate_protection(struct dmem_cgroup_pool_state *limit_pool, rcu_read_unlock(); } /** * dmem_cgroup_state_evict_valuable() - Check if we should evict from test_pool - * @dev: &dmem_cgroup_region - * @index: The index number of the region being tested. * @limit_pool: The pool for which we hit limits * @test_pool: The pool for which to test * @ignore_low: Whether we have to respect low watermarks. * @ret_hit_low: Pointer to whether it makes sense to consider low watermark. * @@ -609,17 +607,16 @@ void dmem_cgroup_uncharge(struct dmem_cgroup_pool_state *pool, u64 size) } EXPORT_SYMBOL_GPL(dmem_cgroup_uncharge); /** * dmem_cgroup_try_charge() - Try charging a new allocation to a region. - * @dev: Device to charge + * @region: dmem region to charge * @size: Size (in bytes) to charge. * @ret_pool: On succesfull allocation, the pool that is charged. * @ret_limit_pool: On a failed allocation, the limiting pool. * - * This function charges the current pool for @dev with region at @index for a - * size of @size bytes. + * This function charges the @region region for a size of @size bytes. * * If the function succeeds, @ret_pool is set, which must be passed to * dmem_cgroup_uncharge() when undoing the allocation. * * When this function fails with -EAGAIN and @ret_limit_pool is non-null, it From patchwork Mon Jan 13 09:26:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 13936999 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 5610BE7719F for ; Mon, 13 Jan 2025 09:26:23 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CAA5D10E5DD; Mon, 13 Jan 2025 09:26:22 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="WEWtRteg"; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id EB2C410E5DE for ; Mon, 13 Jan 2025 09:26:21 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 8C8845C53CE; Mon, 13 Jan 2025 09:25:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C966CC4CEE1; Mon, 13 Jan 2025 09:26:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1736760381; bh=9JhhK71wwiHcLFBErXxQpCIOlUAopR3tZpNzTbm0CgI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WEWtRtegaUWM4Xp4VwBmtOAhOwqapTTSL8DrQFPJT5gF3PMVH7ff8IvlehsNVCIEi yquX+v6hHsHR66q73O89TkGVkTa0v201fle/NyWpgRi+csPsbGOzVqKU/MgbP4Kv0Y M5ixAwqjQlU4bgsxezOsiTfH7+ug0teLU7ZjgtQ9CrQg8Mf5ASaqESFsU48N5J1VYG 3xoj/UcquPfV9L9OiaZu7vkJ6kAbc6YGFsfIezpvCVRjIakLyn0TUWNMpl89ZJVX4b ydfy9lgARJ+SpT0PDBXJJVvQH/oVa6deSJl199BnorJLlMXKQbE7frHp9HbrN7Uong YmNDQvtfmmTww== From: Maxime Ripard To: Jonathan Corbet , Tejun Heo , Johannes Weiner , =?utf-8?q?Michal_Koutn=C3=BD?= , Simona Vetter , David Airlie Cc: Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard , dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org, cgroups@vger.kernel.org, Stephen Rothwell Subject: [PATCH 3/4] drm/doc: Include new drm-compute documentation Date: Mon, 13 Jan 2025 10:26:07 +0100 Message-ID: <20250113092608.1349287-3-mripard@kernel.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250113092608.1349287-1-mripard@kernel.org> References: <20250113092608.1349287-1-mripard@kernel.org> MIME-Version: 1.0 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" Commit b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup") introduced a new documentation file, but didn't link it anywhere. It was thus triggering a documentation build warning. Make sure it's included as part of the DRM documentation. Fixes: b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup") Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/r/20250113155000.4a99e7b0@canb.auug.org.au/ Signed-off-by: Maxime Ripard --- Documentation/gpu/index.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/gpu/index.rst b/Documentation/gpu/index.rst index 37e383ccf73f..7dcb15850afd 100644 --- a/Documentation/gpu/index.rst +++ b/Documentation/gpu/index.rst @@ -11,10 +11,11 @@ GPU Driver Developer's Guide drm-kms-helpers drm-uapi drm-usage-stats driver-uapi drm-client + drm-compute drivers backlight vga-switcheroo vgaarbiter automated_testing From patchwork Mon Jan 13 09:26:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 13937000 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 5B9AAE7719F for ; Mon, 13 Jan 2025 09:26:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D200610E5DE; Mon, 13 Jan 2025 09:26:25 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="b3Mir3fs"; dkim-atps=neutral Received: from nyc.source.kernel.org (nyc.source.kernel.org [147.75.193.91]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0AC5410E5DE for ; Mon, 13 Jan 2025 09:26:25 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by nyc.source.kernel.org (Postfix) with ESMTP id 030C1A40CFB; Mon, 13 Jan 2025 09:24:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8FDEAC4CEE1; Mon, 13 Jan 2025 09:26:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1736760383; bh=rKYRxwVH9G5tQwnPWN7e8BfY/H/rOa2mgN6RvB1yR3Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=b3Mir3fsZqeqgviEiyMCwErgpkWgzeXc0Qiw+jwgoU5IukW5Q7AzAXU+D+kY1L2Z9 yTUcTDxk/+2l4guY0iBl7F8cjC3m0FTEvxAoPvcDTKwzSrK53fcgKoxVSw9SeD/c3r v+JDFBMr6jb4dXvxJSArgCyBa+VUUo3KNqADV/n8L3uEA0rlLMdrj8cPRG3Aen7z6i oHammgNfgMfhWE03QUae0HpB9UpuCkVs+h41ifzOevQlsuRVOLnNWgGG3JUPfOjckx FYKpxgBdRf5Wdjr1YOybIiSnzEkM2cxoRcf8UEo7v4UO0cBvRCR7mO4ELrqY7gWgVG idu+OhOXGRxnw== From: Maxime Ripard To: Jonathan Corbet , Tejun Heo , Johannes Weiner , =?utf-8?q?Michal_Koutn=C3=BD?= , Simona Vetter , David Airlie Cc: Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard , dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org, cgroups@vger.kernel.org, Stephen Rothwell Subject: [PATCH 4/4] doc/cgroup: Fix title underline length Date: Mon, 13 Jan 2025 10:26:08 +0100 Message-ID: <20250113092608.1349287-4-mripard@kernel.org> X-Mailer: git-send-email 2.47.1 In-Reply-To: <20250113092608.1349287-1-mripard@kernel.org> References: <20250113092608.1349287-1-mripard@kernel.org> MIME-Version: 1.0 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" Commit Commit b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup") introduced a new documentation file, with a shorter than expected underline. This results in a documentation build warning. Fix that underline length. Fixes: b168ed458dde ("kernel/cgroup: Add "dmem" memory accounting cgroup") Reported-by: Stephen Rothwell Closes: https://lore.kernel.org/r/20250113154611.624256bf@canb.auug.org.au/ Signed-off-by: Maxime Ripard Reviewed-by: Simona Vetter --- Documentation/core-api/cgroup.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/core-api/cgroup.rst b/Documentation/core-api/cgroup.rst index 8696e9513f51..734ea21e1e17 100644 --- a/Documentation/core-api/cgroup.rst +++ b/Documentation/core-api/cgroup.rst @@ -1,9 +1,9 @@ ================== Cgroup Kernel APIs ================== Device Memory Cgroup API (dmemcg) -========================= +================================= .. kernel-doc:: kernel/cgroup/dmem.c :export: