linux/drivers/gpu/drm
Chris Wilson 4846bf0ca8 drm/i915: Encourage our shrinker more when our shmemfs allocations fails
Commit 24f8e00a8a ("drm/i915: Prefer to report ENOMEM rather than
incur the oom for gfx allocations") made the bold decision to try and
avoid the oomkiller by reporting -ENOMEM to userspace if our allocation
failed after attempting to free enough buffer objects. In short, it
appears we were giving up too easily (even before we start wondering if
one pass of reclaim is as strong as we would like). Part of the problem
is that if we only shrink just enough pages for our expected allocation,
the likelihood of those pages becoming available to us is less than 100%
To counter-act that we ask for twice the number of pages to be made
available. Furthermore, we allow the shrinker to pull pages from the
active list in later passes.

v2: Be a little more cautious in paging out gfx buffers, and leave that
to a more balanced approach from shrink_slab(). Important when combined
with "drm/i915: Start writeback from the shrinker" as anything shrunk is
immediately swapped out and so should be more conservative.

Fixes: 24f8e00a8a ("drm/i915: Prefer to report ENOMEM rather than incur the oom for gfx allocations")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170609110350.1767-1-chris@chris-wilson.co.uk
2017-06-14 10:51:50 +01:00
..
amd Linux 4.12-rc3 2017-05-30 15:54:15 +10:00
arc
arm Linux 4.12-rc3 2017-05-30 15:54:15 +10:00
armada drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPI 2017-05-22 09:49:48 +02:00
ast drm/ast: fix include notation and remove -Iinclude/drm flag 2017-05-16 17:17:51 +02:00
atmel-hlcdc Linux 4.12-rc3 2017-05-30 15:54:15 +10:00
bochs drm/bochs: fix include notation and remove -Iinclude/drm flag 2017-05-16 17:18:23 +02:00
bridge drm/bridge: fix include notation and remove -Iinclude/drm flag 2017-05-16 17:18:47 +02:00
cirrus drm/cirrus: fix include notation and remove -Iinclude/drm flag 2017-05-16 17:18:56 +02:00
etnaviv Linux 4.12-rc3 2017-05-30 15:54:15 +10:00
exynos drm: drop drm_[cm]alloc* helpers 2017-05-18 17:22:39 +02:00
fsl-dcu drm: convert drivers to use drm_of_find_panel_or_bridge 2017-04-06 17:00:27 -04:00
gma500 Linux 4.12-rc3 2017-05-30 15:54:15 +10:00
hisilicon drm/hisilicon: fix include notation and remove -Iinclude/drm flag 2017-05-17 14:35:22 +02:00
i2c drm/i2c: remove unneeded -Iinclude/drm compiler flag 2017-05-18 07:13:04 +02:00
i810 drm/i810: remove unneeded -Iinclude/drm compiler flag 2017-05-18 07:12:57 +02:00
i915 drm/i915: Encourage our shrinker more when our shmemfs allocations fails 2017-06-14 10:51:50 +01:00
imx drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPI 2017-05-22 09:49:48 +02:00
lib
mediatek Merge tag 'drm-misc-next-2017-04-07' of git://anongit.freedesktop.org/git/drm-misc into drm-next 2017-04-11 07:41:10 +10:00
meson drm: convert drivers to use of_graph_get_remote_node 2017-04-06 17:00:27 -04:00
mga drm/mga: remove unneeded -Iinclude/drm compiler flag 2017-05-18 07:13:11 +02:00
mgag200 drm/mgag200: fix include notation and remove -Iinclude/drm flag 2017-05-17 14:35:31 +02:00
msm drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPI 2017-05-22 09:49:48 +02:00
mxsfb drm: convert drivers to use drm_of_find_panel_or_bridge 2017-04-06 17:00:27 -04:00
nouveau Linux 4.12-rc3 2017-05-30 15:54:15 +10:00
omapdrm drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPI 2017-05-22 09:49:48 +02:00
panel drm/panel: Changes for v4.12-rc1 2017-04-13 06:17:40 +10:00
pl111 drm/pl111: Fix return value check in pl111_amba_probe() 2017-05-22 13:34:14 -07:00
qxl Linux 4.12-rc3 2017-05-30 15:54:15 +10:00
r128 drm/r128: remove unneeded -Iinclude/drm compiler flag 2017-05-18 07:13:23 +02:00
radeon Linux 4.12-rc3 2017-05-30 15:54:15 +10:00
rcar-du drm: rcar-du: Add HDMI outputs to R8A7795 device description 2017-04-04 17:04:21 +03:00
rockchip drm/rockchip: analogix_dp: Remove unused check and variables 2017-05-02 14:44:28 -04:00
savage drm/savage: remove unneeded -Iinclude/drm compiler flag 2017-05-18 07:13:34 +02:00
selftests drm/mm: Split up long running selftests with cond_resched() 2017-05-04 08:11:46 +02:00
shmobile
sis drm/sis: remove unneeded -Iinclude/drm compiler flag 2017-05-18 07:13:40 +02:00
sti Merge remote-tracking branch 'airlied/drm-next' into drm-misc-next 2017-05-18 09:24:30 -04:00
stm drm/stm: ltdc: fix duplicated arguments 2017-05-23 15:19:46 +02:00
sun4i Allwinner DRM changes for 4.12 2017-04-20 13:19:34 +10:00
tdfx drm/tdfx: remove unneeded -Iinclude/drm compiler flag 2017-05-18 07:13:47 +02:00
tegra Merge tag 'drm-misc-next-2017-05-16' of git://anongit.freedesktop.org/git/drm-misc into drm-next 2017-05-18 12:57:06 +10:00
tilcdc drm/tilcdc: fix include notation and remove -Iinclude/drm flag 2017-05-17 14:36:49 +02:00
tinydrm
ttm drm: drop drm_[cm]alloc* helpers 2017-05-18 17:22:39 +02:00
udl drm: drop drm_[cm]alloc* helpers 2017-05-18 17:22:39 +02:00
vc4 drm/vc4: fix include notation and remove -Iinclude/drm flag 2017-05-22 09:36:01 +02:00
vgem drm/vgem: Fix return value check in vgem_init() 2017-05-22 09:47:34 +02:00
via drm/via: remove unneeded -Iinclude/drm compiler flag 2017-05-18 07:14:05 +02:00
virtio drm: drop drm_[cm]alloc* helpers 2017-05-18 17:22:39 +02:00
vmwgfx drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPI 2017-05-22 09:49:48 +02:00
zte drm: zte: add VGA driver support 2017-05-04 13:53:05 +08:00
ati_pcigart.c
drm_agpsupport.c
drm_atomic_helper.c drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPI 2017-05-22 09:49:48 +02:00
drm_atomic.c drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPI 2017-05-22 09:49:48 +02:00
drm_auth.c
drm_blend.c drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPI 2017-05-22 09:49:48 +02:00
drm_bridge.c
drm_bufs.c
drm_cache.c
drm_color_mgmt.c drm/doc: Interlink color manager docs better 2017-04-18 08:56:29 +02:00
drm_connector.c drm/atomic: Add support for custom scaling mode properties, v2 2017-05-08 13:20:43 +02:00
drm_context.c
drm_crtc_helper_internal.h
drm_crtc_helper.c
drm_crtc_internal.h drm: extract legacy framebuffer remove 2017-04-06 10:22:43 +02:00
drm_crtc.c drm: Take mode_config.mutex in setcrtc ioctl 2017-04-06 22:49:50 +02:00
drm_debugfs_crc.c Revert "drm: Don't allow interruptions when opening debugfs/crc" 2017-04-07 16:18:28 -04:00
drm_debugfs.c
drm_dma.c
drm_dp_aux_dev.c
drm_dp_dual_mode_helper.c
drm_dp_helper.c
drm_dp_mst_topology.c drm/dp: Wait up all outstanding tx waiters 2017-05-15 14:04:49 +02:00
drm_drv.c
drm_dumb_buffers.c
drm_edid_load.c
drm_edid.c drm/edid: Add 10 bpc quirk for LGD 764 panel in HP zBook 17 G2 2017-05-02 10:37:45 +02:00
drm_encoder_slave.c
drm_encoder.c
drm_fb_cma_helper.c drm/cma-helper: Return ENOENT for "no such gem obj" 2017-04-18 17:57:37 +02:00
drm_fb_helper.c drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPI 2017-05-22 09:49:48 +02:00
drm_file.c drm: Nerf the preclose callback for modern drivers 2017-05-09 13:22:11 +02:00
drm_flip_work.c
drm_fourcc.c
drm_framebuffer.c drm: extract legacy framebuffer remove 2017-04-06 10:22:43 +02:00
drm_gem_cma_helper.c
drm_gem.c drm: drop drm_[cm]alloc* helpers 2017-05-18 17:22:39 +02:00
drm_global.c
drm_hashtab.c
drm_info.c
drm_internal.h
drm_ioc32.c drm: document drm_ioctl.[hc] 2017-04-04 20:47:54 +02:00
drm_ioctl.c drm: Pass CRTC ID in userspace vblank events 2017-04-04 20:59:12 +01:00
drm_irq.c drm/vblank: Lock down vblank->hwmode more 2017-05-10 10:21:37 +02:00
drm_kms_helper_common.c
drm_legacy.h
drm_lock.c
drm_memory.c
drm_mipi_dsi.c
drm_mm.c
drm_mode_config.c
drm_mode_object.c
drm_modes.c
drm_modeset_helper.c
drm_modeset_lock.c drm: Remove drm_modeset_legacy_acquire_ctx and crtc->acquire_ctx 2017-04-05 09:26:45 +02:00
drm_of.c drm: of: introduce drm_of_find_panel_or_bridge 2017-04-06 17:00:27 -04:00
drm_panel.c
drm_pci.c
drm_plane_helper.c drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPI 2017-05-22 09:49:48 +02:00
drm_plane.c drm: Fix deadlock retry loop in page_flip_ioctl 2017-05-23 09:39:14 +02:00
drm_prime.c drm/prime: Introduce drm_gem_prime_import_dev 2017-05-08 09:39:13 +02:00
drm_print.c
drm_probe_helper.c drm/atomic: Acquire connection_mutex lock in drm_helper_probe_single_connector_modes, v4. 2017-04-06 21:29:23 +02:00
drm_property.c drm: Fix get_property logic fumble 2017-04-12 18:11:32 +02:00
drm_rect.c drm: Add DRM_MODE_ROTATE_ and DRM_MODE_REFLECT_ to UAPI 2017-05-22 09:49:48 +02:00
drm_scatter.c
drm_scdc_helper.c
drm_simple_kms_helper.c drm: Clarify the role of plane_state argument to drm_simple update(). 2017-03-30 12:02:00 -07:00
drm_sysfs.c drm: Consolidate and document sysfs support 2017-04-04 20:47:54 +02:00
drm_trace_points.c
drm_trace.h
drm_vm.c
drm_vma_manager.c
Kconfig drm/pl111: Initial drm/kms driver for pl111 2017-05-08 12:24:06 -07:00
Makefile drm/pl111: Initial drm/kms driver for pl111 2017-05-08 12:24:06 -07:00