From: kernel test robot <lkp@intel.com>
To: Maarten Lankhorst <dev@lankhorst.se>,
linux-kernel@vger.kernel.org, intel-xe@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, Tejun Heo <tj@kernel.org>,
Zefan Li <lizefan.x@bytedance.com>,
Johannes Weiner <hannes@cmpxchg.org>,
Andrew Morton <akpm@linux-foundation.org>,
Friedrich Vock <friedrich.vock@gmx.de>,
Maxime Ripard <mripard@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
cgroups@vger.kernel.org,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Subject: Re: [PATCH v2.1 1/1] kernel/cgroup: Add "dmem" memory accounting cgroup
Date: Thu, 5 Dec 2024 05:00:57 +0800 [thread overview]
Message-ID: <202412050415.jf4sa0gH-lkp@intel.com> (raw)
In-Reply-To: <20241204143112.1250983-1-dev@lankhorst.se>
Hi Maarten,
kernel test robot noticed the following build warnings:
[auto build test WARNING on tj-cgroup/for-next]
[also build test WARNING on akpm-mm/mm-everything linus/master v6.13-rc1 next-20241204]
[cannot apply to drm-misc/drm-misc-next drm-tip/drm-tip]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Maarten-Lankhorst/kernel-cgroup-Add-dmem-memory-accounting-cgroup/20241204-233207
base: https://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup.git for-next
patch link: https://lore.kernel.org/r/20241204143112.1250983-1-dev%40lankhorst.se
patch subject: [PATCH v2.1 1/1] kernel/cgroup: Add "dmem" memory accounting cgroup
config: sh-allmodconfig (https://download.01.org/0day-ci/archive/20241205/202412050415.jf4sa0gH-lkp@intel.com/config)
compiler: sh4-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241205/202412050415.jf4sa0gH-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/202412050415.jf4sa0gH-lkp@intel.com/
All warnings (new ones prefixed by >>):
kernel/cgroup/dmem.c: In function 'dmem_cgroup_state_evict_valuable':
>> kernel/cgroup/dmem.c:302:30: warning: variable 'climit' set but not used [-Wunused-but-set-variable]
302 | struct page_counter *climit, *ctest;
| ^~~~~~
--
>> kernel/cgroup/dmem.c:300: warning: Excess function parameter 'dev' description in 'dmem_cgroup_state_evict_valuable'
>> kernel/cgroup/dmem.c:300: warning: Excess function parameter 'index' description in 'dmem_cgroup_state_evict_valuable'
>> kernel/cgroup/dmem.c:635: warning: Function parameter or struct member 'region' not described in 'dmem_cgroup_try_charge'
>> kernel/cgroup/dmem.c:635: warning: Excess function parameter 'dev' description in 'dmem_cgroup_try_charge'
vim +/climit +302 kernel/cgroup/dmem.c
280
281 /**
282 * dmem_cgroup_state_evict_valuable() - Check if we should evict from test_pool
283 * @dev: &dmem_cgroup_region
284 * @index: The index number of the region being tested.
285 * @limit_pool: The pool for which we hit limits
286 * @test_pool: The pool for which to test
287 * @ignore_low: Whether we have to respect low watermarks.
288 * @ret_hit_low: Pointer to whether it makes sense to consider low watermark.
289 *
290 * This function returns true if we can evict from @test_pool, false if not.
291 * When returning false and @ignore_low is false, @ret_hit_low may
292 * be set to true to indicate this function can be retried with @ignore_low
293 * set to true.
294 *
295 * Return: bool
296 */
297 bool dmem_cgroup_state_evict_valuable(struct dmem_cgroup_pool_state *limit_pool,
298 struct dmem_cgroup_pool_state *test_pool,
299 bool ignore_low, bool *ret_hit_low)
> 300 {
301 struct dmem_cgroup_pool_state *pool = test_pool;
> 302 struct page_counter *climit, *ctest;
303 u64 used, min, low;
304
305 /* Can always evict from current pool, despite limits */
306 if (limit_pool == test_pool)
307 return true;
308
309 if (limit_pool) {
310 if (!parent_dmemcs(limit_pool->cs))
311 return true;
312
313 for (pool = test_pool; pool && limit_pool != pool; pool = pool_parent(pool))
314 {}
315
316 if (!pool)
317 return false;
318 } else {
319 /*
320 * If there is no cgroup limiting memory usage, use the root
321 * cgroup instead for limit calculations.
322 */
323 for (limit_pool = test_pool; pool_parent(limit_pool); limit_pool = pool_parent(limit_pool))
324 {}
325 }
326
327 climit = &limit_pool->cnt;
328 ctest = &test_pool->cnt;
329
330 dmem_cgroup_calculate_protection(limit_pool, test_pool);
331
332 used = page_counter_read(ctest);
333 min = READ_ONCE(ctest->emin);
334
335 if (used <= min)
336 return false;
337
338 if (!ignore_low) {
339 low = READ_ONCE(ctest->elow);
340 if (used > low)
341 return true;
342
343 *ret_hit_low = true;
344 return false;
345 }
346 return true;
347 }
348 EXPORT_SYMBOL_GPL(dmem_cgroup_state_evict_valuable);
349
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2024-12-04 21:01 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-04 13:44 [PATCH v2 0/7] kernel/cgroups: " Maarten Lankhorst
2024-12-04 13:44 ` [PATCH v2 1/7] kernel/cgroup: " Maarten Lankhorst
2024-12-04 14:31 ` [PATCH v2.1 1/1] " Maarten Lankhorst
2024-12-04 21:00 ` kernel test robot [this message]
2024-12-05 2:27 ` kernel test robot
2024-12-05 12:07 ` Maarten Lankhorst
2025-01-14 10:16 ` Geert Uytterhoeven
2025-01-14 18:01 ` Maxime Ripard
2025-01-06 17:48 ` [PATCH v2 1/7] " Michal Koutný
2024-12-04 13:44 ` [PATCH v2 2/7] drm/drv: Add drmm managed registration helper for dmem cgroups Maarten Lankhorst
2024-12-04 13:44 ` [PATCH v2 3/7] drm/ttm: Handle cgroup based eviction in TTM Maarten Lankhorst
2024-12-04 13:44 ` [PATCH v2 4/7] drm/xe: Implement cgroup for vram Maarten Lankhorst
2024-12-19 12:03 ` Maxime Ripard
2024-12-20 14:22 ` Rodrigo Vivi
2024-12-04 13:44 ` [PATCH v2 5/7] drm/amdgpu: Add cgroups implementation Maarten Lankhorst
2024-12-19 12:01 ` Maxime Ripard
2024-12-04 13:44 ` [PATCH v2 6/7] drm/xe: Hack to test with mapped pages instead of vram Maarten Lankhorst
2024-12-04 13:44 ` [PATCH v2 7/7] drm/gem: Add cgroup memory accounting for VRAM helper Maarten Lankhorst
2024-12-08 12:15 ` [PATCH v2 0/7] kernel/cgroups: Add "dmem" memory accounting cgroup Friedrich Vock
2024-12-13 13:07 ` Maxime Ripard
2024-12-13 14:13 ` Maarten Lankhorst
2024-12-13 15:22 ` Maxime Ripard
2024-12-13 13:03 ` Maxime Ripard
2024-12-13 14:53 ` Maarten Lankhorst
2024-12-13 15:21 ` Maxime Ripard
2024-12-13 16:06 ` Maarten Lankhorst
2024-12-17 7:46 ` Maxime Ripard
2024-12-17 14:28 ` Maarten Lankhorst
2024-12-17 17:11 ` Tejun Heo
2024-12-17 17:34 ` Maxime Ripard
2024-12-17 17:37 ` Maarten Lankhorst
2024-12-17 18:23 ` Tejun Heo
2024-12-17 20:17 ` Maarten Lankhorst
2025-01-07 15:13 ` Maxime Ripard
2024-12-18 10:28 ` Friedrich Vock
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=202412050415.jf4sa0gH-lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=dev@lankhorst.se \
--cc=dri-devel@lists.freedesktop.org \
--cc=friedrich.vock@gmx.de \
--cc=hannes@cmpxchg.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lizefan.x@bytedance.com \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox