linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Jeff Layton <jlayton@redhat.com>, fengguang.wu@gmail.com
Cc: linux-nfs@vger.kernel.org, linux-fsdevel@vger.kernel.org,
	linux-mm@kvack.org
Subject: Re: why are WB_SYNC_NONE COMMITs being done with FLUSH_SYNC set ?
Date: Thu, 19 Aug 2010 10:37:10 -0400	[thread overview]
Message-ID: <20100819143710.GA4752@infradead.org> (raw)
In-Reply-To: <20100819101525.076831ad@barsoom.rdu.redhat.com>

On Thu, Aug 19, 2010 at 10:15:25AM -0400, Jeff Layton wrote:
> I'm looking at backporting some upstream changes to earlier kernels,
> and ran across something I don't quite understand...
> 
> In nfs_commit_unstable_pages, we set the flags to FLUSH_SYNC. We then
> zero out the flags if wbc->nonblocking or wbc->for_background is set.
> 
> Shouldn't we also clear it out if wbc->sync_mode == WB_SYNC_NONE ?
> WB_SYNC_NONE means "don't wait on anything", so shouldn't that include
> not waiting on the COMMIT to complete?

I've been trying to figure out what the nonblocking flag is supposed
to mean for a while now.

It basically disappeared in commit 0d99519efef15fd0cf84a849492c7b1deee1e4b7

	"writeback: remove unused nonblocking and congestion checks"

from Wu.  What's left these days is a couple of places in local copies
of write_cache_pages (afs, cifs), and a couple of checks in random
writepages instances (afs, block_write_full_page, ceph, nfs, reiserfs, xfs)
and the use in nfs_write_inode.  It's only actually set for memory
migration and pageout, that is VM writeback.

To me it really doesn't make much sense, but maybe someone has a better
idea what it is for.

> +	if (wbc->nonblocking || wbc->for_background ||
> +	    wbc->sync_mode == WB_SYNC_NONE)

You could remove the nonblocking and for_background checks as
these impliy WB_SYNC_NONE.

--
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:[~2010-08-19 14:37 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20100819101525.076831ad@barsoom.rdu.redhat.com>
2010-08-19 14:37 ` Christoph Hellwig [this message]
2010-08-19 14:58   ` why are WB_SYNC_NONE COMMITs being done with FLUSH_SYNC set ? Trond Myklebust
2010-08-19 15:11     ` Jeff Layton
2010-08-19 15:24     ` Christoph Hellwig
2010-08-19 19:16     ` Jeff Layton
2010-08-19 19:43       ` Trond Myklebust
2010-08-20 13:23         ` Wu Fengguang
2010-08-30 19:22           ` Trond Myklebust
2010-08-30 23:53             ` Wu Fengguang
2010-08-20  0:33       ` Wu Fengguang
2010-08-20  0:53         ` Jeff Layton
2010-08-20 13:20           ` Wu Fengguang
2010-08-19 23:55   ` Wu Fengguang
2010-08-20  0:02     ` Wu Fengguang
2010-08-20  2:36       ` Sage Weil
2010-08-20  9:19     ` Christoph Hellwig
2010-08-20 11:27       ` Jeff Layton
2010-08-20 12:44         ` Wu Fengguang
2010-08-20 12:26       ` 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=20100819143710.GA4752@infradead.org \
    --to=hch@infradead.org \
    --cc=fengguang.wu@gmail.com \
    --cc=jlayton@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=linux-nfs@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).