public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Wu Fengguang <fengguang.wu@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
To: Jens Axboe <jens.axboe@oracle.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>,
	LKML <linux-kernel@vger.kernel.org>,
	Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: <linux-fsdevel@vger.kernel.org>
Subject: [PATCH 6/6] writeback: introduce wbc.for_background
Date: Fri, 27 Nov 2009 18:59:14 +0800	[thread overview]
Message-ID: <20091127110408.076200992@intel.com> (raw)
In-Reply-To: 20091127105908.944744141@intel.com

[-- Attachment #1: writeback-add-wbc-for_background.patch --]
[-- Type: text/plain, Size: 1728 bytes --]

It will lower the flush priority for NFS, and maybe more in future.

CC: Trond Myklebust <Trond.Myklebust@netapp.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 fs/fs-writeback.c         |    1 +
 fs/nfs/write.c            |    2 +-
 include/linux/writeback.h |    1 +
 3 files changed, 3 insertions(+), 1 deletion(-)

--- linux.orig/fs/fs-writeback.c	2009-11-27 18:55:11.000000000 +0800
+++ linux/fs/fs-writeback.c	2009-11-27 18:55:17.000000000 +0800
@@ -730,6 +730,7 @@ static long wb_writeback(struct bdi_writ
 		.sync_mode		= args->sync_mode,
 		.older_than_this	= NULL,
 		.for_kupdate		= args->for_kupdate,
+		.for_background		= args->for_background,
 		.range_cyclic		= args->range_cyclic,
 	};
 	unsigned long oldest_jif;
--- linux.orig/include/linux/writeback.h	2009-11-27 16:35:00.000000000 +0800
+++ linux/include/linux/writeback.h	2009-11-27 18:55:17.000000000 +0800
@@ -49,6 +49,7 @@ struct writeback_control {
 	unsigned nonblocking:1;		/* Don't get stuck on request queues */
 	unsigned encountered_congestion:1; /* An output: a queue is full */
 	unsigned for_kupdate:1;		/* A kupdate writeback */
+	unsigned for_background:1;	/* A background writeback */
 	unsigned for_reclaim:1;		/* Invoked from the page allocator */
 	unsigned range_cyclic:1;	/* range_start is cyclic */
 	unsigned more_io:1;		/* more io to be dispatched */
--- linux.orig/fs/nfs/write.c	2009-11-19 16:00:50.000000000 +0800
+++ linux/fs/nfs/write.c	2009-11-27 18:55:17.000000000 +0800
@@ -178,7 +178,7 @@ static int wb_priority(struct writeback_
 {
 	if (wbc->for_reclaim)
 		return FLUSH_HIGHPRI | FLUSH_STABLE;
-	if (wbc->for_kupdate)
+	if (wbc->for_kupdate || wbc->for_background)
 		return FLUSH_LOWPRI;
 	return 0;
 }



      parent reply	other threads:[~2009-11-27 11:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-11-27 10:59 [PATCH 0/6] trivial writeback cleanups/fixes V2 Wu Fengguang
2009-11-27 10:59 ` [PATCH 1/6] writeback: remove unused nonblocking and congestion checks Wu Fengguang
2009-11-27 10:59 ` [PATCH 2/6] writeback: remove unused nonblocking and congestion checks (write_cache_pages) Wu Fengguang
2009-11-27 10:59 ` [PATCH 3/6] writeback: remove unused nonblocking and congestion checks (pohmelfs) Wu Fengguang
2009-11-27 10:59 ` [PATCH 4/6] writeback: remove unused nonblocking and congestion checks (xfs) Wu Fengguang
2009-11-27 11:40   ` Christoph Hellwig
2009-11-27 11:50     ` Wu Fengguang
2009-11-27 12:08       ` Christoph Hellwig
2009-11-27 10:59 ` [PATCH 5/6] writeback: remove the always false bdi_cap_writeback_dirty() test Wu Fengguang
2009-11-27 10:59 ` Wu Fengguang [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=20091127110408.076200992@intel.com \
    --to=fengguang.wu@gmail.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=akpm@linux-foundation.org \
    --cc=fengguang.wu@intel.com \
    --cc=linux-kernel@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