Messages in this thread | | | Date | Wed, 17 Feb 2016 09:13:25 -0600 (CST) | From | Christoph Lameter <> | Subject | Re: [RFC PATCH 1/2] lib/percpu-list: Per-cpu list with associated per-cpu locks |
| |
On Tue, 16 Feb 2016, Waiman Long wrote:
> List entry insertion is strictly per cpu. List deletion, however, can > happen in a cpu other than the one that did the insertion. So we still > need lock to protect the list. Because of that, there may still be > a small amount of contention when deletion is being done.
Is there a way to avoid locking completely? You could use cmpxchg_double to swap both list head and tail in an atomic fashion with some work. There is even a this_cpu_cmpxchg_double available.
| |