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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Jan 20, 2006, at 2:18 PM, Andrew Morton wrote:

Ingo Oeser <[email protected]> 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.


        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         |    2
kernel/futex.c | 399 ++++++++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 449 insertions(+)



David



Attachment: robust-futex-6
Description: Binary data


[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux