diff options
author | Rob Clark <robdclark@chromium.org> | 2022-08-02 08:51:46 -0700 |
---|---|---|
committer | Rob Clark <robdclark@chromium.org> | 2022-08-27 09:32:45 -0700 |
commit | 025d27239a2f93b3eb415d4893266195a67d3fe5 (patch) | |
tree | 91f1f4fcb3bd78d1f4e5483239b20599c5c70312 /drivers/gpu/drm/msm/msm_gpu_trace.h | |
parent | dd2f0d7859927e536b7316b36a9782053d3ad22c (diff) | |
download | lwn-025d27239a2f93b3eb415d4893266195a67d3fe5.tar.gz lwn-025d27239a2f93b3eb415d4893266195a67d3fe5.zip |
drm/msm/gem: Evict active GEM objects when necessary
If we are under enough memory pressure, we should stall waiting for
active buffers to become idle in order to evict.
v2: Check for __GFP_ATOMIC before blocking
Signed-off-by: Rob Clark <robdclark@chromium.org>
Patchwork: https://patchwork.freedesktop.org/patch/496135/
Link: https://lore.kernel.org/r/20220802155152.1727594-14-robdclark@gmail.com
Diffstat (limited to 'drivers/gpu/drm/msm/msm_gpu_trace.h')
-rw-r--r-- | drivers/gpu/drm/msm/msm_gpu_trace.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/gpu/drm/msm/msm_gpu_trace.h b/drivers/gpu/drm/msm/msm_gpu_trace.h index 8867fa0a0306..ac40d857bc45 100644 --- a/drivers/gpu/drm/msm/msm_gpu_trace.h +++ b/drivers/gpu/drm/msm/msm_gpu_trace.h @@ -116,22 +116,26 @@ TRACE_EVENT(msm_gmu_freq_change, TRACE_EVENT(msm_gem_shrink, - TP_PROTO(u32 nr_to_scan, u32 purged, u32 evicted), - TP_ARGS(nr_to_scan, purged, evicted), + TP_PROTO(u32 nr_to_scan, u32 purged, u32 evicted, + u32 active_purged, u32 active_evicted), + TP_ARGS(nr_to_scan, purged, evicted, active_purged, active_evicted), TP_STRUCT__entry( __field(u32, nr_to_scan) __field(u32, purged) __field(u32, evicted) + __field(u32, active_purged) + __field(u32, active_evicted) ), TP_fast_assign( __entry->nr_to_scan = nr_to_scan; __entry->purged = purged; __entry->evicted = evicted; + __entry->active_purged = active_purged; + __entry->active_evicted = active_evicted; ), - TP_printk("nr_to_scan=%u pages, purged=%u pages, evicted=%u pages", - __entry->nr_to_scan, - __entry->purged, - __entry->evicted) + TP_printk("nr_to_scan=%u pg, purged=%u pg, evicted=%u pg, active_purged=%u pg, active_evicted=%u pg", + __entry->nr_to_scan, __entry->purged, __entry->evicted, + __entry->active_purged, __entry->active_evicted) ); |