From: Con Kolivas <kernel@kolivas.org>
To: Juho Saarikko <juhos@mbnet.fi>
Cc: linux list <linux-kernel@vger.kernel.org>, ck list <ck@vds.kolivas.org>
Subject: Re: [ck] [ckpatch][8/29] track_mutexes-1.patch
Date: Sun, 18 Jun 2006 21:34:35 +1000 [thread overview]
Message-ID: <200606182134.35520.kernel@kolivas.org> (raw)
In-Reply-To: <1150630103.9668.4.camel@a88-112-69-25.elisa-laajakaista.fi>
On Sunday 18 June 2006 21:28, Juho Saarikko wrote:
> On Sun, 2006-06-18 at 10:31, Con Kolivas wrote:
> > Keep a record of how many mutexes are held by any task. This allows cpu
> > scheduler code to use this information in decision making for tasks that
> > hold contended resources.
>
> So, if I'm an userspace application trying to overcome nice or
> scheduling class limitations, I can simply create a lot of mutexes, lock
> them all, and get better scheduling ?-)
>
> A better way would be to track what task holds what mutex, and when some
> task tries to lock an already locked one, temporarily elevate the task
> holding the mutex to the priority of the highest priority task blocking
> on it (if higher than what the holding task already has, of course).
> Then return the task to normal when it unlocks the mutex.
>
> This might be more trouble and cost more overhead than it's worth, but
> in theory, it would be a supreme system.
No you misunderstand why I use it here. I am not doing priority inheritance at
all; that comes with all sorts of risks and complexities. This is done purely
to prevent SCHED_IDLEPRIO tasks from grabbing a mutex and then never getting
scheduled due to IDLEPRIO semantics while another task is effectively starved
waiting on that mutex. It is used in -ck only to convert SCHED_IDLEPRIO tasks
to nice 19 SCHED_NORMAL tasks while they're holding mutexes to do this.
--
-ck
prev parent reply other threads:[~2006-06-18 11:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-18 7:31 [ckpatch][8/29] track_mutexes-1.patch Con Kolivas
2006-06-18 10:58 ` Nikita Danilov
2006-06-18 11:28 ` [ck] " Juho Saarikko
2006-06-18 11:34 ` Con Kolivas [this message]
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=200606182134.35520.kernel@kolivas.org \
--to=kernel@kolivas.org \
--cc=ck@vds.kolivas.org \
--cc=juhos@mbnet.fi \
--cc=linux-kernel@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.