From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [RFC PATCH 9/9] drm/i915: Use memory cgroup for enforcing device memory limit
Date: Wed, 27 Jan 2021 14:04:29 +0800 [thread overview]
Message-ID: <202101271310.VHpZwVBb-lkp@intel.com> (raw)
In-Reply-To: <20210126214626.16260-10-brian.welty@intel.com>
[-- Attachment #1: Type: text/plain, Size: 6272 bytes --]
Hi Brian,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on next-20210125]
[cannot apply to cgroup/for-next v5.11-rc5]
[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]
url: https://github.com/0day-ci/linux/commits/Brian-Welty/cgroup-support-for-GPU-devices/20210127-090434
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: i386-allyesconfig (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/ba0689386bda43e5a222668b37db638d4cf414e2
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Brian-Welty/cgroup-support-for-GPU-devices/20210127-090434
git checkout ba0689386bda43e5a222668b37db638d4cf414e2
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
In file included from include/drm/drm_mm.h:49,
from drivers/gpu/drm/i915/intel_memory_region.h:13,
from drivers/gpu/drm/i915/gem/i915_gem_region.c:6:
drivers/gpu/drm/i915/gem/i915_gem_region.c: In function 'i915_gem_object_get_pages_buddy':
>> drivers/gpu/drm/i915/gem/i915_gem_region.c:59:13: warning: format '%lld' expects argument of type 'long long int', but argument 3 has type 'resource_size_t' {aka 'unsigned int'} [-Wformat=]
59 | DRM_DEBUG("DRMCG: charge_mem failed for %lld\n", charged);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~
| |
| resource_size_t {aka unsigned int}
include/drm/drm_print.h:504:25: note: in definition of macro 'DRM_DEBUG'
504 | __drm_dbg(DRM_UT_CORE, fmt, ##__VA_ARGS__)
| ^~~
drivers/gpu/drm/i915/gem/i915_gem_region.c:59:46: note: format string is defined here
59 | DRM_DEBUG("DRMCG: charge_mem failed for %lld\n", charged);
| ~~~^
| |
| long long int
| %d
vim +59 drivers/gpu/drm/i915/gem/i915_gem_region.c
> 6 #include "intel_memory_region.h"
7 #include "i915_gem_region.h"
8 #include "i915_drv.h"
9 #include "i915_trace.h"
10
11 void
12 i915_gem_object_put_pages_buddy(struct drm_i915_gem_object *obj,
13 struct sg_table *pages)
14 {
15 u64 freed;
16
17 freed = __intel_memory_region_put_pages_buddy(obj->mm.region,
18 &obj->mm.blocks);
19 obj->mm.dirty = false;
20 sg_free_table(pages);
21 kfree(pages);
22 drm_gem_object_uncharge_mem(&obj->base, freed);
23 }
24
25 int
26 i915_gem_object_get_pages_buddy(struct drm_i915_gem_object *obj)
27 {
28 const u64 max_segment = i915_sg_segment_size();
29 struct intel_memory_region *mem = obj->mm.region;
30 struct list_head *blocks = &obj->mm.blocks;
31 resource_size_t charged, size = obj->base.size;
32 resource_size_t prev_end;
33 struct i915_buddy_block *block;
34 unsigned int flags;
35 struct sg_table *st;
36 struct scatterlist *sg;
37 unsigned int sg_page_sizes;
38 int ret;
39
40 st = kmalloc(sizeof(*st), GFP_KERNEL);
41 if (!st)
42 return -ENOMEM;
43
44 if (sg_alloc_table(st, size >> PAGE_SHIFT, GFP_KERNEL)) {
45 kfree(st);
46 return -ENOMEM;
47 }
48
49 flags = I915_ALLOC_MIN_PAGE_SIZE;
50 if (obj->flags & I915_BO_ALLOC_CONTIGUOUS) {
51 flags |= I915_ALLOC_CONTIGUOUS;
52 charged = roundup_pow_of_two(size);
53 } else {
54 charged = size;
55 }
56
57 ret = drm_gem_object_charge_mem(&obj->base, charged);
58 if (ret) {
> 59 DRM_DEBUG("DRMCG: charge_mem failed for %lld\n", charged);
60 goto err_free_sg;
61 }
62
63 ret = __intel_memory_region_get_pages_buddy(mem, size, flags, blocks);
64 if (ret)
65 goto err_uncharge;
66
67 GEM_BUG_ON(list_empty(blocks));
68
69 sg = st->sgl;
70 st->nents = 0;
71 sg_page_sizes = 0;
72 prev_end = (resource_size_t)-1;
73
74 list_for_each_entry(block, blocks, link) {
75 u64 block_size, offset;
76
77 block_size = min_t(u64, size,
78 i915_buddy_block_size(&mem->mm, block));
79 offset = i915_buddy_block_offset(block);
80
81 while (block_size) {
82 u64 len;
83
84 if (offset != prev_end || sg->length >= max_segment) {
85 if (st->nents) {
86 sg_page_sizes |= sg->length;
87 sg = __sg_next(sg);
88 }
89
90 sg_dma_address(sg) = mem->region.start + offset;
91 sg_dma_len(sg) = 0;
92 sg->length = 0;
93 st->nents++;
94 }
95
96 len = min(block_size, max_segment - sg->length);
97 sg->length += len;
98 sg_dma_len(sg) += len;
99
100 offset += len;
101 block_size -= len;
102
103 prev_end = offset;
104 }
105 }
106
107 sg_page_sizes |= sg->length;
108 sg_mark_end(sg);
109 i915_sg_trim(st);
110
111 __i915_gem_object_set_pages(obj, st, sg_page_sizes);
112
113 return 0;
114
115 err_uncharge:
116 drm_gem_object_uncharge_mem(&obj->base, charged);
117 err_free_sg:
118 sg_free_table(st);
119 kfree(st);
120 return ret;
121 }
122
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 76720 bytes --]
next prev parent reply other threads:[~2021-01-27 6:04 UTC|newest]
Thread overview: 110+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-26 21:46 [RFC PATCH 0/9] cgroup support for GPU devices Brian Welty
2021-01-26 21:46 ` Brian Welty
2021-01-26 21:46 ` Brian Welty
2021-01-26 21:46 ` [Intel-gfx] " Brian Welty
2021-01-26 21:46 ` [RFC PATCH 1/9] cgroup: Introduce cgroup for drm subsystem Brian Welty
2021-01-26 21:46 ` Brian Welty
2021-01-26 21:46 ` Brian Welty
2021-01-26 21:46 ` [Intel-gfx] " Brian Welty
2021-01-26 21:46 ` [RFC PATCH 2/9] drm, cgroup: Bind drm and cgroup subsystem Brian Welty
2021-01-26 21:46 ` Brian Welty
2021-01-26 21:46 ` Brian Welty
2021-01-26 21:46 ` [Intel-gfx] " Brian Welty
2021-01-26 21:46 ` [RFC PATCH 3/9] drm, cgroup: Initialize drmcg properties Brian Welty
2021-01-26 21:46 ` Brian Welty
2021-01-26 21:46 ` Brian Welty
2021-01-26 21:46 ` [Intel-gfx] " Brian Welty
2021-01-26 21:46 ` [RFC PATCH 4/9] drmcg: Add skeleton seq_show and write for drmcg files Brian Welty
2021-01-26 21:46 ` Brian Welty
2021-01-26 21:46 ` Brian Welty
2021-01-26 21:46 ` [Intel-gfx] " Brian Welty
2021-01-26 21:46 ` [RFC PATCH 5/9] drmcg: Add support for device memory accounting via page counter Brian Welty
2021-01-26 21:46 ` Brian Welty
2021-01-26 21:46 ` Brian Welty
2021-01-26 21:46 ` [Intel-gfx] " Brian Welty
2021-01-27 9:14 ` kernel test robot
2021-01-26 21:46 ` [RFC PATCH 6/9] drmcg: Add memory.total file Brian Welty
2021-01-26 21:46 ` Brian Welty
2021-01-26 21:46 ` Brian Welty
2021-01-26 21:46 ` [Intel-gfx] " Brian Welty
2021-01-26 21:46 ` [RFC PATCH 7/9] drmcg: Add initial support for tracking gpu time usage Brian Welty
2021-01-26 21:46 ` Brian Welty
2021-01-26 21:46 ` Brian Welty
2021-01-26 21:46 ` [Intel-gfx] " Brian Welty
2021-02-03 13:25 ` Joonas Lahtinen
2021-02-03 13:25 ` Joonas Lahtinen
2021-02-03 13:25 ` [Intel-gfx] " Joonas Lahtinen
2021-02-04 2:23 ` Brian Welty
2021-02-04 2:23 ` Brian Welty
2021-02-04 2:23 ` Brian Welty
2021-02-04 2:23 ` [Intel-gfx] " Brian Welty
2021-01-26 21:46 ` [RFC PATCH 8/9] drm/gem: Associate GEM objects with drm cgroup Brian Welty
2021-01-26 21:46 ` Brian Welty
2021-01-26 21:46 ` Brian Welty
2021-01-26 21:46 ` [Intel-gfx] " Brian Welty
2021-02-09 10:54 ` Daniel Vetter
2021-02-09 10:54 ` Daniel Vetter
2021-02-09 10:54 ` Daniel Vetter
2021-02-09 10:54 ` [Intel-gfx] " Daniel Vetter
2021-02-10 7:52 ` Thomas Zimmermann
2021-02-10 7:52 ` Thomas Zimmermann
2021-02-10 7:52 ` Thomas Zimmermann
2021-02-10 7:52 ` [Intel-gfx] " Thomas Zimmermann
2021-02-10 12:45 ` Daniel Vetter
2021-02-10 12:45 ` Daniel Vetter
2021-02-10 12:45 ` Daniel Vetter
2021-02-10 12:45 ` [Intel-gfx] " Daniel Vetter
2021-02-10 22:00 ` Brian Welty
2021-02-10 22:00 ` Brian Welty
2021-02-10 22:00 ` Brian Welty
2021-02-10 22:00 ` [Intel-gfx] " Brian Welty
2021-02-11 15:34 ` Daniel Vetter
2021-02-11 15:34 ` Daniel Vetter
2021-02-11 15:34 ` Daniel Vetter
2021-02-11 15:34 ` [Intel-gfx] " Daniel Vetter
2021-03-06 0:44 ` Brian Welty
2021-03-06 0:44 ` Brian Welty
2021-03-06 0:44 ` Brian Welty
2021-03-06 0:44 ` [Intel-gfx] " Brian Welty
2021-03-18 10:16 ` Daniel Vetter
2021-03-18 10:16 ` Daniel Vetter
2021-03-18 10:16 ` Daniel Vetter
2021-03-18 10:16 ` [Intel-gfx] " Daniel Vetter
2021-03-18 19:20 ` Brian Welty
2021-03-18 19:20 ` Brian Welty
2021-03-18 19:20 ` Brian Welty
2021-03-18 19:20 ` [Intel-gfx] " Brian Welty
2021-05-10 15:36 ` Daniel Vetter
2021-05-10 15:36 ` Daniel Vetter
2021-05-10 15:36 ` Daniel Vetter
2021-05-10 15:36 ` [Intel-gfx] " Daniel Vetter
2021-05-10 16:06 ` Tamminen, Eero T
2021-05-10 16:06 ` Tamminen, Eero T
2021-05-10 16:06 ` Tamminen, Eero T
2021-05-10 16:06 ` [Intel-gfx] " Tamminen, Eero T
2021-01-26 21:46 ` [RFC PATCH 9/9] drm/i915: Use memory cgroup for enforcing device memory limit Brian Welty
2021-01-26 21:46 ` Brian Welty
2021-01-26 21:46 ` Brian Welty
2021-01-26 21:46 ` [Intel-gfx] " Brian Welty
2021-01-27 6:04 ` kernel test robot [this message]
2021-01-26 22:37 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for cgroup support for GPU devices (rev3) Patchwork
2021-01-26 22:40 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-01-26 23:07 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-01-26 23:07 ` [Intel-gfx] ✗ Fi.CI.BUILD: warning " Patchwork
2021-01-27 4:55 ` [Intel-gfx] ✓ Fi.CI.IGT: success " Patchwork
2021-01-29 2:45 ` [RFC PATCH 0/9] cgroup support for GPU devices Xingyou Chen
2021-01-29 2:45 ` Xingyou Chen
2021-01-29 2:45 ` Xingyou Chen
2021-01-29 2:45 ` [Intel-gfx] " Xingyou Chen
2021-01-29 3:00 ` Xingyou Chen
2021-01-29 3:00 ` Xingyou Chen
2021-01-29 3:00 ` Xingyou Chen
2021-01-29 3:00 ` [Intel-gfx] " Xingyou Chen
2021-02-01 23:21 ` Brian Welty
2021-02-01 23:21 ` Brian Welty
2021-02-01 23:21 ` Brian Welty
2021-02-01 23:21 ` [Intel-gfx] " Brian Welty
2021-02-03 10:18 ` Daniel Vetter
2021-02-03 10:18 ` Daniel Vetter
2021-02-03 10:18 ` Daniel Vetter
2021-02-03 10:18 ` [Intel-gfx] " Daniel Vetter
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=202101271310.VHpZwVBb-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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.