linux-stable/drivers/gpu/drm/msm
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
..
adreno minmax: add in_range() macro 2023-08-24 16:20:18 -07:00
disp drm/msm/dpu: drop enum dpu_core_perf_data_bus_id 2023-07-13 11:56:24 -07:00
dp drm/msm/dp: Free resources after unregistering them 2023-06-15 13:20:31 +03:00
dsi drm/msm/dsi: Drop unused regulators from QCM2290 14nm DSI PHY config 2023-07-13 12:49:47 -07:00
hdmi drm/msm: Update generated headers 2023-03-21 09:10:47 -07:00
Kconfig drm/msm: Use regular fbdev I/O helpers 2023-06-01 12:41:40 +02:00
Makefile drm/msm/dpu: add support for DSC encoder v1.2 engine 2023-06-15 13:05:05 +03:00
NOTES
msm_atomic.c drm/msm/atomic: Don't try async if crtc not active 2023-04-24 13:18:36 -07:00
msm_atomic_trace.h
msm_atomic_tracepoints.c
msm_debugfs.c drm/msm: Remove unnecessary (void*) conversions 2023-06-04 05:23:39 +03:00
msm_debugfs.h
msm_drv.c Merge branch 'drm-next' of git://anongit.freedesktop.org/drm/drm into msm-next-lumag-base 2023-06-13 00:23:33 +03:00
msm_drv.h Merge branch 'msm-next-lumag-dpu' into msm-next-lumag 2023-04-06 20:29:50 +03:00
msm_dsc_helper.h drm/msm: Add MSM-specific DSC helper methods 2023-06-15 12:58:56 +03:00
msm_fb.c
msm_fbdev.c drm/client: Send hotplug event after registering a client 2023-07-11 14:02:01 +02:00
msm_fence.c drm/msm: Fix hw_fence error path cleanup 2023-07-17 12:54:20 -07:00
msm_fence.h drm/msm: Add deadline based boost support 2023-03-28 15:46:15 -07:00
msm_gem.c Merge branch 'drm-next' of git://anongit.freedesktop.org/drm/drm into msm-next-lumag-base 2023-06-13 00:23:33 +03:00
msm_gem.h drm/msm/gem: Avoid obj lock in job_run() 2023-03-25 16:31:44 -07:00
msm_gem_prime.c
msm_gem_shrinker.c drm/msm/gem: Prevent blocking within shrinker loop 2023-02-27 07:06:56 +03:00
msm_gem_submit.c drm/msm: Disallow submit with fence id 0 2023-07-26 10:50:04 -07:00
msm_gem_vma.c drm/msm: Decouple vma tracking from obj lock 2023-03-25 16:31:44 -07:00
msm_gpu.c Merge branch 'drm-next' of git://anongit.freedesktop.org/drm/drm into msm-next-lumag-base 2023-06-13 00:23:33 +03:00
msm_gpu.h drm/msm/gpu: Move BO allocation out of hw_init 2023-03-25 16:31:45 -07:00
msm_gpu_devfreq.c drm/msm/adreno: Use OPP for every GPU generation 2023-03-20 11:04:59 -07:00
msm_gpu_trace.h
msm_gpu_tracepoints.c
msm_gpummu.c
msm_io_utils.c drm/msm: Include <linux/io.h> 2023-04-06 20:29:40 +03:00
msm_iommu.c drm/msm: Be more shouty if per-process pgtables aren't working 2023-05-17 08:53:47 -07:00
msm_kms.h drm/msm/atomic: Switch to vblank_start helper 2023-03-28 15:46:15 -07:00
msm_mdss.c drm/msm/mdss: correct UBWC programming for SM8550 2023-07-13 11:50:21 -07:00
msm_mmu.h drm/msm/adreno: stall translation on fault for all GPU families 2023-03-28 15:49:09 -07:00
msm_perf.c
msm_rd.c drm/msm: Move cmdstream dumping out of sched kthread 2023-06-10 06:46:12 -07:00
msm_ringbuffer.c drm/msm/gem: Avoid obj lock in job_run() 2023-03-25 16:31:44 -07:00
msm_ringbuffer.h drm/msm: Hangcheck progress detection 2022-11-17 10:39:12 -08:00
msm_submitqueue.c drm/msm: Switch idr_lock to spinlock 2023-03-25 16:31:44 -07:00