login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
April
»
1
Re: RFC: Ideal Adaptive Spinning Conditions
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Avi Kivity
Subject:
Re: RFC: Ideal Adaptive Spinning Conditions
Date: Thursday, April 1, 2010 - 9:10 am
On 04/01/2010 06:54 PM, Darren Hart wrote:
quoted text
>> A lock(); unlock(); loop spends most of its time with the lock held >> or contended. Can you something like this: >> >> >> lock(); >> for (i = 0; i < 1000; ++i) >> asm volatile ("" : : : "memory"); >> unlock(); >> for (i = 0; i < 10000; ++i) >> asm volatile ("" : : : "memory"); > > > > Great idea. I'll be doing a more rigorous investigation on this of > course, but I thought I'd share the results of just dumping this into > the testcase: > > # ./futex_lock -i10000000 > futex_lock: Measure FUTEX_LOCK operations per second > Arguments: iterations=10000000 threads=256 adaptive=0 > Result: 420 Kiter/s > lock calls: 9999872 > lock syscalls: 665824 (6.66%) > unlock calls: 9999872 > unlock syscalls: 861240 (8.61%) > > # ./futex_lock -a -i10000000 > futex_lock: Measure FUTEX_LOCK operations per second > Arguments: iterations=10000000 threads=256 adaptive=1 > Result: 426 Kiter/s > lock calls: 9999872 > lock syscalls: 558787 (5.59%) > unlock calls: 9999872 > unlock syscalls: 603412 (6.03%) > > This is the first time I've seen adaptive locking have an advantage! > The second set of runs showed a slightly greater advantage. Note that > this was still with spinners being limited to one.
Question - do all threads finish at the same time, or wildly different times? -- error compiling committee.c: too many arguments to function --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
RFC: Ideal Adaptive Spinning Conditions
, Darren Hart
, (Wed Mar 31, 4:21 pm)
Re: RFC: Ideal Adaptive Spinning Conditions
, Roland Dreier
, (Wed Mar 31, 4:35 pm)
Re: RFC: Ideal Adaptive Spinning Conditions
, Steven Rostedt
, (Wed Mar 31, 4:38 pm)
Re: RFC: Ideal Adaptive Spinning Conditions
, Peter W. Morreale
, (Wed Mar 31, 5:17 pm)
Re: RFC: Ideal Adaptive Spinning Conditions
, Darren Hart
, (Wed Mar 31, 7:03 pm)
Re: RFC: Ideal Adaptive Spinning Conditions
, Darren Hart
, (Wed Mar 31, 7:10 pm)
Re: RFC: Ideal Adaptive Spinning Conditions
, Darren Hart
, (Wed Mar 31, 7:13 pm)
Re: RFC: Ideal Adaptive Spinning Conditions
, Darren Hart
, (Wed Mar 31, 7:25 pm)
Re: RFC: Ideal Adaptive Spinning Conditions
, Steven Rostedt
, (Wed Mar 31, 7:25 pm)
Re: RFC: Ideal Adaptive Spinning Conditions
, Darren Hart
, (Wed Mar 31, 10:15 pm)
Re: RFC: Ideal Adaptive Spinning Conditions
, Gregory Haskins
, (Thu Apr 1, 5:46 am)
Re: RFC: Ideal Adaptive Spinning Conditions
, Chris Mason
, (Thu Apr 1, 7:04 am)
Re: RFC: Ideal Adaptive Spinning Conditions
, Avi Kivity
, (Thu Apr 1, 7:20 am)
Re: RFC: Ideal Adaptive Spinning Conditions
, Darren Hart
, (Thu Apr 1, 8:54 am)
Re: RFC: Ideal Adaptive Spinning Conditions
, Avi Kivity
, (Thu Apr 1, 9:10 am)
Re: RFC: Ideal Adaptive Spinning Conditions
, Chris Wright
, (Thu Apr 1, 10:02 am)
Re: RFC: Ideal Adaptive Spinning Conditions
, Darren Hart
, (Thu Apr 1, 10:10 am)
Re: RFC: Ideal Adaptive Spinning Conditions
, Avi Kivity
, (Thu Apr 1, 10:15 am)
Re: RFC: Ideal Adaptive Spinning Conditions
, john cooper
, (Sat Apr 3, 10:51 am)
Re: RFC: Ideal Adaptive Spinning Conditions
, john cooper
, (Sat Apr 3, 11:00 am)
Re: RFC: Ideal Adaptive Spinning Conditions
, Rik van Riel
, (Sat Apr 3, 6:50 pm)
Re: RFC: Ideal Adaptive Spinning Conditions
, Peter W. Morreale
, (Sun Apr 4, 8:06 am)
Re: RFC: Ideal Adaptive Spinning Conditions
, Darren Hart
, (Mon Apr 5, 7:06 am)
Re: RFC: Ideal Adaptive Spinning Conditions
, Darren Hart
, (Mon Apr 5, 7:10 am)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Russell King
Re: ARM defconfig files
Jesse Barnes
Re: PCI MSI breaks when booting with nosmp
James Morris
Re: [AppArmor 01/41] Pass struct vfsmount to the inode_create LSM hook
Philip Langdale
[PATCH 2.6.19] mmc: Add support for SDHC cards (Take 4)
Oren Laadan
[PATCH v21 073/100] c/r: Add AF_UNIX support (v12)
git
:
Felipe Contreras
Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins
Paolo Ciarrocchi
Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins
Johannes Schindelin
[PATCH] fetch: refuse to fetch into the current branch in a non-bare repository
Johannes Schindelin
Re: [PATCH] Fix install-doc-quick target
Peter Oberndorfer
Subject: [PATCH] fix stg edit command
linux-netdev
:
Ursula Braun
[patch 2/8] [PATCH] af_iucv: sync sk shutdown flag if iucv path is quiesced
Andi Kleen
Re: RFC: Nagle latency tuning
David Miller
Re: [RFC 0/5] generic rx recycling
Gary Thomas
Re: Marvell 88E609x switch?
Chuck Lever
Re: [RFC] ipv6: Change %pI6 format to output compacted addresses?
git-commits-head
:
Linux Kernel Mailing List
New device ID for sc92031 [1088:2031]
Linux Kernel Mailing List
e1000e: Expose MDI-X status via ethtool change
Linux Kernel Mailing List
arm/imx/gpio: GPIO_INT_{HIGH,LOW}_LEV are not necessarily constant
Linux Kernel Mailing List
powerpc/kexec: Add support for FSL-BookE
Linux Kernel Mailing List
trivial: fix comment typo in fs/compat.c
openbsd-misc
:
Theo de Raadt
Re: RES: OpenBSD on IBM System X3550 7879
Bret S. Lambert
Re: any web management gui for pf ?
Rob Shepherd
x86 hardware for router system
Flickr Photo Map for iPad and iPhone
Thanks for the Great Launch of Flickr Photo Map for iPad + iPhone
Nick Holland
Re: Install OpenBSD from USB ?
Colocation donated by:
Syndicate