On Wed, Nov 11, 2020 at 12:13:28PM -0600, Josh Poimboeuf wrote:
> On Wed, Nov 11, 2020 at 06:47:36PM +0100, Peter Zijlstra wrote:

> > Yeah, so it's all a giant can of worms that; also see:
> > 
> >   https://lkml.kernel.org/r/[email protected]
> > 
> > The basic idea is to only trace edges, ie. when the hardware state
> > actually changes. Sadly this means doing a pushf/pop before the cli.
> > Ideally CLI would store the old IF in CF or something like that, but
> > alas.
> 
> Right, that makes sense for save/restore, but is the disabled check
> really needed for local_irq_disable()?  Wouldn't that always be an edge?

IIRC there is code that does local_irq_disable() even though IRQs are
already disabled. This is 'harmless'.

> And anyway I don't see a similar check for local_irq_enable().

I know there is code that does local_irq_enable() with IRQs already
enabled, I'm not exactly sure why this is different. I'll have to put it
on the todo list :/

Reply via email to