linux-stable/drivers/gpu/drm
Matthew Wilcox (Oracle) f9bff0e318 minmax: add in_range() macro
Patch series "New page table range API", v6.

This patchset changes the API used by the MM to set up page table entries.
The four APIs are:

    set_ptes(mm, addr, ptep, pte, nr)
    update_mmu_cache_range(vma, addr, ptep, nr)
    flush_dcache_folio(folio) 
    flush_icache_pages(vma, page, nr)

flush_dcache_folio() isn't technically new, but no architecture
implemented it, so I've done that for them.  The old APIs remain around
but are mostly implemented by calling the new interfaces.

The new APIs are based around setting up N page table entries at once. 
The N entries belong to the same PMD, the same folio and the same VMA, so
ptep++ is a legitimate operation, and locking is taken care of for you. 
Some architectures can do a better job of it than just a loop, but I have
hesitated to make too deep a change to architectures I don't understand
well.

One thing I have changed in every architecture is that PG_arch_1 is now a
per-folio bit instead of a per-page bit when used for dcache clean/dirty
tracking.  This was something that would have to happen eventually, and it
makes sense to do it now rather than iterate over every page involved in a
cache flush and figure out if it needs to happen.

The point of all this is better performance, and Fengwei Yin has measured
improvement on x86.  I suspect you'll see improvement on your architecture
too.  Try the new will-it-scale test mentioned here:
https://lore.kernel.org/linux-mm/20230206140639.538867-5-fengwei.yin@intel.com/
You'll need to run it on an XFS filesystem and have
CONFIG_TRANSPARENT_HUGEPAGE set.

This patchset is the basis for much of the anonymous large folio work
being done by Ryan, so it's received quite a lot of testing over the last
few months.


This patch (of 38):

Determine if a value lies within a range more efficiently (subtraction +
comparison vs two comparisons and an AND).  It also has useful (under some
circumstances) behaviour if the range exceeds the maximum value of the
type.  Convert all the conflicting definitions of in_range() within the
kernel; some can use the generic definition while others need their own
definition.

Link: https://lkml.kernel.org/r/20230802151406.3735276-1-willy@infradead.org
Link: https://lkml.kernel.org/r/20230802151406.3735276-2-willy@infradead.org
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2023-08-24 16:20:18 -07:00
..
amd drm/amdkfd: use vma_is_initial_stack() and vma_is_initial_heap() 2023-08-21 13:37:31 -07:00
arm minmax: add in_range() macro 2023-08-24 16:20:18 -07:00
armada drm/client: Send hotplug event after registering a client 2023-07-11 14:02:01 +02:00
aspeed
ast drm/ast: Fix modeset failed on DisplayPort 2023-06-01 10:40:38 +02:00
atmel-hlcdc
bridge Linux 6.5-rc1 2023-07-11 09:23:20 +02:00
display drm changes for 6.5-rc1: 2023-06-29 11:00:17 -07:00
etnaviv
exynos drm/client: Send hotplug event after registering a client 2023-07-11 14:02:01 +02:00
fsl-dcu
gma500 drm/client: Send hotplug event after registering a client 2023-07-11 14:02:01 +02:00
gud
hisilicon
hyperv
i2c drm changes for 6.5-rc1: 2023-06-29 11:00:17 -07:00
i915 drm/i915: Fix an error handling path in igt_write_huge() 2023-07-25 08:38:12 +01:00
imx
ingenic
kmb
lib
lima drm/lima: fix sched context destroy 2023-06-07 11:53:22 +08:00
logicvc
mcde
mediatek drm/mediatek: Replace all non-returning strlcpy with strscpy 2023-06-01 07:07:37 -07:00
meson drm/meson: venc: include linux/bitfield.h 2023-06-02 15:47:52 +02:00
mgag200
msm minmax: add in_range() macro 2023-08-24 16:20:18 -07:00
mxsfb drm: lcdif: Add i.MX93 LCDIF compatible string 2023-05-26 19:07:33 +02:00
nouveau drm/nouveau/kms/nv50-: init hpd_irq_lock for PIOR DP 2023-07-19 11:08:47 +02:00
omapdrm drm/client: Send hotplug event after registering a client 2023-07-11 14:02:01 +02:00
panel Linux 6.5-rc1 2023-07-11 09:23:20 +02:00
panfrost
pl111
qxl
radeon drm/client: Send hotplug event after registering a client 2023-07-11 14:02:01 +02:00
renesas drm: Place Renesas drivers in a separate dir 2023-05-29 16:41:03 +03:00
rockchip drm changes for 6.5-rc1: 2023-06-29 11:00:17 -07:00
scheduler Linux 6.5-rc1 2023-07-11 09:23:20 +02:00
solomon drm: Switch i2c drivers back to use .probe() 2023-05-30 16:55:16 -07:00
sprd
sti
stm drm/stm: ltdc: fix late dereference check 2023-05-26 13:31:22 +02:00
sun4i drm changes for 6.5-rc1: 2023-06-29 11:00:17 -07:00
tegra drm/client: Send hotplug event after registering a client 2023-07-11 14:02:01 +02:00
tests
tidss
tilcdc
tiny
ttm Linux 6.5-rc1 2023-07-11 09:23:20 +02:00
tve200
udl
v3d
vboxvideo
vc4 Merge tag 'amd-drm-next-6.5-2023-06-09' of https://gitlab.freedesktop.org/agd5f/linux into drm-next 2023-06-15 14:11:22 +10:00
vgem
virtio drm/virtio: Wait for each dma-fence of in-fence array individually 2023-06-03 04:50:50 +03:00
vkms
vmwgfx drm/vmwgfx: Add unwind hints around RBP clobber 2023-06-07 10:03:12 -07:00
xen
xlnx
Kconfig Renesas DRM/KMS drivers: 2023-06-09 11:17:00 +10:00
Makefile Merge tag 'amd-drm-next-6.5-2023-06-09' of https://gitlab.freedesktop.org/agd5f/linux into drm-next 2023-06-15 14:11:22 +10:00
drm_agpsupport.c
drm_aperture.c
drm_atomic.c drm/atomic: Fix potential use-after-free in nonblocking commits 2023-07-21 09:53:30 -07:00
drm_atomic_helper.c
drm_atomic_state_helper.c
drm_atomic_uapi.c
drm_auth.c
drm_blend.c
drm_bridge.c
drm_bridge_connector.c
drm_buddy.c
drm_bufs.c
drm_cache.c
drm_client.c drm/client: Send hotplug event after registering a client 2023-07-11 14:02:01 +02:00
drm_client_modeset.c drm/client: Fix memory leak in drm_client_modeset_probe 2023-07-13 15:55:58 +02:00
drm_color_mgmt.c
drm_connector.c drm/connector: Allow drivers to pass list of supported colorspaces 2023-06-09 12:46:44 -04:00
drm_context.c
drm_crtc.c
drm_crtc_helper.c
drm_crtc_helper_internal.h
drm_crtc_internal.h
drm_damage_helper.c
drm_debugfs.c
drm_debugfs_crc.c
drm_displayid.c
drm_dma.c
drm_drv.c
drm_dumb_buffers.c
drm_edid.c drm/edid: make drm_edid_duplicate() safe to call with NULL parameter 2023-06-02 13:23:30 +03:00
drm_edid_load.c
drm_encoder.c
drm_encoder_slave.c
drm_fb_dma_helper.c
drm_fb_helper.c Linux 6.4-rc7 2023-06-19 16:01:25 +10:00
drm_fbdev_dma.c drm/client: Send hotplug event after registering a client 2023-07-11 14:02:01 +02:00
drm_fbdev_generic.c drm/client: Send hotplug event after registering a client 2023-07-11 14:02:01 +02:00
drm_file.c drm: Add fdinfo memory stats 2023-05-24 18:03:30 +02:00
drm_flip_work.c
drm_format_helper.c
drm_fourcc.c
drm_framebuffer.c
drm_gem.c drm: convert drm_gem_put_pages() to use a folio_batch 2023-06-23 16:59:29 -07:00
drm_gem_atomic_helper.c
drm_gem_dma_helper.c
drm_gem_framebuffer_helper.c
drm_gem_shmem_helper.c
drm_gem_ttm_helper.c
drm_gem_vram_helper.c
drm_hashtab.c
drm_internal.h
drm_ioc32.c
drm_ioctl.c
drm_irq.c
drm_kms_helper_common.c
drm_lease.c
drm_legacy.h
drm_legacy_misc.c
drm_lock.c
drm_managed.c drivers/gpu: use ARCH_DMA_MINALIGN instead of ARCH_KMALLOC_MINALIGN 2023-06-19 16:19:21 -07:00
drm_memory.c
drm_mipi_dbi.c
drm_mipi_dsi.c drm/display/dp_mst: Replace all non-returning strlcpy with strscpy 2023-06-01 07:07:36 -07:00
drm_mm.c
drm_mode_config.c
drm_mode_object.c
drm_modes.c
drm_modeset_helper.c
drm_modeset_lock.c
drm_of.c
drm_panel.c
drm_panel_orientation_quirks.c
drm_pci.c
drm_plane.c
drm_plane_helper.c
drm_prime.c
drm_print.c
drm_privacy_screen.c
drm_privacy_screen_x86.c
drm_probe_helper.c
drm_property.c
drm_rect.c
drm_scatter.c
drm_self_refresh_helper.c
drm_simple_kms_helper.c
drm_suballoc.c
drm_syncobj.c dma-buf: fix an error pointer vs NULL bug 2023-07-06 19:50:23 +05:30
drm_sysfs.c
drm_trace.h
drm_trace_points.c
drm_vblank.c
drm_vblank_work.c
drm_vm.c
drm_vma_manager.c
drm_writeback.c