Ingo Oeser <ioe-lkml@xxxxxxxxxx> wrote:
+ list_for_each_entry_safe(this, next, head, list) {
+ list_del(&this->list);
+ kmem_cache_free(robust_futex_cachep, this);
+ }
If we're throwing away the entire contents of the list, there's no need to
detach items as we go.
Couldn't even detach the list elements first by
list_splice_init(&mapping->robust_head->robust_list, head);
and free the list from "head" after releasing the mutex?
This would reduce lock contention, no?
Yes, it would reduce lock contention nicely.
Attachment:
robust-futex-6
Description: Binary data