Re: [PATCH]: Sparc64 immediate values

From: David Miller
Date: Tue May 13 2008 - 18:30:13 EST


From: Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxx>
Date: Tue, 13 May 2008 08:36:15 -0400

> However, it does not protect from having a thread preempted in the
> middle of this instruction sequence and therefore to see incoherent
> values.

Yes, that makes such schemes unworkable, how hum...

> Are there non-maskable interrupts on sparc64 ?

Yes, and no. When the PSTATE_IE bit is cleared in the
processor state register, no interrupts whatsoever are
recognized by the processor. This is off only during
trap entry/exit sequences, and some other special bits
of code.

> The one thing we could do to allow such updates without using
> stop_machine is to create something similar to the read seqlock using
> immediate values.

Yes I saw such suggestions in the comments of the immediate code,
you don't have to describe such things all over again.

Doing something so heavy like this in the "fast path" is completely
pointless in my opinion.

Better to keep brainstorming on a scheme that works without adding any
instructions to the immediate load sequence. If you add instructions,
fetching the instructions themselves become just as expensive, if not
moreso, than the load we are eliminating.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/