Thread (14 messages) 14 messages, 5 authors, 2019-03-22

Re: per-cpu thoughts

From: Paul Walmsley <hidden>
Date: 2019-03-12 14:21:17
Also in: linux-riscv

On Tue, 12 Mar 2019, Christopher Lameter wrote:
On Mon, 11 Mar 2019, Paul Walmsley wrote:
quoted
There's been a discussion going on in a private thread about this that I
unfortunately didn't add you to.  The discussion is still ongoing, but I
think Christoph and myself and a few other folks have agreed that the
preempt_disable/enable is not needed for the amoadd approach.  This is
since the apparent intention of the preemption disable/enable is to ensure
the correctness of the counter increment; however there is no risk of
incorrectness in an amoadd sequence since the atomic add is locked across
all of the cache coherency domain.  Christoph, would you disagree with
that characterization?
No. As I said before all write operations have to happen from the local
cpu to a per cpu segment.
In light of the thread that's going on with Mark, given the open-coded 
__this_cpu_* operations, it's clear we don't have a choice - we'd need to 
disable preemption for the basic operations.

The counters, though, may not need the preemption disable/reenable.  
Christoph, you expressed earlier that you think the overhead of the 
preempt_disable/enable is quite high.  Do you think it's worth creating a 
separate, restricted implementation for per-cpu counters?


- Paul

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help