mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-11-18 04:35:11 +00:00
drm/amdkfd: Fix signal handling performance again
It turns out that idr_for_each_entry is really slow compared to just iterating over the slots. Based on measurements the difference is estimated to be about a factor 64. That means using idr_for_each_entry is only worth it with very few allocated events. Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com> Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com> Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
This commit is contained in:
parent
f8ea72d097
commit
eeb27b7eb3
1 changed files with 1 additions and 1 deletions
|
|
@ -496,7 +496,7 @@ void kfd_signal_event_interrupt(unsigned int pasid, uint32_t partial_id,
|
||||||
pr_debug_ratelimited("Partial ID invalid: %u (%u valid bits)\n",
|
pr_debug_ratelimited("Partial ID invalid: %u (%u valid bits)\n",
|
||||||
partial_id, valid_id_bits);
|
partial_id, valid_id_bits);
|
||||||
|
|
||||||
if (p->signal_event_count < KFD_SIGNAL_EVENT_LIMIT/2) {
|
if (p->signal_event_count < KFD_SIGNAL_EVENT_LIMIT / 64) {
|
||||||
/* With relatively few events, it's faster to
|
/* With relatively few events, it's faster to
|
||||||
* iterate over the event IDR
|
* iterate over the event IDR
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue