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: Thu, 12 Jan 2006 13:54:23 +0100 (MET)	[thread overview]
Message-ID: <Pine.LNX.4.44L0.0601121337480.30644-100000@lifa03.phys.au.dk> (raw)
In-Reply-To: <20060112113316.GA14416@gnuppy.monkey.org>



On Thu, 12 Jan 2006, Bill Huey wrote:

> On Wed, Jan 11, 2006 at 06:25:36PM +0100, Esben Nielsen wrote:
> > I have done 2 things which might be of interrest:
> >
> > II) I changed the priority inheritance mechanism in rt.c,
> > optaining the following goals:
> > 3) Simpler code. rt.c was kind of messy. Maybe it still is....:-)
>
> Awssome. The code was done in what seems like a hurry and mixes up a
> bunch of things that should be seperate out into individual sub-sections.

*nod*
I worked on the tester before christmas and only had a few evenings for
myself to look at the kernel after christmas. With a fulltime job and a family
I don't get many spare hours with no disturbance to code (close to none
really), so I had to ship it while my girlfriend and child were away for a
few days.

>
> The allocation of the waiter object on the thread's stack should undergo
> some consideration of whether this should be move into a more permanent
> store.

Hmm, why?
When I first saw it in the Linux kernel I thought: Damn this is elagant.
You only need a waiter when you block, and while you block your stack is
untouched. When you don't block you don't need the waiter, so why have it
allocated somewhere else, say in task_t?

> I haven't looked at an implementation of turnstiles recently,

turnstiles? What is that?

> but
> I suspect that this is what it actually is and it would eliminate the
> moving of waiters to the thread that's is actively running with the lock
> path terminal mutex. It works, but it's sloppy stuff.
>
> [loop trickery, priority leanding operations handed off to mutex owner]
>
> > What is gained is that the amount of time where irq and preemption is off
> > is limited: One task does it's work with preemption disabled, wakes up the
> > next and enable preemption and schedules. The amount of time spend with
> > preemption disabled is has a clear upper limit, untouched by how
> > complicated and deep the lock structure is.
>
> task_blocks_on_lock() is another place that one might consider seperating
> out some bundled functionality into different places in the down()
> implementation.

What is done now with my patch is "minimal", but you have to add your
self to the wait list. You also have to boost the owner of the lock.
You might be able to split it up by releasing and reacquiring all the
spinlocks; but I am pretty much sure this is not the place in the
whole system giving you the longest preemptions off section, so it doesn't
make much sense to improve it.


> I'll look at the preemption stuff next.
>
> Just some ideas. Looks like a decent start.
>

Thanks for the positive response!

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-12 12:54 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 [this message]
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
     [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.0601121337480.30644-100000@lifa03.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).