[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9810cff90802221119j23818e74g2721512a693a0a01@mail.gmail.com>
Date: Fri, 22 Feb 2008 11:19:48 -0800
From: "Bill Huey (hui)" <bill.huey@...il.com>
To: paulmck@...ux.vnet.ibm.com
Cc: "Andi Kleen" <ak@...e.de>, "Gregory Haskins" <ghaskins@...ell.com>,
mingo@...e.hu, a.p.zijlstra@...llo.nl, tglx@...utronix.de,
rostedt@...dmis.org, linux-rt-users@...r.kernel.org,
linux-kernel@...r.kernel.org, kevin@...man.org,
cminyard@...sta.com, dsingleton@...sta.com, dwalker@...sta.com,
npiggin@...e.de, dsaxena@...xity.net, gregkh@...e.de,
sdietrich@...ell.com, pmorreale@...ell.com, mkohari@...ell.com
Subject: Re: [PATCH [RT] 08/14] add a loop counter based timeout mechanism
On Fri, Feb 22, 2008 at 11:08 AM, Paul E. McKenney
<paulmck@...ux.vnet.ibm.com> wrote:
> One approach would be to set the RTLOCK_DELAY parameter to something like
> -1 for default, and to set it to the number of cycles required for about
> 10 cache misses at boot time. This would automatically scale with CPU
> frequency and memory latency.
Yeah, I'm not very keen on having a constant there without some
contention instrumentation to see how long the spins are. It would be
better to just let it run until either task->on_cpu is off or checking
if the "current" in no longer matches the mutex owner for the runqueue
in question. At that point, you know the thread isn't running.
Spinning on something like that is just a waste of time. It's for that
reason that doing in the spin outside of a preempt critical section
isn't really needed
bill
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists