Re: [PATCH] powerpc/powernv: Fix concurrency issue with npu->mmio_atsd_usage

2018-08-02 Thread Alistair Popple
> There may be a long-term way to fix this at a larger scale, but for now > resolve the immediate problem by gating our call to > test_and_set_bit_lock() with one to test_bit(), which is obviously > implemented without using a store. I am less sure of this now but am continuing to investigate. How

[PATCH] powerpc/powernv: Fix concurrency issue with npu->mmio_atsd_usage

2018-08-02 Thread Reza Arbab
We've encountered a performance issue when multiple processors stress {get,put}_mmio_atsd_reg(). These functions contend for mmio_atsd_usage, an unsigned long used as a bitmask. The accesses to mmio_atsd_usage are done using test_and_set_bit_lock() and clear_bit_unlock(). As implemented, both of t