* [Intel-gfx] [PATCH 1/2] drm/i915: consider min_page_size when migrating
@ 2022-04-07 11:06 Matthew Auld
2022-04-07 11:06 ` [Intel-gfx] [PATCH 2/2] drm/i915/buddy: sanity check the size Matthew Auld
2022-04-07 15:57 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: consider min_page_size when migrating Patchwork
0 siblings, 2 replies; 4+ messages in thread
From: Matthew Auld @ 2022-04-07 11:06 UTC (permalink / raw)
To: intel-gfx; +Cc: Thomas Hellström, Nirmoy Das, dri-devel
We can only force migrate an object if the existing object size is
compatible with the new destinations min_page_size for the region.
Currently we blow up with something like:
[ 2857.497462] kernel BUG at drivers/gpu/drm/i915/gt/intel_migrate.c:431!
[ 2857.497497] invalid opcode: 0000 [#1] PREEMPT SMP NOPTI
[ 2857.497502] CPU: 1 PID: 8921 Comm: i915_selftest Tainted: G U W 5.18.0-rc1-drm-tip+ #27
[ 2857.497513] RIP: 0010:emit_pte.cold+0x11a/0x17e [i915]
[ 2857.497646] Code: 00 48 c7 c2 f0 cd c1 a0 48 c7 c7 e9 99 bd a0 e8 d2 77 5d e0 bf 01 00 00 00 e8 08 47 5d e0 31 f6 bf 09 00 00 00 e8 3c 7b 4d e0 <0f> 0b 48 c7 c1 e0 2a c5 a0 ba 34 00 00 00 48 c7 c6 00 ce c1 a0 48
[ 2857.497654] RSP: 0018:ffffc900000f7748 EFLAGS: 00010246
[ 2857.497658] RAX: 0000000000000000 RBX: ffffc900000f77c8 RCX: 0000000000000006
[ 2857.497662] RDX: 0000000000000000 RSI: 0000000000000000 RDI: 0000000000000009
[ 2857.497665] RBP: 0000000000000000 R08: 0000000000000001 R09: 0000000000000001
[ 2857.497668] R10: 0000000000022302 R11: ffff88846dea08f0 R12: 0000000000010000
[ 2857.497672] R13: 0000000001880000 R14: 000000000000081b R15: ffff888106b7c040
[ 2857.497675] FS: 00007f0d4c4e0600(0000) GS:ffff88845da80000(0000) knlGS:0000000000000000
[ 2857.497679] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 2857.497682] CR2: 00007f113966c088 CR3: 0000000211e60003 CR4: 00000000003706e0
[ 2857.497686] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 2857.497689] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
[ 2857.497692] Call Trace:
[ 2857.497694] <TASK>
[ 2857.497697] intel_context_migrate_copy+0x1e5/0x4f0 [i915]
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Nirmoy Das <nirmoy.das@linux.intel.com>
Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>
---
drivers/gpu/drm/i915/gem/i915_gem_object.c | 3 +++
drivers/gpu/drm/i915/gem/selftests/i915_gem_migrate.c | 4 +++-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/gem/i915_gem_object.c b/drivers/gpu/drm/i915/gem/i915_gem_object.c
index c1c3b510b9e2..07e816ddfb3d 100644
--- a/drivers/gpu/drm/i915/gem/i915_gem_object.c
+++ b/drivers/gpu/drm/i915/gem/i915_gem_object.c
@@ -606,6 +606,9 @@ bool i915_gem_object_can_migrate(struct drm_i915_gem_object *obj,
if (!mr)
return false;
+ if (!IS_ALIGNED(obj->base.size, mr->min_page_size))
+ return false;
+
if (obj->mm.region == mr)
return true;
diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_migrate.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_migrate.c
index 9922ac91ec71..6f98adb3a103 100644
--- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_migrate.c
+++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_migrate.c
@@ -47,14 +47,16 @@ static int igt_create_migrate(struct intel_gt *gt, enum intel_region_id src,
{
struct drm_i915_private *i915 = gt->i915;
struct intel_memory_region *src_mr = i915->mm.regions[src];
+ struct intel_memory_region *dst_mr = i915->mm.regions[dst];
struct drm_i915_gem_object *obj;
struct i915_gem_ww_ctx ww;
int err = 0;
GEM_BUG_ON(!src_mr);
+ GEM_BUG_ON(!dst_mr);
/* Switch object backing-store on create */
- obj = i915_gem_object_create_region(src_mr, PAGE_SIZE, 0, 0);
+ obj = i915_gem_object_create_region(src_mr, dst_mr->min_page_size, 0, 0);
if (IS_ERR(obj))
return PTR_ERR(obj);
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Intel-gfx] [PATCH 2/2] drm/i915/buddy: sanity check the size
2022-04-07 11:06 [Intel-gfx] [PATCH 1/2] drm/i915: consider min_page_size when migrating Matthew Auld
@ 2022-04-07 11:06 ` Matthew Auld
2022-04-07 17:06 ` Das, Nirmoy
2022-04-07 15:57 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: consider min_page_size when migrating Patchwork
1 sibling, 1 reply; 4+ messages in thread
From: Matthew Auld @ 2022-04-07 11:06 UTC (permalink / raw)
To: intel-gfx; +Cc: Thomas Hellström, dri-devel
Ensure we check that the size is compatible with the requested
page_size. For tiny objects that are automatically annotated with
TTM_PL_FLAG_CONTIGUOUS(since they fit within a single page), we
currently end up silently overriding the min_page_size, which ends up
hiding bugs elsewhere.
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
Cc: Nirmoy Das <nirmoy.das@linux.intel.com>
---
drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c b/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c
index 8e4e3f72c1ef..a5109548abc0 100644
--- a/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c
+++ b/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c
@@ -70,6 +70,7 @@ static int i915_ttm_buddy_man_alloc(struct ttm_resource_manager *man,
min_page_size = bo->page_alignment << PAGE_SHIFT;
GEM_BUG_ON(min_page_size < mm->chunk_size);
+ GEM_BUG_ON(!IS_ALIGNED(size, min_page_size));
if (place->fpfn + bman_res->base.num_pages != place->lpfn &&
place->flags & TTM_PL_FLAG_CONTIGUOUS) {
--
2.34.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: consider min_page_size when migrating
2022-04-07 11:06 [Intel-gfx] [PATCH 1/2] drm/i915: consider min_page_size when migrating Matthew Auld
2022-04-07 11:06 ` [Intel-gfx] [PATCH 2/2] drm/i915/buddy: sanity check the size Matthew Auld
@ 2022-04-07 15:57 ` Patchwork
1 sibling, 0 replies; 4+ messages in thread
From: Patchwork @ 2022-04-07 15:57 UTC (permalink / raw)
To: Matthew Auld; +Cc: intel-gfx
[-- Attachment #1: Type: text/plain, Size: 8774 bytes --]
== Series Details ==
Series: series starting with [1/2] drm/i915: consider min_page_size when migrating
URL : https://patchwork.freedesktop.org/series/102333/
State : failure
== Summary ==
CI Bug Log - changes from CI_DRM_11472 -> Patchwork_22811
====================================================
Summary
-------
**FAILURE**
Serious unknown changes coming with Patchwork_22811 absolutely need to be
verified manually.
If you think the reported changes have nothing to do with the changes
introduced in Patchwork_22811, please notify your bug team to allow them
to document this new failure mode, which will reduce false positives in CI.
External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22811/index.html
Participating hosts (47 -> 37)
------------------------------
Additional (2): fi-bwr-2160 fi-pnv-d510
Missing (12): shard-tglu bat-adls-5 bat-dg1-6 bat-dg1-5 bat-dg2-8 bat-dg2-9 fi-bsw-cyan bat-adlp-6 bat-rpls-1 fi-bdw-samus bat-jsl-2 bat-jsl-1
Possible new issues
-------------------
Here are the unknown changes that may have been introduced in Patchwork_22811:
### CI changes ###
#### Possible regressions ####
* boot:
- fi-pnv-d510: NOTRUN -> [FAIL][1]
[1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22811/fi-pnv-d510/boot.html
- fi-bwr-2160: NOTRUN -> [FAIL][2]
[2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22811/fi-bwr-2160/boot.html
### IGT changes ###
#### Possible regressions ####
* igt@gem_lmem_swapping@basic:
- fi-cfl-8109u: NOTRUN -> [FAIL][3]
[3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22811/fi-cfl-8109u/igt@gem_lmem_swapping@basic.html
* igt@gem_lmem_swapping@parallel-random-engines:
- fi-bsw-nick: NOTRUN -> [FAIL][4]
[4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22811/fi-bsw-nick/igt@gem_lmem_swapping@parallel-random-engines.html
#### Warnings ####
* igt@runner@aborted:
- fi-bdw-5557u: [FAIL][5] ([i915#4312]) -> [FAIL][6]
[5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11472/fi-bdw-5557u/igt@runner@aborted.html
[6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22811/fi-bdw-5557u/igt@runner@aborted.html
- fi-kbl-7567u: [FAIL][7] ([i915#4312]) -> [FAIL][8]
[7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11472/fi-kbl-7567u/igt@runner@aborted.html
[8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22811/fi-kbl-7567u/igt@runner@aborted.html
#### Suppressed ####
The following results come from untrusted machines, tests, or statuses.
They do not affect the overall result.
* igt@gem_lmem_swapping@basic:
- {fi-tgl-dsi}: NOTRUN -> [SKIP][9] +2 similar issues
[9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22811/fi-tgl-dsi/igt@gem_lmem_swapping@basic.html
- {fi-jsl-1}: [FAIL][10] -> [SKIP][11]
[10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11472/fi-jsl-1/igt@gem_lmem_swapping@basic.html
[11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22811/fi-jsl-1/igt@gem_lmem_swapping@basic.html
* igt@gem_lmem_swapping@parallel-random-engines:
- {fi-jsl-1}: NOTRUN -> [FAIL][12]
[12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22811/fi-jsl-1/igt@gem_lmem_swapping@parallel-random-engines.html
Known issues
------------
Here are the changes found in Patchwork_22811 that come from known issues:
### IGT changes ###
#### Issues hit ####
* igt@core_auth@basic-auth:
- fi-kbl-8809g: NOTRUN -> [SKIP][13] ([fdo#109271]) +1 similar issue
[13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22811/fi-kbl-8809g/igt@core_auth@basic-auth.html
* igt@fbdev@eof:
- fi-kbl-8809g: NOTRUN -> [INCOMPLETE][14] ([i915#5557])
[14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22811/fi-kbl-8809g/igt@fbdev@eof.html
* igt@gem_exec_fence@basic-await:
- fi-bsw-nick: NOTRUN -> [SKIP][15] ([fdo#109271]) +151 similar issues
[15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22811/fi-bsw-nick/igt@gem_exec_fence@basic-await.html
* igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-b:
- fi-cfl-8109u: NOTRUN -> [SKIP][16] ([fdo#109271]) +145 similar issues
[16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22811/fi-cfl-8109u/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-b.html
* igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-c:
- fi-cfl-8109u: NOTRUN -> [SKIP][17] ([fdo#109271] / [i915#5341])
[17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22811/fi-cfl-8109u/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-c.html
- fi-bsw-nick: NOTRUN -> [SKIP][18] ([fdo#109271] / [i915#5341])
[18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22811/fi-bsw-nick/igt@kms_pipe_crc_basic@compare-crc-sanitycheck-pipe-c.html
#### Warnings ####
* igt@runner@aborted:
- fi-bsw-kefka: [FAIL][19] ([i915#4312]) -> [FAIL][20] ([i915#3690])
[19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11472/fi-bsw-kefka/igt@runner@aborted.html
[20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22811/fi-bsw-kefka/igt@runner@aborted.html
- fi-cfl-8109u: [FAIL][21] -> [FAIL][22] ([i915#4312])
[21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11472/fi-cfl-8109u/igt@runner@aborted.html
[22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22811/fi-cfl-8109u/igt@runner@aborted.html
- fi-bsw-nick: [FAIL][23] ([i915#3690]) -> [FAIL][24] ([i915#4312])
[23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11472/fi-bsw-nick/igt@runner@aborted.html
[24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22811/fi-bsw-nick/igt@runner@aborted.html
- fi-kbl-8809g: [FAIL][25] -> [FAIL][26] ([i915#2722])
[25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11472/fi-kbl-8809g/igt@runner@aborted.html
[26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22811/fi-kbl-8809g/igt@runner@aborted.html
- fi-hsw-4770: [FAIL][27] ([i915#4312]) -> [FAIL][28] ([i915#4312] / [i915#5594])
[27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11472/fi-hsw-4770/igt@runner@aborted.html
[28]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22811/fi-hsw-4770/igt@runner@aborted.html
- fi-kbl-guc: [FAIL][29] ([i915#4312] / [i915#5257]) -> [FAIL][30] ([i915#4312])
[29]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11472/fi-kbl-guc/igt@runner@aborted.html
[30]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22811/fi-kbl-guc/igt@runner@aborted.html
- fi-tgl-1115g4: [FAIL][31] ([i915#4312] / [i915#5257]) -> [FAIL][32] ([i915#3690])
[31]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11472/fi-tgl-1115g4/igt@runner@aborted.html
[32]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22811/fi-tgl-1115g4/igt@runner@aborted.html
- fi-cfl-guc: [FAIL][33] ([i915#4312]) -> [FAIL][34] ([i915#4312] / [i915#5257])
[33]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_11472/fi-cfl-guc/igt@runner@aborted.html
[34]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22811/fi-cfl-guc/igt@runner@aborted.html
{name}: This element is suppressed. This means it is ignored when computing
the status of the difference (SUCCESS, WARNING, or FAILURE).
[fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271
[fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315
[fdo#111615]: https://bugs.freedesktop.org/show_bug.cgi?id=111615
[i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575
[i915#2722]: https://gitlab.freedesktop.org/drm/intel/issues/2722
[i915#3690]: https://gitlab.freedesktop.org/drm/intel/issues/3690
[i915#4312]: https://gitlab.freedesktop.org/drm/intel/issues/4312
[i915#5257]: https://gitlab.freedesktop.org/drm/intel/issues/5257
[i915#5341]: https://gitlab.freedesktop.org/drm/intel/issues/5341
[i915#5557]: https://gitlab.freedesktop.org/drm/intel/issues/5557
[i915#5594]: https://gitlab.freedesktop.org/drm/intel/issues/5594
Build changes
-------------
* Linux: CI_DRM_11472 -> Patchwork_22811
CI-20190529: 20190529
CI_DRM_11472: 85882df13168c5f46b41401b96975de857e3ccac @ git://anongit.freedesktop.org/gfx-ci/linux
IGT_6415: c3b690bd5f7fb1fb7ed786ab0f3b815930a6a55f @ https://gitlab.freedesktop.org/drm/igt-gpu-tools.git
Patchwork_22811: 07096a893ef20e5fa25c76d7aba66fc01f504b82 @ git://anongit.freedesktop.org/gfx-ci/linux
== Linux commits ==
07096a893ef2 drm/i915/buddy: sanity check the size
0a6057c62aa5 drm/i915: consider min_page_size when migrating
== Logs ==
For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_22811/index.html
[-- Attachment #2: Type: text/html, Size: 11042 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Intel-gfx] [PATCH 2/2] drm/i915/buddy: sanity check the size
2022-04-07 11:06 ` [Intel-gfx] [PATCH 2/2] drm/i915/buddy: sanity check the size Matthew Auld
@ 2022-04-07 17:06 ` Das, Nirmoy
0 siblings, 0 replies; 4+ messages in thread
From: Das, Nirmoy @ 2022-04-07 17:06 UTC (permalink / raw)
To: Matthew Auld, intel-gfx; +Cc: Thomas Hellström, dri-devel
[-- Attachment #1: Type: text/plain, Size: 1274 bytes --]
|Reviewed-by: Nirmoy Das <nirmoy.das@intel.com>|
On 4/7/2022 1:06 PM, Matthew Auld wrote:
> Ensure we check that the size is compatible with the requested
> page_size. For tiny objects that are automatically annotated with
> TTM_PL_FLAG_CONTIGUOUS(since they fit within a single page), we
> currently end up silently overriding the min_page_size, which ends up
> hiding bugs elsewhere.
>
> Signed-off-by: Matthew Auld<matthew.auld@intel.com>
> Cc: Thomas Hellström<thomas.hellstrom@linux.intel.com>
> Cc: Nirmoy Das<nirmoy.das@linux.intel.com>
> ---
> drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c b/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c
> index 8e4e3f72c1ef..a5109548abc0 100644
> --- a/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c
> +++ b/drivers/gpu/drm/i915/i915_ttm_buddy_manager.c
> @@ -70,6 +70,7 @@ static int i915_ttm_buddy_man_alloc(struct ttm_resource_manager *man,
> min_page_size = bo->page_alignment << PAGE_SHIFT;
>
> GEM_BUG_ON(min_page_size < mm->chunk_size);
> + GEM_BUG_ON(!IS_ALIGNED(size, min_page_size));
>
> if (place->fpfn + bman_res->base.num_pages != place->lpfn &&
> place->flags & TTM_PL_FLAG_CONTIGUOUS) {
[-- Attachment #2: Type: text/html, Size: 2054 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-04-07 17:06 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-07 11:06 [Intel-gfx] [PATCH 1/2] drm/i915: consider min_page_size when migrating Matthew Auld
2022-04-07 11:06 ` [Intel-gfx] [PATCH 2/2] drm/i915/buddy: sanity check the size Matthew Auld
2022-04-07 17:06 ` Das, Nirmoy
2022-04-07 15:57 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: consider min_page_size when migrating Patchwork
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox