All of lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Wu Fengguang <fengguang.wu@intel.com>
Cc: Christoph Hellwig <hch@lst.de>, Jan Kara <jack@suse.cz>,
	"linux-fsdevel@vger.kernel.org" <linux-fsdevel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH] mm: Avoid livelocking of WB_SYNC_ALL writeback
Date: Sat, 6 Nov 2010 12:45:18 +0100	[thread overview]
Message-ID: <20101106114518.GA1427@lst.de> (raw)
In-Reply-To: <20101106025423.GA14567@localhost>

On Sat, Nov 06, 2010 at 10:54:23AM +0800, Wu Fengguang wrote:
> > I think it would be useful to elaborate here on how livelock avoidance
> > is supposed to work.
> 
> It's supposed to sync files in a big loop
> 
>         for each dirty inode
>             write_cache_pages()
>                 (quickly) tag currently dirty pages
>                 (maybe slowly) sync all tagged pages
> 
> Ideally the loop should call write_cache_pages() _once_ for each inode.
> At least this is the assumption made by commit f446daaea (mm:
> implement writeback livelock avoidance using page tagging).
> 
> Setting wbc.nr_to_write to LONG_MAX ensures that writeback_inodes_wb()
> will complete the above loop before returning to wb_writeback(), and
> to prevent wb_writeback() from looping (thus re-syncing extra data) in
> the below range of code.

I know this, but putting a shortened version of this into the comment
would generally be helpful.  It should at least mention that the page
tagging is taking care of it.


  reply	other threads:[~2010-11-06 11:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-05 21:26 [PATCH] mm: Avoid livelocking of WB_SYNC_ALL writeback Jan Kara
2010-11-05 22:30 ` Christoph Hellwig
2010-11-06  2:54   ` Wu Fengguang
2010-11-06 11:45     ` Christoph Hellwig [this message]
2010-11-06  2:55   ` Wu Fengguang
2010-11-06  2:55     ` Wu Fengguang
2010-11-06 16:39     ` Wu Fengguang
2010-11-07 13:34       ` Jan Kara
2010-11-06  1:36 ` Johannes Weiner
2010-11-06  1:36   ` Johannes Weiner
2010-11-07 13:07   ` Jan Kara
2010-11-06  4:12 ` Wu Fengguang
2010-11-06  4:12   ` Wu Fengguang
2010-11-07 13:22   ` Jan Kara
2010-11-07 13:22     ` Jan Kara
2010-11-07 13:37     ` Wu Fengguang

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=20101106114518.GA1427@lst.de \
    --to=hch@lst.de \
    --cc=akpm@linux-foundation.org \
    --cc=fengguang.wu@intel.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.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.