Re: [RFC PATCH 20/23] watchdog/hardlockup/hpet: Rotate interrupt among all monitored CPUs
From: Thomas Gleixner
Date: Sat Jun 16 2018 - 09:28:26 EST
On Fri, 15 Jun 2018, Ricardo Neri wrote:
> On Fri, Jun 15, 2018 at 12:29:06PM +0200, Thomas Gleixner wrote:
> > You have to consider two cases:
> >
> > 1) !remapped mode:
> >
> > That's reasonably simple because you just have to deal with the HPET
> > TIMERn_PROCMSG_ROUT register. But then you need to do this directly and
> > not through any of the existing interrupt facilities.
>
> Indeed, there is no need to use the generic interrupt faciities to set affinity;
> I am dealing with an NMI anyways.
> >
> > 2) remapped mode:
> >
> > That's way more complex as you _cannot_ ever do anything which touches
> > the IOMMU and the related tables.
> >
> > So you'd need to reserve an IOMMU remapping entry for each CPU upfront,
> > store the resulting value for the HPET TIMERn_PROCMSG_ROUT register in
> > per cpu storage and just modify that one from NMI.
> >
> > Though there might be subtle side effects involved, which are related to
> > the acknowledge part. You need to talk to the IOMMU wizards first.
>
> I see. I will look into the code and prototype something that makes sense for
> the IOMMU maintainers.
I'd recommend to talk to them _before_ you cobble something together. If we
cannot reliably switch the affinity by directing the HPET NMI to a
different IOMMU remapping entry then the whole scheme does not work at all.
Thanks,
tglx