Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Revert "drm/amdkfd: Improve signal event slow path"

To fix regression report on gfx8, which requires the exhaustive search
path for signaled event.

The high CPU usage of KFD interrupt wq issue is gone after HIP/ROCr add
option to reduce HW event interrupts, safe to revert this optimization
patch now.

This reverts commit de844846f72b152119faaef1b363448dc8ea368f.

Signed-off-by: Philip Yang <Philip.Yang@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Philip Yang and committed by
Alex Deucher
88ef4de3 f19bbecd

-11
-11
drivers/gpu/drm/amd/amdkfd/kfd_events.c
··· 748 748 uint64_t *slots = page_slots(p->signal_page); 749 749 uint32_t id; 750 750 751 - /* 752 - * If id is valid but slot is not signaled, GPU may signal the same event twice 753 - * before driver have chance to process the first interrupt, then signal slot is 754 - * auto-reset after set_event wakeup the user space, just drop the second event as 755 - * the application only need wakeup once. 756 - */ 757 - if ((valid_id_bits > 31 || (1U << valid_id_bits) >= KFD_SIGNAL_EVENT_LIMIT) && 758 - partial_id < KFD_SIGNAL_EVENT_LIMIT && slots[partial_id] == UNSIGNALED_EVENT_SLOT) 759 - goto out_unlock; 760 - 761 751 if (valid_id_bits) 762 752 pr_debug_ratelimited("Partial ID invalid: %u (%u valid bits)\n", 763 753 partial_id, valid_id_bits); ··· 776 786 } 777 787 } 778 788 779 - out_unlock: 780 789 rcu_read_unlock(); 781 790 kfd_unref_process(p); 782 791 }