From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Teigland Date: Wed, 10 Dec 2008 09:28:30 -0600 Subject: [Cluster-devel] Re: dlm: Use cond_resched() in ast delivery loop In-Reply-To: <1228909326.9571.363.camel@quoit> References: <1228909326.9571.363.camel@quoit> Message-ID: <20081210152830.GA27599@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 > > 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(); > } > } > >