From: kernel test robot <lkp@intel.com>
To: Dave Airlie <airlied@gmail.com>,
dri-devel@lists.freedesktop.org, tj@kernel.org,
christian.koenig@amd.com, Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>,
Roman Gushchin <roman.gushchin@linux.dev>,
Shakeel Butt <shakeel.butt@linux.dev>,
Muchun Song <muchun.song@linux.dev>
Cc: oe-kbuild-all@lists.linux.dev, cgroups@vger.kernel.org,
Waiman Long <longman@redhat.com>,
simona@ffwll.ch
Subject: Re: [PATCH 5/7] ttm: add initial memcg integration. (v4)
Date: Mon, 12 May 2025 22:42:46 +0800 [thread overview]
Message-ID: <202505122244.IEuTPfWF-lkp@intel.com> (raw)
In-Reply-To: <20250512061913.3522902-6-airlied@gmail.com>
Hi Dave,
kernel test robot noticed the following build errors:
[auto build test ERROR on akpm-mm/mm-everything]
url: https://github.com/intel-lab-lkp/linux/commits/Dave-Airlie/ttm-use-gpu-mm-stats-to-track-gpu-memory-allocations/20250512-182204
base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything
patch link: https://lore.kernel.org/r/20250512061913.3522902-6-airlied%40gmail.com
patch subject: [PATCH 5/7] ttm: add initial memcg integration. (v4)
config: riscv-randconfig-001-20250512 (https://download.01.org/0day-ci/archive/20250512/202505122244.IEuTPfWF-lkp@intel.com/config)
compiler: riscv64-linux-gcc (GCC) 7.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250512/202505122244.IEuTPfWF-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202505122244.IEuTPfWF-lkp@intel.com/
All error/warnings (new ones prefixed by >>):
drivers/gpu/drm/xe/xe_bo.c: In function 'xe_bo_evict_pinned':
>> drivers/gpu/drm/xe/xe_bo.c:1147:2: warning: the address of 'ctx' will always evaluate as 'true' [-Waddress]
ret = ttm_bo_populate(&bo->ttm, &ctx);
^~~
>> drivers/gpu/drm/xe/xe_bo.c:1147:8: error: too few arguments to function 'ttm_bo_populate'
ret = ttm_bo_populate(&bo->ttm, &ctx);
^~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/xe/xe_bo_types.h:12:0,
from drivers/gpu/drm/xe/xe_bo.h:11,
from drivers/gpu/drm/xe/xe_bo.c:6:
include/drm/ttm/ttm_bo.h:494:5: note: declared here
int ttm_bo_populate(struct ttm_buffer_object *bo,
^~~~~~~~~~~~~~~
drivers/gpu/drm/xe/xe_bo.c: In function 'xe_bo_restore_pinned':
drivers/gpu/drm/xe/xe_bo.c:1208:2: warning: the address of 'ctx' will always evaluate as 'true' [-Waddress]
ret = ttm_bo_populate(&bo->ttm, &ctx);
^~~
drivers/gpu/drm/xe/xe_bo.c:1208:8: error: too few arguments to function 'ttm_bo_populate'
ret = ttm_bo_populate(&bo->ttm, &ctx);
^~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/xe/xe_bo_types.h:12:0,
from drivers/gpu/drm/xe/xe_bo.h:11,
from drivers/gpu/drm/xe/xe_bo.c:6:
include/drm/ttm/ttm_bo.h:494:5: note: declared here
int ttm_bo_populate(struct ttm_buffer_object *bo,
^~~~~~~~~~~~~~~
vim +/ttm_bo_populate +1147 drivers/gpu/drm/xe/xe_bo.c
00c8efc3180f0c Thomas Hellström 2025-03-05 1096
36919ebeaacab3 Matthew Auld 2023-04-06 1097 /**
36919ebeaacab3 Matthew Auld 2023-04-06 1098 * xe_bo_evict_pinned() - Evict a pinned VRAM object to system memory
36919ebeaacab3 Matthew Auld 2023-04-06 1099 * @bo: The buffer object to move.
36919ebeaacab3 Matthew Auld 2023-04-06 1100 *
75fd04f276de31 Nitin Gote 2025-01-06 1101 * On successful completion, the object memory will be moved to system memory.
36919ebeaacab3 Matthew Auld 2023-04-06 1102 *
36919ebeaacab3 Matthew Auld 2023-04-06 1103 * This is needed to for special handling of pinned VRAM object during
36919ebeaacab3 Matthew Auld 2023-04-06 1104 * suspend-resume.
36919ebeaacab3 Matthew Auld 2023-04-06 1105 *
36919ebeaacab3 Matthew Auld 2023-04-06 1106 * Return: 0 on success. Negative error code on failure.
36919ebeaacab3 Matthew Auld 2023-04-06 1107 */
36919ebeaacab3 Matthew Auld 2023-04-06 1108 int xe_bo_evict_pinned(struct xe_bo *bo)
36919ebeaacab3 Matthew Auld 2023-04-06 1109 {
36919ebeaacab3 Matthew Auld 2023-04-06 1110 struct ttm_place place = {
36919ebeaacab3 Matthew Auld 2023-04-06 1111 .mem_type = XE_PL_TT,
36919ebeaacab3 Matthew Auld 2023-04-06 1112 };
36919ebeaacab3 Matthew Auld 2023-04-06 1113 struct ttm_placement placement = {
36919ebeaacab3 Matthew Auld 2023-04-06 1114 .placement = &place,
36919ebeaacab3 Matthew Auld 2023-04-06 1115 .num_placement = 1,
36919ebeaacab3 Matthew Auld 2023-04-06 1116 };
36919ebeaacab3 Matthew Auld 2023-04-06 1117 struct ttm_operation_ctx ctx = {
36919ebeaacab3 Matthew Auld 2023-04-06 1118 .interruptible = false,
6bd49cc1a8924c Thomas Hellström 2024-10-31 1119 .gfp_retry_mayfail = true,
36919ebeaacab3 Matthew Auld 2023-04-06 1120 };
36919ebeaacab3 Matthew Auld 2023-04-06 1121 struct ttm_resource *new_mem;
36919ebeaacab3 Matthew Auld 2023-04-06 1122 int ret;
36919ebeaacab3 Matthew Auld 2023-04-06 1123
36919ebeaacab3 Matthew Auld 2023-04-06 1124 xe_bo_assert_held(bo);
36919ebeaacab3 Matthew Auld 2023-04-06 1125
36919ebeaacab3 Matthew Auld 2023-04-06 1126 if (WARN_ON(!bo->ttm.resource))
36919ebeaacab3 Matthew Auld 2023-04-06 1127 return -EINVAL;
36919ebeaacab3 Matthew Auld 2023-04-06 1128
36919ebeaacab3 Matthew Auld 2023-04-06 1129 if (WARN_ON(!xe_bo_is_pinned(bo)))
36919ebeaacab3 Matthew Auld 2023-04-06 1130 return -EINVAL;
36919ebeaacab3 Matthew Auld 2023-04-06 1131
a19d1db9a3fa89 Matthew Brost 2024-10-31 1132 if (!xe_bo_is_vram(bo))
a19d1db9a3fa89 Matthew Brost 2024-10-31 1133 return 0;
36919ebeaacab3 Matthew Auld 2023-04-06 1134
36919ebeaacab3 Matthew Auld 2023-04-06 1135 ret = ttm_bo_mem_space(&bo->ttm, &placement, &new_mem, &ctx);
36919ebeaacab3 Matthew Auld 2023-04-06 1136 if (ret)
36919ebeaacab3 Matthew Auld 2023-04-06 1137 return ret;
36919ebeaacab3 Matthew Auld 2023-04-06 1138
36919ebeaacab3 Matthew Auld 2023-04-06 1139 if (!bo->ttm.ttm) {
36919ebeaacab3 Matthew Auld 2023-04-06 1140 bo->ttm.ttm = xe_ttm_tt_create(&bo->ttm, 0);
36919ebeaacab3 Matthew Auld 2023-04-06 1141 if (!bo->ttm.ttm) {
36919ebeaacab3 Matthew Auld 2023-04-06 1142 ret = -ENOMEM;
36919ebeaacab3 Matthew Auld 2023-04-06 1143 goto err_res_free;
36919ebeaacab3 Matthew Auld 2023-04-06 1144 }
36919ebeaacab3 Matthew Auld 2023-04-06 1145 }
36919ebeaacab3 Matthew Auld 2023-04-06 1146
fc5d96670eb254 Thomas Hellström 2024-09-11 @1147 ret = ttm_bo_populate(&bo->ttm, &ctx);
36919ebeaacab3 Matthew Auld 2023-04-06 1148 if (ret)
36919ebeaacab3 Matthew Auld 2023-04-06 1149 goto err_res_free;
36919ebeaacab3 Matthew Auld 2023-04-06 1150
36919ebeaacab3 Matthew Auld 2023-04-06 1151 ret = dma_resv_reserve_fences(bo->ttm.base.resv, 1);
36919ebeaacab3 Matthew Auld 2023-04-06 1152 if (ret)
36919ebeaacab3 Matthew Auld 2023-04-06 1153 goto err_res_free;
36919ebeaacab3 Matthew Auld 2023-04-06 1154
36919ebeaacab3 Matthew Auld 2023-04-06 1155 ret = xe_bo_move(&bo->ttm, false, &ctx, new_mem, NULL);
36919ebeaacab3 Matthew Auld 2023-04-06 1156 if (ret)
36919ebeaacab3 Matthew Auld 2023-04-06 1157 goto err_res_free;
36919ebeaacab3 Matthew Auld 2023-04-06 1158
36919ebeaacab3 Matthew Auld 2023-04-06 1159 return 0;
36919ebeaacab3 Matthew Auld 2023-04-06 1160
36919ebeaacab3 Matthew Auld 2023-04-06 1161 err_res_free:
36919ebeaacab3 Matthew Auld 2023-04-06 1162 ttm_resource_free(&bo->ttm, &new_mem);
36919ebeaacab3 Matthew Auld 2023-04-06 1163 return ret;
36919ebeaacab3 Matthew Auld 2023-04-06 1164 }
36919ebeaacab3 Matthew Auld 2023-04-06 1165
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2025-05-12 14:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-12 6:12 [rfc] drm/ttm/memcg: simplest initial memcg/ttm integration (series v3) Dave Airlie
2025-05-12 6:12 ` [PATCH 1/7] mm: add gpu active/reclaim per-node stat counters Dave Airlie
2025-05-12 6:12 ` [PATCH 2/7] ttm: use gpu mm stats to track gpu memory allocations Dave Airlie
2025-05-12 6:12 ` [PATCH 3/7] memcg: add GPU statistic Dave Airlie
2025-05-12 6:12 ` [PATCH 4/7] memcg: add hooks for gpu memcg charging/uncharging Dave Airlie
2025-05-12 6:12 ` [PATCH 5/7] ttm: add initial memcg integration. (v4) Dave Airlie
2025-05-12 14:42 ` kernel test robot [this message]
2025-05-13 13:30 ` Christian König
2025-05-14 11:41 ` [5/7] " Maarten Lankhorst
2025-05-14 11:55 ` Christian König
2025-05-14 17:07 ` Maarten Lankhorst
2025-05-15 8:40 ` Christian König
2025-05-15 9:28 ` Maarten Lankhorst
2025-05-12 6:12 ` [PATCH 6/7] amdgpu: add support for memcg integration Dave Airlie
2025-05-13 13:21 ` Christian König
2025-05-12 6:12 ` [PATCH 7/7] nouveau: add " Dave Airlie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202505122244.IEuTPfWF-lkp@intel.com \
--to=lkp@intel.com \
--cc=airlied@gmail.com \
--cc=cgroups@vger.kernel.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=hannes@cmpxchg.org \
--cc=longman@redhat.com \
--cc=mhocko@kernel.org \
--cc=muchun.song@linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=roman.gushchin@linux.dev \
--cc=shakeel.butt@linux.dev \
--cc=simona@ffwll.ch \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.