[PATCH v2] drm/amdkfd: Try to schedule bottom half on same core

Dave Airlie airlied at gmail.com
Fri Aug 12 19:49:59 UTC 2022


On Sat, 13 Aug 2022 at 04:11, Felix Kuehling <felix.kuehling at amd.com> wrote:
>
>
> On 2022-08-12 09:55, Philip Yang wrote:
> >
> > On 2022-08-11 15:04, Felix Kuehling wrote:
> >> On systems that support SMT (hyperthreading) schedule the bottom half of
> >> the KFD interrupt handler on the same core. This makes it possible to
> >> reserve a core for interrupt handling and have the bottom half run on
> >> that same core.
> >>
> >> On systems without SMT, pick another core in the same NUMA node, as
> >> before.
> >>
> >> Use for_each_cpu_wrap instead of open-coding it.
> >>
> >> Signed-off-by: Felix Kuehling <Felix.Kuehling at amd.com>
> >
> > nit-pick below, looks better to use new_cpu as iterator, either way
> > this is
> >
> > Reviewed-by: Philip Yang <Philip.Yang at amd.com>
>
> Thank you. I think I prefer cpu as the iterator and new_cpu as the
> variable that holds the CPU we choose to schedule to.

I don't think this sort of thing should be in a driver.

queue_work_node seems like it should be used or enhanced. Doing this
sort of thing in driver code should be the last place to do it.

At least please task someone to work on an upstream answer to this
sort of hacky downstream thing.

Dave.


More information about the amd-gfx mailing list