Re: [PATCH 1/2] IB/hfi1: Use preempt_{dis,en}able_nort()

From: Arnaldo Carvalho de Melo
Date: Thu Oct 05 2017 - 14:53:40 EST


Em Thu, Oct 05, 2017 at 01:29:00PM -0500, Julia Cartwright escreveu:
> On Thu, Oct 05, 2017 at 01:53:05PM -0300, Arnaldo Carvalho de Melo wrote:
> > So __this_cpu_inc() checks preemption but this_cpu_inc() doesn't and
> > thus we're ok here? Or am I getting lost in this maze of defines? :-)

> I think I was the one lost in the maze. You are correct. Sorry for the
> confusion.

> My mind expected that the __ prefixed versions would be the "raw"
> versions that are free of checks, with the checks made in the non
> prefixed versions, but it is the other way around.

> I'm happy to accept that the bug is within my mind.

:-)

Ok, now I'm taking the opportunity to read more about local locks, as
Sebastian thinks are needed in this case, which I'm not entirely
convinced from the discussion that took place here, and as you took part
in that discussion and suggested using the nort variants of
preempt_disable, do you still think this is the way to go?

- Arnaldo