public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@novell.com>
To: Chris Wright <chrisw@osdl.org>
Cc: 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: Thu, 21 Oct 2004 04:00:22 +0200	[thread overview]
Message-ID: <20041021020022.GB8756@dualathlon.random> (raw)
In-Reply-To: <20041020183238.U2357@build.pdx.osdl.net>

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.

  reply	other threads:[~2004-10-21  2:00 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 [this message]
2004-10-21  5:16   ` Chris Wright
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=20041021020022.GB8756@dualathlon.random \
    --to=andrea@novell.com \
    --cc=bleher@informatik.uni-muenchen.de \
    --cc=chrisw@osdl.org \
    --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