All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ben Myers <bpm@sgi.com>
To: NeilBrown <neilb@suse.de>
Cc: nfbrown@suse.com, Alex Elder <elder@linux.com>,
	xfs@oss.sgi.com, Christoph Hellwig <hch@infradead.org>,
	ataschner@novell.com
Subject: Re: [REVIEW] xfssyncd lost wakes circa 2.6.32
Date: Wed, 23 Nov 2011 14:30:41 -0600	[thread overview]
Message-ID: <20111123203041.GO749@sgi.com> (raw)
In-Reply-To: <20111124064216.5ff54077@notabene.brown>

On Thu, Nov 24, 2011 at 06:42:16AM +1100, NeilBrown wrote:
> On Wed, 23 Nov 2011 10:30:46 -0600 Ben Myers <bpm@sgi.com> wrote:
> > Index: linux/fs/xfs/linux-2.6/xfs_sync.c
> > ===================================================================
> > --- linux.orig/fs/xfs/linux-2.6/xfs_sync.c
> > +++ linux/fs/xfs/linux-2.6/xfs_sync.c
> > @@ -620,13 +620,25 @@ xfssyncd(
> >  	set_freezable();
> >  	timeleft = xfs_syncd_centisecs * msecs_to_jiffies(10);
> >  	for (;;) {
> > -		timeleft = schedule_timeout_interruptible(timeleft);
> > -		/* swsusp */
> > -		try_to_freeze();
> > -		if (kthread_should_stop() && list_empty(&mp->m_sync_list))
> > +		set_current_state(TASK_INTERRUPTIBLE);
> > +		spin_lock(&mp->m_sync_lock);
> > +
> > +		if (list_empty(&mp->m_sync_list) && !kthread_should_stop()) {
> > +			spin_unlock(&mp->m_sync_lock);
> > +
> > +			timeleft = schedule_timeout_interruptible(timeleft);
> 
> This should be just "schedule_timeout(timeleft)".
> This call sets TASK_INTERRUPTIBLE so we will go to sleep even if we were
> only just woken up.
> 
> I don't really know the XFS code well enough to the rest looks right, but
> with that small fix it certainly doesn't look wrong :-)

Thanks Neil!   I'll get that fixed up.  ;)

-Ben

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

      reply	other threads:[~2011-11-23 20:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-23 16:30 [REVIEW] xfssyncd lost wakes circa 2.6.32 Ben Myers
2011-11-23 19:42 ` NeilBrown
2011-11-23 20:30   ` Ben Myers [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=20111123203041.GO749@sgi.com \
    --to=bpm@sgi.com \
    --cc=ataschner@novell.com \
    --cc=elder@linux.com \
    --cc=hch@infradead.org \
    --cc=neilb@suse.de \
    --cc=nfbrown@suse.com \
    --cc=xfs@oss.sgi.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.