linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Esben Nielsen <simlo@phys.au.dk>
To: Bill Huey <billh@gnuppy.monkey.org>
Cc: Ingo Molnar <mingo@elte.hu>, Steven Rostedt <rostedt@goodmis.org>,
	david singleton <dsingleton@mvista.com>,
	<linux-kernel@vger.kernel.org>
Subject: Re: RT Mutex patch and tester [PREEMPT_RT]
Date: Mon, 16 Jan 2006 12:30:03 +0100 (MET)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.0601161215080.4219-100000@lifa01.phys.au.dk> (raw)
In-Reply-To: <20060116105333.GA19617@gnuppy.monkey.org>

On Mon, 16 Jan 2006, Bill Huey wrote:

> On Mon, Jan 16, 2006 at 02:22:55AM -0800, Bill Huey wrote:
> > On Mon, Jan 16, 2006 at 09:35:42AM +0100, Esben Nielsen wrote:
> > > On Sat, 14 Jan 2006, Bill Huey wrote:
> > > I am not precisely sure what you mean by "false reporting".
> > >
> > > Handing off BKL is done in schedule() in sched.c. I.e. if B owns a normal
> > > mutex, A will give BKL to B when A calls schedule() in the down-operation
> > > of that mutex.
> >
> > Task A holding BKL would have to drop BKL when it blocks against a mutex held
> > by task B in my example and therefore must hit schedule() before any pi boost
> > operation happens. I'll take another look at your code just to see if this is
> > clear.
>
> Esben,
>
> Ok, I see what you did. Looking through the raw patch instead of the applied
> sources made it not so obvious it me.

Only small patches can be read directly....

> Looks the logic for it is there to deal
> with that case, good. I like the patch,

good :-)

> but it does context switch twice as
> much it seems which might a killer.

Twice? It depends on the lock nesting depth. The number of task
switches is the lock nesting depth in any blocking down() operation.
In all other implementations the number of task switches is just 1.
I.e is the usual case (task A blocks on  lock 1 owned by B, which is
unblocked), where lock nesting depth is 1, there is no penalty with my
approach. The panalty comes at (task A blocks on lock 1 owned by B,
blocked on lock 2 owned by C). There B is scheduled as an agent to boost
C, such that A never touches lock 2 or task C. Precisely this makes the
spinlocks a lot easier to handle.

On the other hand the maximum time spent with preemption off is
O(1) in my implementation whereas it is at least O(lock nesting depth) in
other implementations. I think the current implementation in rt_preempt
is max(O(total number of PI waiters),O(lock nesting depth)).

Esben

>
> bill
>
> -
> 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/
>


  reply	other threads:[~2006-01-16 11:30 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-11 17:25 RT Mutex patch and tester [PREEMPT_RT] Esben Nielsen
2006-01-11 17:51 ` Steven Rostedt
2006-01-11 21:45   ` Esben Nielsen
2006-01-12 11:33 ` Bill Huey
2006-01-12 12:54   ` Esben Nielsen
2006-01-13  8:07     ` Bill Huey
2006-01-13  8:47       ` Esben Nielsen
2006-01-13 10:19         ` Bill Huey
2006-01-15  4:24 ` Bill Huey
2006-01-16  8:35   ` Esben Nielsen
2006-01-16 10:22     ` Bill Huey
2006-01-16 10:53       ` Bill Huey
2006-01-16 11:30         ` Esben Nielsen [this message]
     [not found] ` <Pine.LNX.4.44L0.0601181120100.1993-201000@lifa02.phys.au.dk>
2006-01-18 10:38   ` Ingo Molnar
2006-01-18 12:49   ` Steven Rostedt
2006-01-18 14:18     ` Esben Nielsen
     [not found]   ` <Pine.LNX.4.44L0.0601230047290.31387-201000@lifa01.phys.au.dk>
2006-01-23  0:38     ` david singleton
2006-01-23  2:04     ` Bill Huey
2006-01-23  9:33       ` Esben Nielsen
2006-01-23 14:23         ` Steven Rostedt
2006-01-23 15:14           ` Esben Nielsen
2006-01-27 15:18             ` Esben Nielsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.44L0.0601161215080.4219-100000@lifa01.phys.au.dk \
    --to=simlo@phys.au.dk \
    --cc=billh@gnuppy.monkey.org \
    --cc=dsingleton@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rostedt@goodmis.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).