login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2011
»
January
»
4
Re: [RFC][RT][PATCH 3/4] rtmutex: Revert Optimize rt lock wakeup
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Peter W. Morreale
Subject:
Re: [RFC][RT][PATCH 3/4] rtmutex: Revert Optimize rt lock wakeup
Date: Tuesday, January 4, 2011 - 10:45 am
On Tue, 2011-01-04 at 12:27 -0500, Steven Rostedt wrote:
quoted text
> On Tue, 2011-01-04 at 10:15 -0700, Peter W. Morreale wrote: > > > My bad. I thought preemption did change task state. > > > > This still requires the owner to run through try_to_wake_up() and all > > its associated overhead only to find out that the waiter is running. > > > > The assumption I made when I suggested the original concept to Greg was > > that if the new owner is running, there is *nothing* to do wrt > > scheduling. If that was a wrong assumption, then, yes, drop the patch > > and clean things up. > > > > If that was a good assumption, then we are leaving 'cycles on the table' > > as waking up a running process is a non-zero-overhead path and that is a > > bad thing considering how many times spin_unlock() is called on an rt > > system. > > > > Bear in mind that this savings scales directly as the number of CPUs > > (assuming all are vectored on the lock). We can only have nr_cpus-1 > > spinning waiters at any given time, regardless of the number of tasks in > > contention. Perhaps this is too little to worry about on a 4way system, > > but I suspect that it could be substantial on larger systems. > > > > I'll be quiet now as I know little about the intricacies of > > preemption/scheduling (obviously) and like Greg, have been removed from > > RT kernel work for several years. <sigh> > > No need to be quiet ;-) > > I'm working on making it spin in TASK_RUNNING state if possible, but it > is making the code a bit more complex, as it seems that there is an > assumption with the wakeup and the changing of the current->state in the > rt_spin_lock_slowlock code all being under the lock->wait_lock. I think > I'll scrap this idea. > > That said, I think your wakeup patch may be worth while with Lai's new > code. His changes causes the owner to wake up the pending owner several > times, because the pending owner is never removed from the lock > wait_list. If a high prio task grabs and releases the same lock over and > over, if there is a waiter it will try to wake up that waiter each time. >
Oooohhhh I wonder if that would enable 'lock-stealing' for FIFO? IIRC, you came up with a ping-pong scenario that prevented its use there. -PWM
quoted text
> Thus, having your patch may prevent that unnecessary wakeup. > > I'll look more into it. Thanks! > > -- Steve > > >
--
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][RT][PATCH 0/4] rtmutex: Simplify PI code
, Steven Rostedt
, (Thu Dec 23, 3:47 pm)
[RFC][RT][PATCH 1/4] rtmutex: Only save lock depth once in ...
, Steven Rostedt
, (Thu Dec 23, 3:47 pm)
[RFC][RT][PATCH 2/4] rtmutex: Try to take lock early in rt ...
, Steven Rostedt
, (Thu Dec 23, 3:47 pm)
[RFC][RT][PATCH 3/4] rtmutex: Revert Optimize rt lock wakeup
, Steven Rostedt
, (Thu Dec 23, 3:47 pm)
[RFC][RT][PATCH 4/4] rtmutex: Ensure only the top waiter o ...
, Steven Rostedt
, (Thu Dec 23, 3:47 pm)
Re: [RFC][RT][PATCH 3/4] rtmutex: Revert Optimize rt lock ...
, Gregory Haskins
, (Thu Dec 23, 9:45 pm)
Re: [RFC][RT][PATCH 3/4] rtmutex: Revert Optimize rt lock ...
, Steven Rostedt
, (Thu Dec 23, 9:54 pm)
Re: [RFC][RT][PATCH 3/4] rtmutex: Revert Optimize rt lock ...
, Peter W. Morreale
, (Fri Dec 24, 8:47 am)
Re: [RFC][RT][PATCH 3/4] rtmutex: Revert Optimize rt lock ...
, Gregory Haskins
, (Tue Dec 28, 7:06 am)
Re: [RFC][RT][PATCH 3/4] rtmutex: Revert Optimize rt lock ...
, Steven Rostedt
, (Mon Jan 3, 12:06 pm)
Re: [RFC][RT][PATCH 3/4] rtmutex: Revert Optimize rt lock ...
, Steven Rostedt
, (Mon Jan 3, 1:22 pm)
Re: [RFC][RT][PATCH 4/4] rtmutex: Ensure only the top wait ...
, Steven Rostedt
, (Mon Jan 3, 9:02 pm)
Re: [RFC][RT][PATCH 3/4] rtmutex: Revert Optimize rt lock ...
, Peter W. Morreale
, (Tue Jan 4, 8:19 am)
Re: [RFC][RT][PATCH 3/4] rtmutex: Revert Optimize rt lock ...
, Steven Rostedt
, (Tue Jan 4, 8:47 am)
Re: [RFC][RT][PATCH 3/4] rtmutex: Revert Optimize rt lock ...
, Peter W. Morreale
, (Tue Jan 4, 10:15 am)
Re: [RFC][RT][PATCH 3/4] rtmutex: Revert Optimize rt lock ...
, Peter W. Morreale
, (Tue Jan 4, 10:24 am)
Re: [RFC][RT][PATCH 3/4] rtmutex: Revert Optimize rt lock ...
, Steven Rostedt
, (Tue Jan 4, 10:27 am)
Re: [RFC][RT][PATCH 3/4] rtmutex: Revert Optimize rt lock ...
, Peter W. Morreale
, (Tue Jan 4, 10:45 am)
Re: [RFC][RT][PATCH 3/4] rtmutex: Revert Optimize rt lock ...
, Steven Rostedt
, (Tue Jan 4, 11:06 am)
Re: [RFC][RT][PATCH 3/4] rtmutex: Revert Optimize rt lock ...
, Peter W. Morreale
, (Tue Jan 4, 1:48 pm)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Ken Chen
[patch] sched: fix inconsistency when redistribute per-cpu tg->cfs_rq shares.
Ingo Molnar
Re: [PATCH v3] x86: merge the simple bitops and move them to bitops.h
Jan Engelhardt
Re: [PATCH] Allow Kconfig to set default mmap_min_addr protection
Dmitry Torokhov
Re: [2.6 patch] input/serio/hp_sdc.c section fix
Rafael J. Wysocki
[Bug #16380] Loop devices act strangely in 2.6.35
git
:
Steven Grimm
Using git as a general backup mechanism (was Re: Using GIT to store /etc)
Jeff King
Re: [PATCH] git-reset: allow --soft in a bare repo
Johannes Sixt
Re: [PATCH 01/14] msvc: Fix compilation errors in compat/win32/sys/poll.c
Johannes Schindelin
Re: [PATCH] Uninstall rule for top level Makefile
Shawn O. Pearce
Re: [PATCH v2] Speed up bash completion loading
git-commits-head
:
Linux Kernel Mailing List
cgroups: clean up cgroup_pidlist_find() a bit
Linux Kernel Mailing List
sony-laptop: Add support for extended hotkeys
Linux Kernel Mailing List
IB/core: Add support for masked atomic operations
Linux Kernel Mailing List
V4L/DVB (8939): cx18: fix sparse warnings
Linux Kernel Mailing List
ipv6 mcast: Check address family of gf_group in getsockopt(MS_FILTER).
linux-netdev
:
Inaky Perez-Gonzalez
[PATCH 40/40] wimax/i2400m: add CREDITS and MAINTAINERS entries
Karsten Keil
[mISDN PATCH v2 05/19] Reduce stack size in dsp_cmx_send()
linux
Re: 2.6.23-rc8 network problem. Mem leak? ip1000a?
David Miller
Re: tun: Use netif_receive_skb instead of netif_rx
David Miller
Re: [net-next PATCH v2] llc enhancements
freebsd-current
:
Matthew Fleming
Re: [RFC] Outline of USB process integration in the kernel taskqueue system
illoai@gmail.com
Re: OT: 2d password
Hartmut Brandt
Re: problem with nss_ldap
Andrew Reilly
Re: FreeBSD's problems as seen by the BSDForen.de community
Max Laier
Re: Upcoming ABI Breakage in RELENG_7
Colocation donated by:
Syndicate