cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: David Teigland <teigland@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] Re: dlm: Use cond_resched() in ast delivery loop
Date: Wed, 10 Dec 2008 09:28:30 -0600	[thread overview]
Message-ID: <20081210152830.GA27599@redhat.com> (raw)
In-Reply-To: <1228909326.9571.363.camel@quoit>

On Wed, Dec 10, 2008 at 11:42:06AM +0000, Steven Whitehouse wrote:
> 
> This is a one-liner to use cond_resched() rather than schedule()
> in the ast delivery loop. It should not be necessary to schedule
> every time, so this will save some cpu time while continuing to
> allow scheduling when required.

Thanks, will queue it up.

> 
> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
> 
> diff --git a/fs/dlm/ast.c b/fs/dlm/ast.c
> index 8bf31e3..30c11f3 100644
> --- a/fs/dlm/ast.c
> +++ b/fs/dlm/ast.c
> @@ -101,7 +101,7 @@ static void process_asts(void)
>  		   and may result in the lkb being freed */
>  		dlm_put_lkb(lkb);
>  
> -		schedule();
> +		cond_resched();
>  	}
>  }
>  
> 



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

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-10 11:42 [Cluster-devel] dlm: Use cond_resched() in ast delivery loop Steven Whitehouse
2008-12-10 15:28 ` David Teigland [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=20081210152830.GA27599@redhat.com \
    --to=teigland@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).