All of lore.kernel.org
 help / color / mirror / Atom feed
From: Con Kolivas <kernel@kolivas.org>
To: Peter Williams <pwil3058@bigpond.net.au>
Cc: Linux Kernel <linux-kernel@vger.kernel.org>,
	Sam Vilain <sam@vilain.net>,
	"Eric W.Biederman" <ebiederm@xmission.com>,
	Srivatsa <vatsa@in.ibm.com>, Balbir Singh <bsingharora@gmail.com>,
	Kirill Korotaev <dev@openvz.org>, Mike Galbraith <efault@gmx.de>,
	Kingsley Cheung <kingsley@aurema.com>,
	CKRM <ckrm-tech@lists.sourceforge.net>,
	Ingo Molnar <mingo@elte.hu>,
	Rene Herman <rene.herman@keyaccess.nl>
Subject: Re: [RFC 1/4] sched: Add CPU rate soft caps
Date: Sun, 4 Jun 2006 12:27:54 +1000	[thread overview]
Message-ID: <200606041227.55892.kernel@kolivas.org> (raw)
In-Reply-To: <20060604010841.2648.43027.sendpatchset@heathwren.pw.nest>

On Sunday 04 June 2006 11:08, Peter Williams wrote:
> 3. Thanks to suggestions from Con Kolivas with respect to alternative
> methods to reduce the possibility of a task being starved of CPU while
> holding an important system resource, enforcement of caps is now
> quite strict.  However, there will still be occasions where caps may be
> exceeded due to this mechanism vetoing enforcement.

Transcription bug here:

>  int fastcall __sched mutex_lock_interruptible(struct mutex *lock)
>  {
> +	int ret;
> +
>  	might_sleep();
>  	return __mutex_fastpath_lock_retval
>  			(&lock->count, __mutex_lock_interruptible_slowpath);

should be ret = 

> +
> +	if (!ret)
> +		inc_mutex_count();
> +
> +	return ret;
>  }
>

compare with here:

>  EXPORT_SYMBOL(mutex_lock_interruptible);
> @@ -366,8 +390,13 @@ static inline int __mutex_trylock_slowpa
>   */
>  int fastcall __sched mutex_trylock(struct mutex *lock)
>  {
> -	return __mutex_fastpath_trylock(&lock->count,
> +	int ret = __mutex_fastpath_trylock(&lock->count,
>  					__mutex_trylock_slowpath);
> +
> +	if (!ret)
> +		inc_mutex_count();
> +
> +	return ret;
>  }
>
>  EXPORT_SYMBOL(mutex_trylock);

-- 
-ck

       reply	other threads:[~2006-06-04  2:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20060604010831.2648.37997.sendpatchset@heathwren.pw.nest>
     [not found] ` <20060604010841.2648.43027.sendpatchset@heathwren.pw.nest>
2006-06-04  2:27   ` Con Kolivas [this message]
2006-06-04  4:32     ` [RFC 1/4] sched: Add CPU rate soft caps Peter Williams

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=200606041227.55892.kernel@kolivas.org \
    --to=kernel@kolivas.org \
    --cc=bsingharora@gmail.com \
    --cc=ckrm-tech@lists.sourceforge.net \
    --cc=dev@openvz.org \
    --cc=ebiederm@xmission.com \
    --cc=efault@gmx.de \
    --cc=kingsley@aurema.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=pwil3058@bigpond.net.au \
    --cc=rene.herman@keyaccess.nl \
    --cc=sam@vilain.net \
    --cc=vatsa@in.ibm.com \
    /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.