On Jan 20, 2006, at 2:18 PM, Andrew Morton wrote:
Ingo Oeser <ioe-lkml@rameria.de> 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 todetach 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.
Incorporated changes suggested by Andrew Morton and Ingo Oeser. fs/inode.c | 2 include/linux/fs.h | 4 include/linux/futex.h | 33 ++++ init/Kconfig | 9 + kernel/exit.c | 2kernel/futex.c | 399 ++++++++++++++++++++++++++++++++++++++++++++++++++
6 files changed, 449 insertions(+) David
Attachment:
robust-futex-6
Description: Binary data
- References:
- [robust-futex-1] futex: robust futex support
- From: David Singleton <dsingleton@mvista.com>
- [robust-futex-4] futex: robust futex support
- From: david singleton <dsingleton@mvista.com>
- Re: [robust-futex-4] futex: robust futex support
- From: Andrew Morton <akpm@osdl.org>
- Re: [robust-futex-4] futex: robust futex support
- From: Ingo Oeser <ioe-lkml@rameria.de>
- Re: [robust-futex-4] futex: robust futex support
- From: Andrew Morton <akpm@osdl.org>
- [robust-futex-1] futex: robust futex support
- Prev by Date: Re: GPL V3 and Linux
- Next by Date: [PATCH RT] don't let printk unconditionally turn on interrupts
- Previous by thread: Re: [robust-futex-4] futex: robust futex support
- Next by thread: Re: [robust-futex-4] futex: robust futex support
- Index(es):
![]() |