public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Wright <chrisw@osdl.org>
To: Andrea Arcangeli <andrea@novell.com>
Cc: Chris Wright <chrisw@osdl.org>,
	mingo@elte.hu, johansen@immunix.com,
	Stephen Smalley <sds@epoch.ncsc.mil>,
	Thomas Bleher <bleher@informatik.uni-muenchen.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [RFC][PATCH] delay rq_lock acquisition in setscheduler
Date: Wed, 20 Oct 2004 22:16:32 -0700	[thread overview]
Message-ID: <20041020221632.V2357@build.pdx.osdl.net> (raw)
In-Reply-To: <20041021020022.GB8756@dualathlon.random>; from andrea@novell.com on Thu, Oct 21, 2004 at 04:00:22AM +0200

* Andrea Arcangeli (andrea@novell.com) wrote:
> On Wed, Oct 20, 2004 at 06:32:38PM -0700, Chris Wright wrote:
> > +	rq = task_rq_lock(p, &flags);
> > +	/* recheck policy now with rq lock held */
> > +	retval = -EPERM;
> > +	if (unlikely(oldpolicy != -1 && oldpolicy != p->policy))
> > +		goto out_unlock_rq;
> 
> to be really backwards compatible you should return 0 methinks, the only
> case when this race can trigger is with non deterministic usage, and the
> current kernel would never return -EPERM in such a non deterministic
> usage. However the -EPERM will signal the non deterministic usage, but I
> doubt it worth to return -EPERM there, since it makes it looks like the
> other side that didn't get EPERM is safe while it's not, since the other
> side isn't deterministic either.

true.  another alternative is to drop rq_lock and do the checks over.
i didn't convince myself yet that there's no chance for livelock,
although it seems unlikely.

  reply	other threads:[~2004-10-21  5:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-21  1:32 [RFC][PATCH] delay rq_lock acquisition in setscheduler Chris Wright
2004-10-21  2:00 ` Andrea Arcangeli
2004-10-21  5:16   ` Chris Wright [this message]
2004-10-21 12:53     ` Andrea Arcangeli
2004-10-21  7:56 ` Ingo Molnar
2004-10-21 17:25   ` Chris Wright

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=20041020221632.V2357@build.pdx.osdl.net \
    --to=chrisw@osdl.org \
    --cc=andrea@novell.com \
    --cc=bleher@informatik.uni-muenchen.de \
    --cc=johansen@immunix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=sds@epoch.ncsc.mil \
    /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