FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 12-10-2008, 10:42 AM
Steven Whitehouse
 
Default dlm: Use cond_resched() in ast delivery loop

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.

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();
}
}
 
Old 12-10-2008, 02:28 PM
David Teigland
 
Default dlm: Use cond_resched() in ast delivery loop

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();
> }
> }
>
>
 

Thread Tools




All times are GMT. The time now is 01:27 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org