public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Niteshadow <niteshadow@tulene.sk>
To: Rik van Riel <riel@conectiva.com.br>
Cc: Robert Love <rml@tech9.net>, Benjamin LaHaise <bcrl@redhat.com>,
	Anthony DeRobertis <asd@suespammers.org>, root <r6144@263.net>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Make highly niced processes run only when idle
Date: Mon, 10 Dec 2001 13:25:42 +0100	[thread overview]
Message-ID: <20011210132542.B15152@hq.alert.sk> (raw)
In-Reply-To: <1007944229.878.21.camel@phantasy> <Pine.LNX.4.33L.0112100045460.4079-100000@imladris.surriel.com>
In-Reply-To: <Pine.LNX.4.33L.0112100045460.4079-100000@imladris.surriel.com>; from riel@conectiva.com.br on Mon, Dec 10, 2001 at 12:46:23AM -0200

[-- Attachment #1: Type: text/plain, Size: 1277 bytes --]

On Mon, Dec 10, 2001 at 12:46:23AM -0200, Rik van Riel wrote:
> On 9 Dec 2001, Robert Love wrote:
> 
> > Hmm, what if we only boosted it based on something like this:
> >
> > 	if (p->policy == SCHED_IDLE) {
> > 		weight = p->counter;
> > 		if (p->lock_depth >= 0 || signal_pending(p))
> > 			/* boost somehow ... */
> > 	}
> 
> Now what if the process is holding an inode or superblock
> semaphore ?

Even better:

What if the SCHED_IDLE task holds a POSIX read lock on a file ?

Say we have three processes:
A is SCHED_IDLE holding read lock on /foo/bar
B is SCHED_OTHER wanting to acquire write lock /foo/bar
C is SCHED_OTHER computing fractals and eating up every cycle it can get

What we want is A to get B's priority until it releases the lock on
/foo/bar and then revert it to SCHED_IDLE policy. Otherwise B would get
deadlocked with A while C (or any other CPU hog) is running.

I know this is a userspace problem (similar to real-time processes vs.
normal processes), but I think it would be nice to make SCHED_IDLE
non-priviliged policy.

-- 
Kind regards,
Robert Varga
------------------------------------------------------------------------------
n@hq.sk                                          http://hq.sk/~nite/gpgkey.txt
 

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

  reply	other threads:[~2001-12-10 12:28 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-08  4:38 [PATCH] Make highly niced processes run only when idle root
2001-12-08  4:39 ` Robert Love
2001-12-09 22:31   ` Anthony DeRobertis
2001-12-09 23:05     ` Robert Love
2001-12-09 23:16       ` Benjamin LaHaise
2001-12-09 23:21         ` Robert Love
2001-12-09 23:46           ` Benjamin LaHaise
2001-12-10  0:30             ` Robert Love
2001-12-10  2:46               ` Rik van Riel
2001-12-10 12:25                 ` Niteshadow [this message]
2001-12-11  1:35               ` Steve Bergman
2001-12-19 23:49           ` Pavel Machek
2001-12-11  1:36       ` Ton Hospel
2001-12-11  1:54         ` Robert Love
2001-12-13 21:42           ` Pavel Machek

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=20011210132542.B15152@hq.alert.sk \
    --to=niteshadow@tulene.sk \
    --cc=asd@suespammers.org \
    --cc=bcrl@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=r6144@263.net \
    --cc=riel@conectiva.com.br \
    --cc=rml@tech9.net \
    /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