* [PATCH] lib/prime_numbers: Suppress warn on kmalloc failure
@ 2017-01-13 23:51 Chris Wilson
2017-01-14 0:23 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-01-16 7:07 ` [PATCH] " Joonas Lahtinen
0 siblings, 2 replies; 3+ messages in thread
From: Chris Wilson @ 2017-01-13 23:51 UTC (permalink / raw)
To: intel-gfx; +Cc: Daniel Vetter, Joonas Lahtinen, dri-devel
The allocation for the bitmap may become very large, larger than
MAX_ORDER, for large requests. We fail gracefully by falling back to
trail-division, so disable the warning from kmalloc:
521.961092] WARNING: CPU: 0 PID: 30637 at mm/page_alloc.c:3548 __alloc_pages_slowpath+0x237/0x9a0
[ 521.961105] Modules linked in: i915(+) drm_kms_helper intel_gtt prime_numbers [last unloaded: drm_kms_helper]
[ 521.961126] CPU: 0 PID: 30637 Comm: drv_selftest Tainted: G U W 4.10.0-rc3+ #321
[ 521.961137] Hardware name: / , BIOS PYBSWCEL.86A.0027.2015.0507.1758 05/07/2015
[ 521.961148] Call Trace:
[ 521.961161] dump_stack+0x4d/0x6f
[ 521.961172] __warn+0xc1/0xe0
[ 521.961181] warn_slowpath_null+0x18/0x20
[ 521.961189] __alloc_pages_slowpath+0x237/0x9a0
[ 521.961200] ? sg_init_table+0x1a/0x40
[ 521.961208] ? get_page_from_freelist+0x3fa/0x910
[ 521.961275] ? i915_gem_object_get_sg+0x272/0x2b0 [i915]
[ 521.961285] __alloc_pages_nodemask+0x1ea/0x220
[ 521.961295] kmalloc_order+0x1c/0x50
[ 521.961304] __kmalloc+0x115/0x170
[ 521.961314] expand_to_next_prime+0x43/0x180 [prime_numbers]
[ 521.961324] next_prime_number+0x47/0xc0 [prime_numbers]
[ 521.961377] igt_vma_rotate+0x386/0x590 [i915]
[ 521.961429] i915_subtests+0x37/0xc0 [i915]
[ 521.961481] i915_vma_mock_selftests+0x3d/0x70 [i915]
[ 521.961532] run_selftests+0x16e/0x1f0 [i915]
[ 521.961541] ? 0xffffffffa02a4000
[ 521.961592] i915_mock_selftests+0x29/0x40 [i915]
[ 521.961638] i915_init+0xa/0x5e [i915]
[ 521.961646] ? 0xffffffffa02a4000
[ 521.961655] do_one_initcall+0x3e/0x160
[ 521.961664] ? __vunmap+0x7c/0xc0
[ 521.961672] ? vfree+0x29/0x70
[ 521.961680] ? kmem_cache_alloc+0xcf/0x120
[ 521.961690] do_init_module+0x55/0x1c4
[ 521.961699] load_module+0x1f3f/0x25b0
[ 521.961707] ? __symbol_put+0x40/0x40
[ 521.961716] ? kernel_read_file+0x100/0x190
[ 521.961725] SYSC_finit_module+0xbc/0xf0
[ 521.961734] SyS_finit_module+0x9/0x10
[ 521.961744] entry_SYSCALL_64_fastpath+0x17/0x98
[ 521.961752] RIP: 0033:0x7f111aca4119
[ 521.961760] RSP: 002b:00007ffd8be6cbe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
[ 521.961773] RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 00007f111aca4119
[ 521.961781] RDX: 0000000000000000 RSI: 000055dfc18bc8e0 RDI: 0000000000000006
[ 521.961789] RBP: 00007ffd8be6bbe0 R08: 0000000000000000 R09: 0000000000000000
[ 521.961796] R10: 0000000000000006 R11: 0000000000000246 R12: 0000000000000005
[ 521.961805] R13: 000055dfc18bd3a0 R14: 00007ffd8be6bbc0 R15: 0000000000000005
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
---
lib/prime_numbers.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/prime_numbers.c b/lib/prime_numbers.c
index c9b3c29614aa..550eec457c2e 100644
--- a/lib/prime_numbers.c
+++ b/lib/prime_numbers.c
@@ -124,7 +124,8 @@ static bool expand_to_next_prime(unsigned long x)
return false;
sz = round_up(sz, BITS_PER_LONG);
- new = kmalloc(sizeof(*new) + bitmap_size(sz), GFP_KERNEL);
+ new = kmalloc(sizeof(*new) + bitmap_size(sz),
+ GFP_KERNEL | __GFP_NOWARN);
if (!new)
return false;
--
2.11.0
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* ✓ Fi.CI.BAT: success for lib/prime_numbers: Suppress warn on kmalloc failure
2017-01-13 23:51 [PATCH] lib/prime_numbers: Suppress warn on kmalloc failure Chris Wilson
@ 2017-01-14 0:23 ` Patchwork
2017-01-16 7:07 ` [PATCH] " Joonas Lahtinen
1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2017-01-14 0:23 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
== Series Details ==
Series: lib/prime_numbers: Suppress warn on kmalloc failure
URL : https://patchwork.freedesktop.org/series/18004/
State : success
== Summary ==
Series 18004v1 lib/prime_numbers: Suppress warn on kmalloc failure
https://patchwork.freedesktop.org/api/1.0/series/18004/revisions/1/mbox/
fi-bdw-5557u total:246 pass:232 dwarn:0 dfail:0 fail:0 skip:14
fi-bsw-n3050 total:246 pass:207 dwarn:0 dfail:0 fail:0 skip:39
fi-bxt-j4205 total:246 pass:224 dwarn:0 dfail:0 fail:0 skip:22
fi-bxt-t5700 total:82 pass:69 dwarn:0 dfail:0 fail:0 skip:12
fi-byt-j1900 total:246 pass:219 dwarn:0 dfail:0 fail:0 skip:27
fi-byt-n2820 total:246 pass:215 dwarn:0 dfail:0 fail:0 skip:31
fi-hsw-4770 total:246 pass:227 dwarn:0 dfail:0 fail:0 skip:19
fi-hsw-4770r total:246 pass:227 dwarn:0 dfail:0 fail:0 skip:19
fi-ivb-3520m total:246 pass:225 dwarn:0 dfail:0 fail:0 skip:21
fi-ivb-3770 total:246 pass:225 dwarn:0 dfail:0 fail:0 skip:21
fi-kbl-7500u total:246 pass:225 dwarn:0 dfail:0 fail:0 skip:21
fi-skl-6260u total:246 pass:233 dwarn:0 dfail:0 fail:0 skip:13
fi-skl-6700hq total:246 pass:226 dwarn:0 dfail:0 fail:0 skip:20
fi-skl-6700k total:246 pass:222 dwarn:3 dfail:0 fail:0 skip:21
fi-skl-6770hq total:246 pass:233 dwarn:0 dfail:0 fail:0 skip:13
fi-snb-2520m total:246 pass:215 dwarn:0 dfail:0 fail:0 skip:31
fi-snb-2600 total:246 pass:214 dwarn:0 dfail:0 fail:0 skip:32
a957dfe613ab43c6af84833f2b88ea941320250f drm-tip: 2017y-01m-13d-18h-49m-04s UTC integration manifest
7b4105e lib/prime_numbers: Suppress warn on kmalloc failure
== Logs ==
For more details see: https://intel-gfx-ci.01.org/CI/Patchwork_3516/
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] lib/prime_numbers: Suppress warn on kmalloc failure
2017-01-13 23:51 [PATCH] lib/prime_numbers: Suppress warn on kmalloc failure Chris Wilson
2017-01-14 0:23 ` ✓ Fi.CI.BAT: success for " Patchwork
@ 2017-01-16 7:07 ` Joonas Lahtinen
1 sibling, 0 replies; 3+ messages in thread
From: Joonas Lahtinen @ 2017-01-16 7:07 UTC (permalink / raw)
To: Chris Wilson, intel-gfx; +Cc: Daniel Vetter, dri-devel
On pe, 2017-01-13 at 23:51 +0000, Chris Wilson wrote:
> The allocation for the bitmap may become very large, larger than
> MAX_ORDER, for large requests. We fail gracefully by falling back to
> trail-division, so disable the warning from kmalloc:
>
> 521.961092] WARNING: CPU: 0 PID: 30637 at mm/page_alloc.c:3548 __alloc_pages_slowpath+0x237/0x9a0
> [ 521.961105] Modules linked in: i915(+) drm_kms_helper intel_gtt prime_numbers [last unloaded: drm_kms_helper]
> [ 521.961126] CPU: 0 PID: 30637 Comm: drv_selftest Tainted: G U W 4.10.0-rc3+ #321
> [ 521.961137] Hardware name: / , BIOS PYBSWCEL.86A.0027.2015.0507.1758 05/07/2015
> [ 521.961148] Call Trace:
> [ 521.961161] dump_stack+0x4d/0x6f
> [ 521.961172] __warn+0xc1/0xe0
> [ 521.961181] warn_slowpath_null+0x18/0x20
> [ 521.961189] __alloc_pages_slowpath+0x237/0x9a0
> [ 521.961200] ? sg_init_table+0x1a/0x40
> [ 521.961208] ? get_page_from_freelist+0x3fa/0x910
> [ 521.961275] ? i915_gem_object_get_sg+0x272/0x2b0 [i915]
> [ 521.961285] __alloc_pages_nodemask+0x1ea/0x220
> [ 521.961295] kmalloc_order+0x1c/0x50
> [ 521.961304] __kmalloc+0x115/0x170
> [ 521.961314] expand_to_next_prime+0x43/0x180 [prime_numbers]
> [ 521.961324] next_prime_number+0x47/0xc0 [prime_numbers]
> [ 521.961377] igt_vma_rotate+0x386/0x590 [i915]
> [ 521.961429] i915_subtests+0x37/0xc0 [i915]
> [ 521.961481] i915_vma_mock_selftests+0x3d/0x70 [i915]
> [ 521.961532] run_selftests+0x16e/0x1f0 [i915]
> [ 521.961541] ? 0xffffffffa02a4000
> [ 521.961592] i915_mock_selftests+0x29/0x40 [i915]
> [ 521.961638] i915_init+0xa/0x5e [i915]
> [ 521.961646] ? 0xffffffffa02a4000
> [ 521.961655] do_one_initcall+0x3e/0x160
> [ 521.961664] ? __vunmap+0x7c/0xc0
> [ 521.961672] ? vfree+0x29/0x70
> [ 521.961680] ? kmem_cache_alloc+0xcf/0x120
> [ 521.961690] do_init_module+0x55/0x1c4
> [ 521.961699] load_module+0x1f3f/0x25b0
> [ 521.961707] ? __symbol_put+0x40/0x40
> [ 521.961716] ? kernel_read_file+0x100/0x190
> [ 521.961725] SYSC_finit_module+0xbc/0xf0
> [ 521.961734] SyS_finit_module+0x9/0x10
> [ 521.961744] entry_SYSCALL_64_fastpath+0x17/0x98
> [ 521.961752] RIP: 0033:0x7f111aca4119
> [ 521.961760] RSP: 002b:00007ffd8be6cbe8 EFLAGS: 00000246 ORIG_RAX: 0000000000000139
> [ 521.961773] RAX: ffffffffffffffda RBX: 0000000000000006 RCX: 00007f111aca4119
> [ 521.961781] RDX: 0000000000000000 RSI: 000055dfc18bc8e0 RDI: 0000000000000006
> [ 521.961789] RBP: 00007ffd8be6bbe0 R08: 0000000000000000 R09: 0000000000000000
> [ 521.961796] R10: 0000000000000006 R11: 0000000000000246 R12: 0000000000000005
> [ 521.961805] R13: 000055dfc18bd3a0 R14: 00007ffd8be6bbc0 R15: 0000000000000005
>
> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
> Cc: Daniel Vetter <daniel.vetter@intel.com>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Regards, Joonas
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-01-16 7:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-13 23:51 [PATCH] lib/prime_numbers: Suppress warn on kmalloc failure Chris Wilson
2017-01-14 0:23 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-01-16 7:07 ` [PATCH] " Joonas Lahtinen
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.