All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miklos Szeredi <miklos@szeredi.hu>
To: chris.mason@oracle.com
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: dirty balancing deadlock
Date: Tue, 20 Feb 2007 09:53:46 +0100	[thread overview]
Message-ID: <E1HJQks-0008Lw-00@dorka.pomaz.szeredi.hu> (raw)
In-Reply-To: <20070220001620.GK6133@think.oraclecorp.com> (message from Chris Mason on Mon, 19 Feb 2007 19:16:20 -0500)

> > > > > In general, writepage is supposed to do work without blocking on
> > > > > expensive locks that will get pdflush and dirty reclaim stuck in this
> > > > > fashion.  You'll probably have to take the same approach reiserfs does
> > > > > in data=journal mode, which is leaving the page dirty if fuse_get_req_wp
> > > > > is going to block without making progress.
> > > > 
> > > > Pdflush, and dirty reclaim set wbc->nonblocking to true.
> > > > balance_dirty_pages and fsync don't.  The problem here is that
> > > > Andrew's patch is wrong to let balance_dirty_pages() try to write back
> > > > pages from a different queue.
> > > 
> > > async or sync, writepage is supposed to either make progress or bail.
> > > loopback aside, if the fuse call is blocking long term, you're going to
> > > run into problems.
> > 
> > Hmm, like what?
> 
> Something a little different from what you're seeing.  Basically if the
> PF_MEMALLOC paths end up waiting on a filesystem transaction, and that
> transaction is waiting for more ram, the system will eventually grind to
> a halt.  data=journal is the easiest way to hit it, since writepage
> always logs at least 4k.
> 
> WB_SYNC_NONE and wbc->nonblocking aren't a great test, in reiser I
> resorted to testing PF_MEMALLOC.

I'm not pretending to understand how journaling filesystems work, but
this shouldn't be an issue with fuse.  Can you show me a call path,
where PF_MEMALLOC is set and .nonblocking is not?

Thanks,
Miklos

WARNING: multiple messages have this Message-ID (diff)
From: Miklos Szeredi <miklos@szeredi.hu>
To: chris.mason@oracle.com
Cc: akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: dirty balancing deadlock
Date: Tue, 20 Feb 2007 09:53:46 +0100	[thread overview]
Message-ID: <E1HJQks-0008Lw-00@dorka.pomaz.szeredi.hu> (raw)
In-Reply-To: <20070220001620.GK6133@think.oraclecorp.com> (message from Chris Mason on Mon, 19 Feb 2007 19:16:20 -0500)

> > > > > In general, writepage is supposed to do work without blocking on
> > > > > expensive locks that will get pdflush and dirty reclaim stuck in this
> > > > > fashion.  You'll probably have to take the same approach reiserfs does
> > > > > in data=journal mode, which is leaving the page dirty if fuse_get_req_wp
> > > > > is going to block without making progress.
> > > > 
> > > > Pdflush, and dirty reclaim set wbc->nonblocking to true.
> > > > balance_dirty_pages and fsync don't.  The problem here is that
> > > > Andrew's patch is wrong to let balance_dirty_pages() try to write back
> > > > pages from a different queue.
> > > 
> > > async or sync, writepage is supposed to either make progress or bail.
> > > loopback aside, if the fuse call is blocking long term, you're going to
> > > run into problems.
> > 
> > Hmm, like what?
> 
> Something a little different from what you're seeing.  Basically if the
> PF_MEMALLOC paths end up waiting on a filesystem transaction, and that
> transaction is waiting for more ram, the system will eventually grind to
> a halt.  data=journal is the easiest way to hit it, since writepage
> always logs at least 4k.
> 
> WB_SYNC_NONE and wbc->nonblocking aren't a great test, in reiser I
> resorted to testing PF_MEMALLOC.

I'm not pretending to understand how journaling filesystems work, but
this shouldn't be an issue with fuse.  Can you show me a call path,
where PF_MEMALLOC is set and .nonblocking is not?

Thanks,
Miklos

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

  reply	other threads:[~2007-02-20  8:54 UTC|newest]

Thread overview: 52+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-18 18:28 dirty balancing deadlock Miklos Szeredi
2007-02-18 18:28 ` Miklos Szeredi
2007-02-18 20:53 ` Andrew Morton
2007-02-18 20:53   ` Andrew Morton
2007-02-18 21:25   ` Rik van Riel
2007-02-18 21:25     ` Rik van Riel
2007-02-18 22:54     ` Miklos Szeredi
2007-02-18 22:54       ` Miklos Szeredi
2007-02-18 22:50   ` Miklos Szeredi
2007-02-18 22:50     ` Miklos Szeredi
2007-02-18 22:59     ` Andrew Morton
2007-02-18 22:59       ` Andrew Morton
2007-02-18 23:22       ` Miklos Szeredi
2007-02-18 23:22         ` Miklos Szeredi
2007-02-18 23:59         ` Andrew Morton
2007-02-18 23:59           ` Andrew Morton
2007-02-19  0:25           ` Miklos Szeredi
2007-02-19  0:25             ` Miklos Szeredi
2007-02-19  0:30             ` Miklos Szeredi
2007-02-19  0:30               ` Miklos Szeredi
2007-02-19  0:45             ` Miklos Szeredi
2007-02-19  0:45               ` Miklos Szeredi
2007-02-19  0:45             ` Chris Mason
2007-02-19  0:45               ` Chris Mason
2007-02-19  0:54               ` Miklos Szeredi
2007-02-19  0:54                 ` Miklos Szeredi
2007-02-19  1:01                 ` Chris Mason
2007-02-19  1:01                   ` Chris Mason
2007-02-19  1:14                   ` Miklos Szeredi
2007-02-19  1:14                     ` Miklos Szeredi
2007-02-20  0:16                     ` Chris Mason
2007-02-20  0:16                       ` Chris Mason
2007-02-20  8:53                       ` Miklos Szeredi [this message]
2007-02-20  8:53                         ` Miklos Szeredi
2007-02-19 17:11           ` Miklos Szeredi
2007-02-19 17:11             ` Miklos Szeredi
2007-02-19 23:12             ` Miklos Szeredi
2007-02-19 23:12               ` Miklos Szeredi
2007-02-20  0:13             ` Chris Mason
2007-02-20  0:13               ` Chris Mason
2007-02-20  8:47               ` Miklos Szeredi
2007-02-20  8:47                 ` Miklos Szeredi
2007-02-20 11:30                 ` Chris Mason
2007-02-20 11:30                   ` Chris Mason
2007-02-21 21:36             ` Andrew Morton
2007-02-21 21:36               ` Andrew Morton
2007-02-22  7:42               ` Miklos Szeredi
2007-02-22  7:42                 ` Miklos Szeredi
2007-02-22  7:55                 ` Andrew Morton
2007-02-22  7:55                   ` Andrew Morton
2007-02-22  8:02                   ` Miklos Szeredi
2007-02-22  8:02                     ` Miklos Szeredi

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=E1HJQks-0008Lw-00@dorka.pomaz.szeredi.hu \
    --to=miklos@szeredi.hu \
    --cc=akpm@linux-foundation.org \
    --cc=chris.mason@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    /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.