idr_get_next() looked up every possible id from *nextidp up to
idr_max() one at a time. For sparse trees with large ids this is
extremely slow, and for a 7-layer tree idr_max() is INT_MAX, so the
"id++" in the loop overflows and the loop never terminates when no
entry is found.
amdkfd allocates signal event ids starting at 2^30 and walks them with
idr_for_each_entry() when a process is destroyed
(kfd_event_free_process()), which made the kfd_process_wq release
worker spin forever and hung every later open of /dev/kfd in
flush_workqueue().
Walk the tree instead, descending only into non-empty subtrees that
can contain ids >= *nextidp. Negative start ids return NULL, as on
Linux.
Tested with amdkfd on gfx1151: process teardown with high event ids
completes, repeated HIP/HSA runs work.