Re: [robust-futex-4] futex: robust futex support

From: Andrew Morton
Date: Fri Jan 20 2006 - 17:15:08 EST


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.
-
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/