linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/12] IO-less dirty throttling v7
@ 2011-04-16 13:25 Wu Fengguang
  2011-04-16 13:25 ` [PATCH 01/12] writeback: account per-bdi accumulated written pages Wu Fengguang
                   ` (14 more replies)
  0 siblings, 15 replies; 29+ messages in thread
From: Wu Fengguang @ 2011-04-16 13:25 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Jan Kara, Christoph Hellwig, Trond Myklebust, Dave Chinner,
	Theodore Ts'o, Chris Mason, Peter Zijlstra, Mel Gorman,
	Rik van Riel, KOSAKI Motohiro, Greg Thelen, Minchan Kim,
	Vivek Goyal, Andrea Righi, Balbir Singh, Wu Fengguang, linux-mm,
	linux-fsdevel, LKML

Andrew,

This revision undergoes a number of simplifications, cleanups and fixes.
Independent patches are separated out. The core patches (07, 08) now have
easier to understand changelog. Detailed rationals can be found in patch 08.

In response to the complexity complaints, an introduction document is
written explaining the rationals, algorithm and visual case studies:

http://www.kernel.org/pub/linux/kernel/people/wfg/writeback/slides/smooth-dirty-throttling.pdf

The full patchset is accessible in

git://git.kernel.org/pub/scm/linux/kernel/git/wfg/writeback.git dirty-throttling-v7

Questions, reviews and independent tests will be highly appreciated.

supporting functionalities

	[PATCH 01/12] writeback: account per-bdi accumulated written pages
	[PATCH 02/12] writeback: account per-bdi accumulated dirtied pages
	[PATCH 03/12] writeback: bdi write bandwidth estimation
	[PATCH 04/12] writeback: smoothed global/bdi dirty pages
	[PATCH 05/12] writeback: smoothed dirty threshold and limit
	[PATCH 06/12] writeback: enforce 1/4 gap between the dirty/background thresholds

core changes

	[PATCH 07/12] writeback: base throttle bandwidth and position ratio
	[PATCH 08/12] writeback: IO-less balance_dirty_pages()

tracing

	[PATCH 09/12] writeback: show bdi write bandwidth in debugfs
	[PATCH 10/12] writeback: trace dirty_ratelimit
	[PATCH 11/12] writeback: trace balance_dirty_pages
	[PATCH 12/12] writeback: trace global_dirty_state

 fs/fs-writeback.c                |    3 
 include/linux/backing-dev.h      |   23 
 include/linux/sched.h            |    8 
 include/linux/writeback.h        |   49 +
 include/trace/events/writeback.h |  179 +++++
 mm/backing-dev.c                 |   51 +
 mm/memory_hotplug.c              |    3 
 mm/page-writeback.c              |  980 +++++++++++++++++++++++------
 8 files changed, 1085 insertions(+), 211 deletions(-)

Thanks,
Fengguang

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 01/12] writeback: account per-bdi accumulated written pages
  2011-04-16 13:25 [PATCH 00/12] IO-less dirty throttling v7 Wu Fengguang
@ 2011-04-16 13:25 ` Wu Fengguang
  2011-04-16 13:25 ` [PATCH 02/12] writeback: account per-bdi accumulated dirtied pages Wu Fengguang
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 29+ messages in thread
From: Wu Fengguang @ 2011-04-16 13:25 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Jan Kara, Michael Rubin, Wu Fengguang, Christoph Hellwig,
	Trond Myklebust, Dave Chinner, Theodore Ts'o, Chris Mason,
	Peter Zijlstra, Mel Gorman, Rik van Riel, KOSAKI Motohiro,
	Greg Thelen, Minchan Kim, Vivek Goyal, Andrea Righi, Balbir Singh,
	linux-mm, linux-fsdevel, LKML

[-- Attachment #1: writeback-bdi-written.patch --]
[-- Type: text/plain, Size: 2647 bytes --]

From: Jan Kara <jack@suse.cz>

Introduce the BDI_WRITTEN counter. It will be used for estimating the
bdi's write bandwidth.

Peter Zijlstra <a.p.zijlstra@chello.nl>:
Move BDI_WRITTEN accounting into __bdi_writeout_inc().
This will cover and fix fuse, which only calls bdi_writeout_inc().

CC: Michael Rubin <mrubin@google.com>
Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 include/linux/backing-dev.h |    1 +
 mm/backing-dev.c            |    6 ++++--
 mm/page-writeback.c         |    1 +
 3 files changed, 6 insertions(+), 2 deletions(-)

--- linux-next.orig/include/linux/backing-dev.h	2011-04-13 17:18:06.000000000 +0800
+++ linux-next/include/linux/backing-dev.h	2011-04-13 17:18:11.000000000 +0800
@@ -40,6 +40,7 @@ typedef int (congested_fn)(void *, int);
 enum bdi_stat_item {
 	BDI_RECLAIMABLE,
 	BDI_WRITEBACK,
+	BDI_WRITTEN,
 	NR_BDI_STAT_ITEMS
 };
 
--- linux-next.orig/mm/backing-dev.c	2011-04-13 17:18:06.000000000 +0800
+++ linux-next/mm/backing-dev.c	2011-04-13 17:18:11.000000000 +0800
@@ -86,6 +86,7 @@ static int bdi_debug_stats_show(struct s
 		   "BdiDirtyThresh:   %8lu kB\n"
 		   "DirtyThresh:      %8lu kB\n"
 		   "BackgroundThresh: %8lu kB\n"
+		   "BdiWritten:       %8lu kB\n"
 		   "b_dirty:          %8lu\n"
 		   "b_io:             %8lu\n"
 		   "b_more_io:        %8lu\n"
@@ -93,8 +94,9 @@ static int bdi_debug_stats_show(struct s
 		   "state:            %8lx\n",
 		   (unsigned long) K(bdi_stat(bdi, BDI_WRITEBACK)),
 		   (unsigned long) K(bdi_stat(bdi, BDI_RECLAIMABLE)),
-		   K(bdi_thresh), K(dirty_thresh),
-		   K(background_thresh), nr_dirty, nr_io, nr_more_io,
+		   K(bdi_thresh), K(dirty_thresh), K(background_thresh),
+		   (unsigned long) K(bdi_stat(bdi, BDI_WRITTEN)),
+		   nr_dirty, nr_io, nr_more_io,
 		   !list_empty(&bdi->bdi_list), bdi->state);
 #undef K
 
--- linux-next.orig/mm/page-writeback.c	2011-04-13 17:18:11.000000000 +0800
+++ linux-next/mm/page-writeback.c	2011-04-13 17:18:11.000000000 +0800
@@ -219,6 +219,7 @@ int dirty_bytes_handler(struct ctl_table
  */
 static inline void __bdi_writeout_inc(struct backing_dev_info *bdi)
 {
+	__inc_bdi_stat(bdi, BDI_WRITTEN);
 	__prop_inc_percpu_max(&vm_completions, &bdi->completions,
 			      bdi->max_prop_frac);
 }


--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 02/12] writeback: account per-bdi accumulated dirtied pages
  2011-04-16 13:25 [PATCH 00/12] IO-less dirty throttling v7 Wu Fengguang
  2011-04-16 13:25 ` [PATCH 01/12] writeback: account per-bdi accumulated written pages Wu Fengguang
@ 2011-04-16 13:25 ` Wu Fengguang
  2011-04-16 13:25 ` [PATCH 03/12] writeback: bdi write bandwidth estimation Wu Fengguang
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 29+ messages in thread
From: Wu Fengguang @ 2011-04-16 13:25 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Jan Kara, Michael Rubin, Peter Zijlstra, Wu Fengguang,
	Christoph Hellwig, Trond Myklebust, Dave Chinner,
	Theodore Ts'o, Chris Mason, Mel Gorman, Rik van Riel,
	KOSAKI Motohiro, Greg Thelen, Minchan Kim, Vivek Goyal,
	Andrea Righi, Balbir Singh, linux-mm, linux-fsdevel, LKML

[-- Attachment #1: writeback-bdi-dirtied.patch --]
[-- Type: text/plain, Size: 2109 bytes --]

Introduce the BDI_DIRTIED counter. It will be used for estimating the
bdi's dirty bandwidth.

CC: Jan Kara <jack@suse.cz>
CC: Michael Rubin <mrubin@google.com>
CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 include/linux/backing-dev.h |    1 +
 mm/backing-dev.c            |    2 ++
 mm/page-writeback.c         |    1 +
 3 files changed, 4 insertions(+)

--- linux-next.orig/include/linux/backing-dev.h	2011-04-14 09:21:06.000000000 +0800
+++ linux-next/include/linux/backing-dev.h	2011-04-14 21:51:23.000000000 +0800
@@ -40,6 +40,7 @@ typedef int (congested_fn)(void *, int);
 enum bdi_stat_item {
 	BDI_RECLAIMABLE,
 	BDI_WRITEBACK,
+	BDI_DIRTIED,
 	BDI_WRITTEN,
 	NR_BDI_STAT_ITEMS
 };
--- linux-next.orig/mm/page-writeback.c	2011-04-14 09:21:06.000000000 +0800
+++ linux-next/mm/page-writeback.c	2011-04-14 21:51:23.000000000 +0800
@@ -1133,6 +1133,7 @@ void account_page_dirtied(struct page *p
 		__inc_zone_page_state(page, NR_FILE_DIRTY);
 		__inc_zone_page_state(page, NR_DIRTIED);
 		__inc_bdi_stat(mapping->backing_dev_info, BDI_RECLAIMABLE);
+		__inc_bdi_stat(mapping->backing_dev_info, BDI_DIRTIED);
 		task_dirty_inc(current);
 		task_io_account_write(PAGE_CACHE_SIZE);
 	}
--- linux-next.orig/mm/backing-dev.c	2011-04-14 09:21:06.000000000 +0800
+++ linux-next/mm/backing-dev.c	2011-04-14 21:51:23.000000000 +0800
@@ -86,6 +86,7 @@ static int bdi_debug_stats_show(struct s
 		   "BdiDirtyThresh:   %8lu kB\n"
 		   "DirtyThresh:      %8lu kB\n"
 		   "BackgroundThresh: %8lu kB\n"
+		   "BdiDirtied:       %8lu kB\n"
 		   "BdiWritten:       %8lu kB\n"
 		   "b_dirty:          %8lu\n"
 		   "b_io:             %8lu\n"
@@ -95,6 +96,7 @@ static int bdi_debug_stats_show(struct s
 		   (unsigned long) K(bdi_stat(bdi, BDI_WRITEBACK)),
 		   (unsigned long) K(bdi_stat(bdi, BDI_RECLAIMABLE)),
 		   K(bdi_thresh), K(dirty_thresh), K(background_thresh),
+		   (unsigned long) K(bdi_stat(bdi, BDI_DIRTIED)),
 		   (unsigned long) K(bdi_stat(bdi, BDI_WRITTEN)),
 		   nr_dirty, nr_io, nr_more_io,
 		   !list_empty(&bdi->bdi_list), bdi->state);

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 03/12] writeback: bdi write bandwidth estimation
  2011-04-16 13:25 [PATCH 00/12] IO-less dirty throttling v7 Wu Fengguang
  2011-04-16 13:25 ` [PATCH 01/12] writeback: account per-bdi accumulated written pages Wu Fengguang
  2011-04-16 13:25 ` [PATCH 02/12] writeback: account per-bdi accumulated dirtied pages Wu Fengguang
@ 2011-04-16 13:25 ` Wu Fengguang
  2011-04-16 13:25 ` [PATCH 04/12] writeback: smoothed global/bdi dirty pages Wu Fengguang
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 29+ messages in thread
From: Wu Fengguang @ 2011-04-16 13:25 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Jan Kara, Li Shaohua, Peter Zijlstra, Wu Fengguang,
	Christoph Hellwig, Trond Myklebust, Dave Chinner,
	Theodore Ts'o, Chris Mason, Mel Gorman, Rik van Riel,
	KOSAKI Motohiro, Greg Thelen, Minchan Kim, Vivek Goyal,
	Andrea Righi, Balbir Singh, linux-mm, linux-fsdevel, LKML

[-- Attachment #1: writeback-write-bandwidth.patch --]
[-- Type: text/plain, Size: 8487 bytes --]

The estimation value will start from 100MB/s and adapt to the real
bandwidth in seconds.  It's pretty accurate for common filesystems.

The overheads won't be high because the bdi bandwidth update only occurs
in >200ms intervals.

Initially it's only estimated in balance_dirty_pages() because this is
the most reliable place to get reasonable large bandwidth -- the bdi is
normally fully utilized when bdi_thresh is reached.

Then Shaohua recommends to also do it in the flusher thread, to keep the
value updated when there are only periodic/background writeback and no
tasks throttled.

The original plan is to use per-cpu vars for bdi->write_bandwidth.
However Peter suggested that it opens the window that some CPU see
outdated values. So switch to use spinlock protected global vars.
A global spinlock is used with intention to update global states in
subsequent patches as well.

It tries to update the bandwidth only when disk is fully utilized.
Any inactive period of more than one second will be skipped.

The estimation is not done purely in the flusher thread because slow
devices may take dozens of seconds to write the initial 48MB chunk
(write_bandwidth starts with 100MB/s, this translates to about 48MB
nr_to_write). So it may take more than 1 minute to adapt to the smallish
bandwidth if the bandwidth is only updated in the flusher thread.
Another consideration is, if ever the device breaks down, the flusher
will be stucked and not able to decrease the bandwidth.

bdi->avg_write_bandwidth tries to track bdi->write_bandwidth smoothly
and less accurately. The smoothing is most effective for XFS, however at
the cost of being a bit biased towards low.  We'll limit the write chunk
size to (write bandwidth / 2) and hence let XFS do at least 2 IO
completions per second. As the bdi->write_bandwidth estimation period is
3 seconds, we are reasonably sure that the fluctuation range and max
possible bias is under control.  bdi->avg_write_bandwidth will be used
to estimate the base bandwidth, which does not aim to be accurate, too.
And if there are errors, we do prefer base bandwith to be biased towards
low, rather than high and risk exceeding the dirty limit.

CC: Li Shaohua <shaohua.li@intel.com>
CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 fs/fs-writeback.c           |    3 +
 include/linux/backing-dev.h |    5 ++
 include/linux/writeback.h   |   11 ++++
 mm/backing-dev.c            |   12 +++++
 mm/page-writeback.c         |   79 ++++++++++++++++++++++++++++++++++
 5 files changed, 110 insertions(+)

--- linux-next.orig/fs/fs-writeback.c	2011-04-14 21:51:23.000000000 +0800
+++ linux-next/fs/fs-writeback.c	2011-04-15 09:38:08.000000000 +0800
@@ -689,6 +689,7 @@ static long wb_writeback(struct bdi_writ
 		write_chunk = LONG_MAX;
 
 	wbc.wb_start = jiffies; /* livelock avoidance */
+	bdi_update_write_bandwidth(wb->bdi, wbc.wb_start);
 	for (;;) {
 		/*
 		 * Stop writeback when nr_pages has been consumed
@@ -724,6 +725,8 @@ static long wb_writeback(struct bdi_writ
 			writeback_inodes_wb(wb, &wbc);
 		trace_wbc_writeback_written(&wbc, wb->bdi);
 
+		bdi_update_write_bandwidth(wb->bdi, wbc.wb_start);
+
 		work->nr_pages -= write_chunk - wbc.nr_to_write;
 		wrote += write_chunk - wbc.nr_to_write;
 
--- linux-next.orig/include/linux/backing-dev.h	2011-04-14 21:51:23.000000000 +0800
+++ linux-next/include/linux/backing-dev.h	2011-04-15 09:38:22.000000000 +0800
@@ -73,6 +73,11 @@ struct backing_dev_info {
 
 	struct percpu_counter bdi_stat[NR_BDI_STAT_ITEMS];
 
+	unsigned long bw_time_stamp;
+	unsigned long written_stamp;
+	unsigned long write_bandwidth;
+	unsigned long avg_write_bandwidth;
+
 	struct prop_local_percpu completions;
 	int dirty_exceeded;
 
--- linux-next.orig/include/linux/writeback.h	2011-04-14 21:51:23.000000000 +0800
+++ linux-next/include/linux/writeback.h	2011-04-15 09:38:22.000000000 +0800
@@ -128,6 +128,17 @@ void global_dirty_limits(unsigned long *
 unsigned long bdi_dirty_limit(struct backing_dev_info *bdi,
 			       unsigned long dirty);
 
+void bdi_update_bandwidth(struct backing_dev_info *bdi,
+			  unsigned long thresh,
+			  unsigned long dirty,
+			  unsigned long bdi_dirty,
+			  unsigned long start_time);
+static inline void bdi_update_write_bandwidth(struct backing_dev_info *bdi,
+					      unsigned long start_time)
+{
+	bdi_update_bandwidth(bdi, 0, 0, 0, start_time);
+}
+
 void page_writeback_init(void);
 void balance_dirty_pages_ratelimited_nr(struct address_space *mapping,
 					unsigned long nr_pages_dirtied);
--- linux-next.orig/mm/backing-dev.c	2011-04-14 21:51:23.000000000 +0800
+++ linux-next/mm/backing-dev.c	2011-04-15 09:38:22.000000000 +0800
@@ -635,6 +635,11 @@ static void bdi_wb_init(struct bdi_write
 	setup_timer(&wb->wakeup_timer, wakeup_timer_fn, (unsigned long)bdi);
 }
 
+/*
+ * initial write bandwidth: 100 MB/s
+ */
+#define INIT_BW		(100 << (20 - PAGE_SHIFT))
+
 int bdi_init(struct backing_dev_info *bdi)
 {
 	int i, err;
@@ -657,6 +662,13 @@ int bdi_init(struct backing_dev_info *bd
 	}
 
 	bdi->dirty_exceeded = 0;
+
+	bdi->bw_time_stamp = jiffies;
+	bdi->written_stamp = 0;
+
+	bdi->write_bandwidth = INIT_BW;
+	bdi->avg_write_bandwidth = INIT_BW;
+
 	err = prop_local_init_percpu(&bdi->completions);
 
 	if (err) {
--- linux-next.orig/mm/page-writeback.c	2011-04-14 21:51:23.000000000 +0800
+++ linux-next/mm/page-writeback.c	2011-04-15 09:38:30.000000000 +0800
@@ -471,6 +471,79 @@ unsigned long bdi_dirty_limit(struct bac
 	return bdi_dirty;
 }
 
+static void __bdi_update_write_bandwidth(struct backing_dev_info *bdi,
+					 unsigned long elapsed,
+					 unsigned long written)
+{
+	const unsigned long period = roundup_pow_of_two(3 * HZ);
+	unsigned long avg = bdi->avg_write_bandwidth;
+	unsigned long old = bdi->write_bandwidth;
+	unsigned long cur;
+	u64 bw;
+
+	bw = written - bdi->written_stamp;
+	bw *= HZ;
+	if (unlikely(elapsed > period / 2)) {
+		do_div(bw, elapsed);
+		elapsed = period / 2;
+		bw *= elapsed;
+	}
+	bw += (u64)bdi->write_bandwidth * (period - elapsed);
+	cur = bw >> ilog2(period);
+	bdi->write_bandwidth = cur;
+
+	/*
+	 * one more level of smoothing
+	 */
+	if (avg > old && old > cur)
+		avg -= (avg - old) >> 3;
+
+	if (avg < old && old < cur)
+		avg += (old - avg) >> 3;
+
+	bdi->avg_write_bandwidth = avg;
+}
+
+void bdi_update_bandwidth(struct backing_dev_info *bdi,
+			  unsigned long thresh,
+			  unsigned long dirty,
+			  unsigned long bdi_dirty,
+			  unsigned long start_time)
+{
+	static DEFINE_SPINLOCK(dirty_lock);
+	unsigned long now = jiffies;
+	unsigned long elapsed;
+	unsigned long written;
+
+	if (!spin_trylock(&dirty_lock))
+		return;
+
+	elapsed = now - bdi->bw_time_stamp;
+	written = percpu_counter_read(&bdi->bdi_stat[BDI_WRITTEN]);
+
+	/* skip quiet periods when disk bandwidth is under-utilized */
+	if (elapsed > HZ &&
+	    elapsed > now - start_time)
+		goto snapshot;
+
+	/*
+	 * rate-limit, only update once every 200ms. Demand higher threshold
+	 * on the flusher so that the throttled task(s) can do most updates.
+	 */
+	if (!thresh && elapsed <= HZ / 3)
+		goto unlock;
+	if (elapsed <= HZ / 5)
+		goto unlock;
+
+	__bdi_update_write_bandwidth(bdi, elapsed, written);
+
+snapshot:
+	bdi->written_stamp = written;
+	bdi->bw_time_stamp = now;
+unlock:
+	spin_unlock(&dirty_lock);
+}
+
 /*
  * balance_dirty_pages() must be called by processes which are generating dirty
  * data.  It looks at the number of dirty pages in the machine and will force
@@ -490,6 +563,7 @@ static void balance_dirty_pages(struct a
 	unsigned long pause = 1;
 	bool dirty_exceeded = false;
 	struct backing_dev_info *bdi = mapping->backing_dev_info;
+	unsigned long start_time = jiffies;
 
 	if (!bdi_cap_account_dirty(bdi))
 		return;
@@ -538,6 +612,11 @@ static void balance_dirty_pages(struct a
 			bdi_nr_writeback = bdi_stat(bdi, BDI_WRITEBACK);
 		}
 
+		bdi_update_bandwidth(bdi, dirty_thresh,
+				     nr_reclaimable + nr_writeback,
+				     bdi_nr_reclaimable + bdi_nr_writeback,
+				     start_time);
+
 		/*
 		 * The bdi thresh is somehow "soft" limit derived from the
 		 * global "hard" limit. The former helps to prevent heavy IO


--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 04/12] writeback: smoothed global/bdi dirty pages
  2011-04-16 13:25 [PATCH 00/12] IO-less dirty throttling v7 Wu Fengguang
                   ` (2 preceding siblings ...)
  2011-04-16 13:25 ` [PATCH 03/12] writeback: bdi write bandwidth estimation Wu Fengguang
@ 2011-04-16 13:25 ` Wu Fengguang
  2011-04-16 13:25 ` [PATCH 05/12] writeback: smoothed dirty threshold and limit Wu Fengguang
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 29+ messages in thread
From: Wu Fengguang @ 2011-04-16 13:25 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Jan Kara, larry, Wu Fengguang, Christoph Hellwig, Trond Myklebust,
	Dave Chinner, Theodore Ts'o, Chris Mason, Peter Zijlstra,
	Mel Gorman, Rik van Riel, KOSAKI Motohiro, Greg Thelen,
	Minchan Kim, Vivek Goyal, Andrea Righi, Balbir Singh, linux-mm,
	linux-fsdevel, LKML

[-- Attachment #1: writeback-smooth-dirty.patch --]
[-- Type: text/plain, Size: 4340 bytes --]

Maintain a smoothed version of dirty pages for use in the throttle
bandwidth calculations.

default_backing_dev_info.avg_dirty holds the smoothed global dirty
pages.

The calculation favors smoothness rather than accuracy. It's non-sense
trying to track a much fluctuated value "accurately". And its users
don't really rely on it being accurate.

CC: larry <lantianyu1986@gmail.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 include/linux/backing-dev.h |    2 +
 mm/backing-dev.c            |    3 +
 mm/page-writeback.c         |   66 ++++++++++++++++++++++++++++++++++
 3 files changed, 71 insertions(+)

--- linux-next.orig/mm/page-writeback.c	2011-04-13 17:18:12.000000000 +0800
+++ linux-next/mm/page-writeback.c	2011-04-13 17:18:12.000000000 +0800
@@ -471,6 +471,64 @@ unsigned long bdi_dirty_limit(struct bac
 	return bdi_dirty;
 }
 
+static void bdi_update_dirty_smooth(struct backing_dev_info *bdi,
+				    unsigned long dirty)
+{
+	unsigned long avg = bdi->avg_dirty;
+	unsigned long old = bdi->old_dirty;
+
+	if (unlikely(!avg)) {
+		avg = dirty;
+		goto update;
+	}
+
+	/*
+	 * dirty pages are departing upwards, follow up
+	 */
+	if (avg < old && old <= dirty) {
+		avg += (old - avg) >> 2;
+		goto update;
+	}
+
+	/*
+	 * dirty pages are departing downwards, follow down
+	 */
+	if (avg > old && old >= dirty) {
+		avg -= (avg - old) >> 2;
+		goto update;
+	}
+
+	/*
+	 * This can filter out one half unnecessary updates when bdi_dirty is
+	 * fluctuating around the balance point, and is most effective on XFS,
+	 * whose pattern is
+	 *                                                             .
+	 *	[.] dirty	[-] avg                       .       .
+	 *                                                   .       .
+	 *              .         .         .         .     .       .
+	 *      ---------------------------------------    .       .
+	 *            .         .         .         .     .       .
+	 *           .         .         .         .     .       .
+	 *          .         .         .         .     .       .
+	 *         .         .         .         .     .       .
+	 *        .         .         .         .
+	 *       .         .         .         .      (fluctuated)
+	 *      .         .         .         .
+	 *     .         .         .         .
+	 *
+	 * @avg will remain flat at the cost of being biased towards high. In
+	 * practice the error tend to be much smaller: thanks to more coarse
+	 * grained fluctuations, @avg becomes the real average number for the
+	 * last two rising lines of @dirty.
+	 */
+	goto out;
+
+update:
+	bdi->avg_dirty = avg;
+out:
+	bdi->old_dirty = dirty;
+}
+
 static void __bdi_update_write_bandwidth(struct backing_dev_info *bdi,
 					 unsigned long elapsed,
 					 unsigned long written)
@@ -535,6 +593,14 @@ void bdi_update_bandwidth(struct backing
 	if (elapsed <= HZ / 5)
 		goto unlock;
 
+	if (thresh &&
+	    now - default_backing_dev_info.bw_time_stamp >= HZ / 5) {
+		bdi_update_dirty_smooth(&default_backing_dev_info, dirty);
+		default_backing_dev_info.bw_time_stamp = now;
+	}
+	if (thresh) {
+		bdi_update_dirty_smooth(bdi, bdi_dirty);
+	}
 	__bdi_update_write_bandwidth(bdi, elapsed, written);
 
 snapshot:
--- linux-next.orig/include/linux/backing-dev.h	2011-04-13 17:18:12.000000000 +0800
+++ linux-next/include/linux/backing-dev.h	2011-04-13 17:18:12.000000000 +0800
@@ -77,6 +77,8 @@ struct backing_dev_info {
 	unsigned long written_stamp;
 	unsigned long write_bandwidth;
 	unsigned long avg_write_bandwidth;
+	unsigned long avg_dirty;
+	unsigned long old_dirty;
 
 	struct prop_local_percpu completions;
 	int dirty_exceeded;
--- linux-next.orig/mm/backing-dev.c	2011-04-13 17:18:12.000000000 +0800
+++ linux-next/mm/backing-dev.c	2011-04-13 17:18:12.000000000 +0800
@@ -669,6 +669,9 @@ int bdi_init(struct backing_dev_info *bd
 	bdi->write_bandwidth = INIT_BW;
 	bdi->avg_write_bandwidth = INIT_BW;
 
+	bdi->avg_dirty = 0;
+	bdi->old_dirty = 0;
+
 	err = prop_local_init_percpu(&bdi->completions);
 
 	if (err) {


--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 05/12] writeback: smoothed dirty threshold and limit
  2011-04-16 13:25 [PATCH 00/12] IO-less dirty throttling v7 Wu Fengguang
                   ` (3 preceding siblings ...)
  2011-04-16 13:25 ` [PATCH 04/12] writeback: smoothed global/bdi dirty pages Wu Fengguang
@ 2011-04-16 13:25 ` Wu Fengguang
  2011-04-16 13:25 ` [PATCH 06/12] writeback: enforce 1/4 gap between the dirty/background thresholds Wu Fengguang
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 29+ messages in thread
From: Wu Fengguang @ 2011-04-16 13:25 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Jan Kara, Wu Fengguang, Christoph Hellwig, Trond Myklebust,
	Dave Chinner, Theodore Ts'o, Chris Mason, Peter Zijlstra,
	Mel Gorman, Rik van Riel, KOSAKI Motohiro, Greg Thelen,
	Minchan Kim, Vivek Goyal, Andrea Righi, Balbir Singh, linux-mm,
	linux-fsdevel, LKML

[-- Attachment #1: writeback-dirty-thresh-limit.patch --]
[-- Type: text/plain, Size: 5671 bytes --]

Both the global/bdi dirty thresholds may fluctuate undesirably.

- the start of a heavy weight application (ie. KVM) may instantly knock
  down determine_dirtyable_memory() and hence the global/bdi dirty thresholds.

- in JBOD setup, the bdi dirty thresholds are observed to fluctuate more

So maintain a version of smoothed bdi dirty threshold in
bdi->dirty_threshold and introduce the global dirty limit in
default_backing_dev_info.dirty_threshold.

The global limit can effectively mask out the impact of sudden drop of
dirtyable memory.  Without it, the dirtier tasks may be blocked in the
block area for 10s after someone eats 500MB memory; with the limit, the
dirtier tasks will be throttled at eg. 1/8 => 1/4 => 1/2 => original
dirty bandwith by the main control line and bring down the dirty pages
at reasonable speeds.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 include/linux/backing-dev.h |    2 +
 include/linux/writeback.h   |   38 ++++++++++++++++++++++++++++
 mm/backing-dev.c            |    1 
 mm/page-writeback.c         |   45 ++++++++++++++++++++++++++++++++++
 4 files changed, 86 insertions(+)

--- linux-next.orig/include/linux/writeback.h	2011-04-16 17:53:50.000000000 +0800
+++ linux-next/include/linux/writeback.h	2011-04-16 17:54:02.000000000 +0800
@@ -12,6 +12,44 @@ struct backing_dev_info;
 extern spinlock_t inode_wb_list_lock;
 
 /*
+ * 4MB minimal write chunk size
+ */
+#define MIN_WRITEBACK_PAGES	(4096UL >> (PAGE_CACHE_SHIFT - 10))
+
+/*
+ * The 1/4 region under the global dirty thresh is for smooth dirty throttling:
+ *
+ *		(thresh - thresh/DIRTY_FULL_SCOPE, thresh)
+ *
+ * The 1/8 region under the global dirty limit will be more rigidly throttled:
+ *
+ *		(limit - limit/DIRTY_BRAKE, limit)
+ *
+ * The 1/16 region above the global dirty limit will be put to maximum pauses:
+ *
+ *		(limit, limit + limit/DIRTY_MAXPAUSE)
+ *
+ * The 1/16 region above the max-pause region, dirty exceeded bdi's will be put
+ * to loops:
+ *
+ *		(limit + limit/DIRTY_MAXPAUSE, limit + limit/DIRTY_PASSGOOD)
+ *
+ * Further beyond, all dirtier tasks will enter a loop waiting (possibly long
+ * time) for the dirty pages to drop.
+ *
+ * The global dirty threshold is normally at the low bound of the brake region,
+ * except when the system suddenly allocates a lot of anonymous memory and
+ * knocks down the global dirty threshold quickly, in which case the global
+ * dirty limit will follow down slowly to prevent livelocking all dirtier tasks.
+ */
+#define DIRTY_RAMPUP		32
+#define DIRTY_SCOPE		8
+#define DIRTY_FULL_SCOPE	(DIRTY_SCOPE / 2)
+#define DIRTY_BRAKE		8
+#define DIRTY_MAXPAUSE		16
+#define DIRTY_PASSGOOD		8
+
+/*
  * fs/fs-writeback.c
  */
 enum writeback_sync_modes {
--- linux-next.orig/mm/page-writeback.c	2011-04-16 17:54:01.000000000 +0800
+++ linux-next/mm/page-writeback.c	2011-04-16 17:54:02.000000000 +0800
@@ -562,6 +562,49 @@ static void __bdi_update_write_bandwidth
 	bdi->avg_write_bandwidth = avg;
 }
 
+static void update_dirty_limit(unsigned long thresh,
+			       unsigned long dirty)
+{
+	unsigned long limit = default_backing_dev_info.dirty_threshold;
+	unsigned long min = dirty + limit / DIRTY_BRAKE;
+
+	thresh += thresh / DIRTY_BRAKE;
+
+	if (limit < thresh) {
+		limit = thresh;
+		goto update;
+	}
+
+	/* take care not to follow into the brake area */
+	if (limit > thresh &&
+	    limit > min) {
+		limit -= (limit - max(thresh, min)) >> 5;
+		goto update;
+	}
+	return;
+update:
+	default_backing_dev_info.dirty_threshold = limit;
+}
+
+static void bdi_update_dirty_threshold(struct backing_dev_info *bdi,
+				       unsigned long thresh,
+				       unsigned long dirty)
+{
+	unsigned long old = bdi->old_dirty_threshold;
+	unsigned long avg = bdi->dirty_threshold;
+
+	thresh = bdi_dirty_limit(bdi, thresh);
+
+	if (avg > old && old >= thresh)
+		avg -= (avg - old) >> 3;
+
+	if (avg < old && old <= thresh)
+		avg += (old - avg) >> 3;
+
+	bdi->dirty_threshold = avg;
+	bdi->old_dirty_threshold = thresh;
+}
+
 void bdi_update_bandwidth(struct backing_dev_info *bdi,
 			  unsigned long thresh,
 			  unsigned long dirty,
@@ -595,10 +638,12 @@ void bdi_update_bandwidth(struct backing
 
 	if (thresh &&
 	    now - default_backing_dev_info.bw_time_stamp >= HZ / 5) {
+		update_dirty_limit(thresh, dirty);
 		bdi_update_dirty_smooth(&default_backing_dev_info, dirty);
 		default_backing_dev_info.bw_time_stamp = now;
 	}
 	if (thresh) {
+		bdi_update_dirty_threshold(bdi, thresh, dirty);
 		bdi_update_dirty_smooth(bdi, bdi_dirty);
 	}
 	__bdi_update_write_bandwidth(bdi, elapsed, written);
--- linux-next.orig/include/linux/backing-dev.h	2011-04-16 17:54:01.000000000 +0800
+++ linux-next/include/linux/backing-dev.h	2011-04-16 17:54:02.000000000 +0800
@@ -79,6 +79,8 @@ struct backing_dev_info {
 	unsigned long avg_write_bandwidth;
 	unsigned long avg_dirty;
 	unsigned long old_dirty;
+	unsigned long dirty_threshold;
+	unsigned long old_dirty_threshold;
 
 	struct prop_local_percpu completions;
 	int dirty_exceeded;
--- linux-next.orig/mm/backing-dev.c	2011-04-16 17:54:01.000000000 +0800
+++ linux-next/mm/backing-dev.c	2011-04-16 17:54:02.000000000 +0800
@@ -671,6 +671,7 @@ int bdi_init(struct backing_dev_info *bd
 
 	bdi->avg_dirty = 0;
 	bdi->old_dirty = 0;
+	bdi->dirty_threshold = MIN_WRITEBACK_PAGES;
 
 	err = prop_local_init_percpu(&bdi->completions);
 


--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 06/12] writeback: enforce 1/4 gap between the dirty/background thresholds
  2011-04-16 13:25 [PATCH 00/12] IO-less dirty throttling v7 Wu Fengguang
                   ` (4 preceding siblings ...)
  2011-04-16 13:25 ` [PATCH 05/12] writeback: smoothed dirty threshold and limit Wu Fengguang
@ 2011-04-16 13:25 ` Wu Fengguang
  2011-04-16 13:25 ` [PATCH 07/12] writeback: base throttle bandwidth and position ratio Wu Fengguang
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 29+ messages in thread
From: Wu Fengguang @ 2011-04-16 13:25 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Jan Kara, Peter Zijlstra, Wu Fengguang, Christoph Hellwig,
	Trond Myklebust, Dave Chinner, Theodore Ts'o, Chris Mason,
	Mel Gorman, Rik van Riel, KOSAKI Motohiro, Greg Thelen,
	Minchan Kim, Vivek Goyal, Andrea Righi, Balbir Singh, linux-mm,
	linux-fsdevel, LKML

[-- Attachment #1: writeback-fix-oversize-background-thresh.patch --]
[-- Type: text/plain, Size: 1700 bytes --]

The change is virtually a no-op for the majority users that use the
default 10/20 background/dirty ratios. For others don't know why they
are setting background ratio close enough to dirty ratio. Someone must
set background ratio equal to dirty ratio, but no one seems to notice or
complain that it's then silently halved under the hood..

The other solution is to return -EIO when setting a too large background
threshold or a too small dirty threshold. However that could possibly
break some disordered usage scenario, eg.

	echo 10 > /proc/sys/vm/dirty_ratio
	echo  5 > /proc/sys/vm/dirty_background_ratio

The first echo will fail because the background ratio is still 10.
Such order dependent behavior seems disgusting for end users.

CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 mm/page-writeback.c |   10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

--- linux-next.orig/mm/page-writeback.c	2011-04-13 17:18:13.000000000 +0800
+++ linux-next/mm/page-writeback.c	2011-04-13 17:18:13.000000000 +0800
@@ -422,8 +422,14 @@ void global_dirty_limits(unsigned long *
 	else
 		background = (dirty_background_ratio * available_memory) / 100;
 
-	if (background >= dirty)
-		background = dirty / 2;
+	/*
+	 * Ensure at least 1/4 gap between background and dirty thresholds, so
+	 * that when dirty throttling starts at (background + dirty)/2, it's
+	 * below or at the entrance of the soft dirty throttle scope.
+	 */
+	if (background > dirty - dirty / DIRTY_FULL_SCOPE)
+		background = dirty - dirty / DIRTY_FULL_SCOPE;
+
 	tsk = current;
 	if (tsk->flags & PF_LESS_THROTTLE || rt_task(tsk)) {
 		background += background / 4;



^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 07/12] writeback: base throttle bandwidth and position ratio
  2011-04-16 13:25 [PATCH 00/12] IO-less dirty throttling v7 Wu Fengguang
                   ` (5 preceding siblings ...)
  2011-04-16 13:25 ` [PATCH 06/12] writeback: enforce 1/4 gap between the dirty/background thresholds Wu Fengguang
@ 2011-04-16 13:25 ` Wu Fengguang
  2011-04-16 13:25 ` [PATCH 08/12] writeback: IO-less balance_dirty_pages() Wu Fengguang
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 29+ messages in thread
From: Wu Fengguang @ 2011-04-16 13:25 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Jan Kara, Wu Fengguang, Christoph Hellwig, Trond Myklebust,
	Dave Chinner, Theodore Ts'o, Chris Mason, Peter Zijlstra,
	Mel Gorman, Rik van Riel, KOSAKI Motohiro, Greg Thelen,
	Minchan Kim, Vivek Goyal, Andrea Righi, Balbir Singh, linux-mm,
	linux-fsdevel, LKML

[-- Attachment #1: writeback-control-algorithms.patch --]
[-- Type: text/plain, Size: 24150 bytes --]

balance_dirty_pages() has been using a very simple and robust threshold
based throttle scheme. It implicitly limits the dirty rate down, however
in a rather bumpy way that constantly block one dirtier task for hundreds
of milliseconds on a local ext4, and multiple dirtier tasks for seconds.

The new scheme is to expand the ON/OFF threshold to a larger scope in
which both the number of dirty pages and the dirty rate are explicitly
controlled.

PSEUDO CODE
===========

on write() syscall, calculate pause time
----------------------------------------

    balance_dirty_pages(pages_dirtied)
    {
        task_ratelimit = bdi->dirty_ratelimit * bdi_position_ratio();
        pause = pages_dirtied / task_ratelimit;
        sleep(pause);
    }

on every 200ms, update base throttle bandwidth
----------------------------------------------

    bdi_update_dirty_ratelimit()
    {
        bw = bdi->dirty_ratelimit;
        ref_bw = bw * bdi_position_ratio() * write_bw / dirty_bw;
        if (dirty pages unbalanced)
             bdi->dirty_ratelimit = (bw * 3 + ref_bw) / 4;
    }

position control ratio
----------------------

    bdi_position_ratio()
    {
        pos_ratio = 1.0

        // gentle negative feedback control
        pos_ratio -= (nr_dirty - goal) / SCALE;
        pos_ratio -= (bdi_dirty - bdi_goal) / BDI_SCALE;

        // sharp boundary control
        if (near global limit)  scale down   pos_ratio
        if (bdi queue runs low) scale up     pos_ratio

        return pos_ratio;
    }

BALANCED POSITION AND RATE
==========================

position feedback control
-------------------------

  At the center of the control scope is the setpoint/goal. When the
  number of dirty pages go higher/lower than the goal, its dirty rate
  will be proportionally decreased/increased to prevent it from drifting
  away.

  When the dirty pages drops low to the bottom of the control scope, or
  rushes high to the upper limit, the dirty rate will quickly be scaled
  up/down, to the point of completely let go of or completely block the
  dirtier task.

rate estimation
---------------

  What's the balanced dirty rate if the dirty pages are exactly at the
  goal? When doing N dd's on 1 disk at rate task_bw MB/s, then task_bw
  should be balanced at write_bw/N where write_bw is the disk's write
  bandwidth. We call base_bw==write_bw/N the disk's base throttle
  bandwidth (ie. bdi->dirty_ratelimit in the code).  Each task will be
  allowed to dirty at rate task_bw=base_bw*pos_ratio where pos_ratio is
  the result of position control, it will be 1 if the dirty pages are
  exactly at the goal.

  In practice we don't know base_bw beforehand. Because we don't know
  the exact number of N and cannot assume all tasks are equal weighted.
  So a reference bandwidth ref_bw is estimated as the target for base_bw
  to track.  base_bw will be adjusted step by step towards ref_bw. In
  each step, ref_bw is calculated as

	  base_bw * pos_ratio * write_bw / dirty_bw

  That is, when the (unknown number of) tasks are rate limited based
  on previous (base_bw*pos_ratio), if the overall dirty rate dirty_bw is
  M times write_bw, then the base_bw shall be scaled 1/M to balance
  dirty_bw and write_bw.

  The ref_bw estimation will be pretty accurate if without
  (1) noises
  (2) feedback delays between steps
  (3) the mismatch between the number of dirty and writeback events
      caused by user space truncate and file system redirty

  (1) can be smoothed out; (2) will decrease proportionally with the
  adjust size when base_bw gets close to ref_bw.

  (3) can be ultimately fixed by accounting the truncate/redirty events.
  But for now we can rely on the robustness of base_bw update algorithms
  to deal with the mismatches: no obvious imbalance is observed in ext4
  workloads which have bursts of redirty and large dirtied:written=3:2
  ratio. In theory when the truncate/redirty makes (write_bw < dirty_bw)
  in long term, ref_bw and base_bw will go low, driving up the pos_ratio
  which then corrects (pos_ratio * write_bw / dirty_bw) back to 1, thus
  balance ref_bw at some point. What's more, bdi_update_dirty_ratelimit()
  dictates that base_bw will only be updated when ref_bw and
  pos_bw=base_bw*pos_ratio are both higher (or lower) than base_bw. So
  the higher pos_bw will effectively stop base_bw from approaching the
  lower ref_bw.

In general, it's pretty safe and robust.

- the upper/lower bounds in the position control provides ultimate
  safeguard: in case the algorithms fly away, the dirty pages
  will be guarded by the control bounds with larger fluctuates in dirty
  rate -- but still much better than the current threshold based approach.

- the base bandwidth update rules are accurate and robust enough for
  base_bw to quickly adapt to new workload and remain stable thereafter
  This is confirmed by a wide range of tests: base_bw only goes a bit
  less stable when the control scope is smaller than the write bandwidth,
  in which case the pos_ratio is already fluctuating much more.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 include/linux/backing-dev.h |   11 
 mm/backing-dev.c            |    1 
 mm/page-writeback.c         |  411 ++++++++++++++++++++++++++++++++++
 3 files changed, 423 insertions(+)

--- linux-next.orig/include/linux/backing-dev.h	2011-04-16 17:54:02.000000000 +0800
+++ linux-next/include/linux/backing-dev.h	2011-04-16 17:54:09.000000000 +0800
@@ -74,9 +74,15 @@ struct backing_dev_info {
 	struct percpu_counter bdi_stat[NR_BDI_STAT_ITEMS];
 
 	unsigned long bw_time_stamp;
+	unsigned long dirtied_stamp;
 	unsigned long written_stamp;
 	unsigned long write_bandwidth;
 	unsigned long avg_write_bandwidth;
+	/* the base bandwidth, the task's dirty rate will be curbed under it */
+	unsigned long dirty_ratelimit;
+	/* the estimated balance point, base bw will follow it step by step */
+	unsigned long reference_ratelimit;
+	unsigned long old_ref_ratelimit;
 	unsigned long avg_dirty;
 	unsigned long old_dirty;
 	unsigned long dirty_threshold;
@@ -85,6 +91,11 @@ struct backing_dev_info {
 	struct prop_local_percpu completions;
 	int dirty_exceeded;
 
+	/* last time exceeded (limit - limit/DIRTY_BRAKE) */
+	unsigned long dirty_exceed_time;
+	/* last time dropped to the rampup area or even the unthrottled area */
+	unsigned long dirty_free_run;
+
 	unsigned int min_ratio;
 	unsigned int max_ratio, max_prop_frac;
 
--- linux-next.orig/mm/page-writeback.c	2011-04-16 17:54:08.000000000 +0800
+++ linux-next/mm/page-writeback.c	2011-04-16 17:54:09.000000000 +0800
@@ -36,6 +36,8 @@
 #include <linux/pagevec.h>
 #include <trace/events/writeback.h>
 
+#define RATIO_SHIFT	10
+
 /*
  * After a CPU has dirtied this many pages, balance_dirty_pages_ratelimited
  * will look to see if it needs to force writeback or throttling.
@@ -393,6 +395,12 @@ unsigned long determine_dirtyable_memory
 	return x + 1;	/* Ensure that we never return 0 */
 }
 
+static unsigned long hard_dirty_limit(unsigned long thresh)
+{
+	return max(thresh + thresh / DIRTY_BRAKE,
+		   default_backing_dev_info.dirty_threshold);
+}
+
 /*
  * global_dirty_limits - background-writeback and dirty-throttling thresholds
  *
@@ -477,6 +485,232 @@ unsigned long bdi_dirty_limit(struct bac
 	return bdi_dirty;
 }
 
+/*
+ * last time exceeded (limit - limit/DIRTY_BRAKE)
+ */
+static bool dirty_exceeded_recently(struct backing_dev_info *bdi,
+				    unsigned long time_window)
+{
+	return jiffies - bdi->dirty_exceed_time <= time_window;
+}
+
+/*
+ * last time dropped below (thresh - 2*thresh/DIRTY_SCOPE + thresh/DIRTY_RAMPUP)
+ */
+static bool dirty_free_run_recently(struct backing_dev_info *bdi,
+				    unsigned long time_window)
+{
+	return jiffies - bdi->dirty_free_run <= time_window;
+}
+
+/*
+ * Position based bandwidth control.
+ *
+ * (1) boundary guarding areas
+ *
+ * The loop area is required to stop large number of slow dirtiers, because
+ * the max-pause area is only able to throttle a task at 1page/200ms=20KB/s.
+ *
+ * The pass-good region can stop a slow UKEY with 100+ slow dirtiers, while
+ * still avoid looping for the other good disk, so that their performance won't
+ * be impacted.
+ *
+ * The max-pause area can safeguard unknown bugs in the control algorithms
+ * as well as the possible surges in small memory boxes.
+ *
+ * The brake area is a good leeway for holding off the dirty pages in sudden
+ * workload change, or when some bdi dirty goal is excessively exceeded.
+ *
+ * The loop, pass-good and max-pause areas are enforced inside the loop of
+ * balance_dirty_pages(). Others can be found in bdi_position_ratio().
+ *
+ *      loop area,  loop until drop below the area  ----------------------|<===
+ * pass-good area,  dirty exceeded bdi's will loop  -----------------|<==>|
+ * max-pause area,  sleep(max_pause) and return     ------------|<==>|
+ *     brake area,  bw scaled from 1 down to 0      ---|<======>|
+ * ----------------------------------------------------o--------*----o----o----
+ *                                                     ^        ^    ^    ^
+ *                    limit - limit/DIRTY_BRAKE     ---'        |    |    |
+ *                    limit                         ------------'    |    |
+ *                    limit + limit/DIRTY_MAXPAUSE  -----------------'    |
+ *                    limit + limit/DIRTY_PASSGOOD  ----------------------'
+ *
+ * (2) global control areas
+ *
+ * The rampup area is for ramping up the base bandwidth whereas the above brake
+ * area is for scaling down the base bandwidth.
+ *
+ * The global thresh typically lies at the bottom of the brake area. @thresh
+ * is real-time computed from global_dirty_limits() and @limit is tracking
+ * (thresh + thresh/DIRTY_BRAKE) at 200ms intervals in update_dirty_limit().
+ *
+ *rampup area                 setpoint/goal
+ *|<=======>|                      v
+ * |-------------------------------*-------------------------------|------------
+ * ^                               ^                               ^
+ * thresh - 2*thresh/DIRTY_SCOPE   thresh - thresh/DIRTY_SCOPE     thresh
+ *
+ * (3) bdi control areas
+ *
+ * The bdi reserve area tries to keep a reasonable number of dirty pages for
+ * preventing block queue underrun.
+ *
+ * reserve area, scale up bw as dirty pages drop low  bdi_setpoint
+ * |<=============================================>|       v
+ * |-------------------------------------------------------*-------|----------
+ * 0         bdi_goal = bdi_thresh - bdi_thresh/DIRTY_SCOPE^       ^bdi_thresh
+ *
+ * (4) global/bdi control lines
+ *
+ * bdi_position_ratio() applies 2 main and 3 regional control lines for
+ * scaling up/down the base bandwidth based on the position of dirty pages.
+ *
+ * The two main control lines for the global/bdi control scopes do not end at
+ * thresh/bdi_thresh.  They are centered at setpoint/bdi_setpoint and cover the
+ * whole [0, limit].  If the control line drops below 0 before reaching @limit,
+ * an auxiliary line will be setup to connect them. The below figure illustrates
+ * the main bdi control line with an auxiliary line extending it to @limit.
+ *
+ * This allows smoothly throttling down bdi_dirty back to normal if it starts
+ * high in situations like
+ * - start writing to a slow SD card and a fast disk at the same time. The SD
+ *   card's bdi_dirty may rush to 5 times higher than bdi_setpoint.
+ * - the global/bdi dirty thresh/goal may be knocked down suddenly either on
+ *   user request or on increased memory consumption.
+ *
+ *   o
+ *     o
+ *       o                                      [o] main control line
+ *         o                                    [*] auxiliary control line
+ *           o
+ *             o
+ *               o
+ *                 o
+ *                   o
+ *                     o
+ *                       o--------------------- balance point, bw scale = 1
+ *                       | o
+ *                       |   o
+ *                       |     o
+ *                       |       o
+ *                       |         o
+ *                       |           o
+ *                       |             o------- connect point, bw scale = 1/2
+ *                       |               .*
+ *                       |                 .   *
+ *                       |                   .      *
+ *                       |                     .         *
+ *                       |                       .           *
+ *                       |                         .              *
+ *                       |                           .                 *
+ *  [--------------------*-----------------------------.--------------------*]
+ *  0                 bdi_setpoint                  bdi_origin           limit
+ *
+ * The bdi control line: if (bdi_origin < limit), an auxiliary control line (*)
+ * will be setup to extend the main control line (o) to @limit.
+ */
+static unsigned long bdi_position_ratio(struct backing_dev_info *bdi,
+					unsigned long thresh,
+					unsigned long dirty,
+					unsigned long bdi_dirty)
+{
+	unsigned long limit = hard_dirty_limit(thresh);
+	unsigned long bdi_thresh = bdi->dirty_threshold;
+	unsigned long origin;
+	unsigned long goal;
+	unsigned long long span;
+	unsigned long long bw;
+
+	if (unlikely(dirty >= limit))
+		return 0;
+
+	/*
+	 * global setpoint
+	 */
+	goal = thresh - thresh / DIRTY_SCOPE;
+	origin = goal + 2 * thresh;
+
+	if (unlikely(origin < limit && dirty > (goal + origin) / 2)) {
+		origin = limit;
+		goal = (goal + origin) / 2;
+		bw >>= 1;
+	}
+	bw = origin - dirty;
+	bw <<= RATIO_SHIFT;
+	do_div(bw, origin - goal + 1);
+
+	/*
+	 * brake area, hold off dirtiers when the estimated dirty_ratelimit
+	 * and/or write_bandwidth are adapting to sudden workload changes.
+	 * It also balances the pressure to push global pages high when some
+	 * bdi dirty pages are over-committed (eg. a UKEY's bdi goal could be
+	 * exceeded a lot in the free run area; an unresponsing server may make
+	 * an NFS bdi's dirty goal drop much lower than its dirty pages).
+	 */
+	if (dirty > limit - limit / DIRTY_BRAKE) {
+		bw *= limit - dirty;
+		do_div(bw, limit / DIRTY_BRAKE + 1);
+	}
+
+	/*
+	 * rampup area, immediately above the unthrottled free-run region.
+	 * It's setup mainly to get an estimation of ref_bw for reliably
+	 * ramping up the base bandwidth.
+	 */
+	dirty = default_backing_dev_info.avg_dirty;
+	origin = thresh - thresh / DIRTY_FULL_SCOPE + thresh / DIRTY_RAMPUP;
+	if (dirty < origin) {
+		span = (origin - dirty) * bw;
+		do_div(span, thresh / (4 * DIRTY_RAMPUP) + 1);
+		bw += min(span, 4 * bw);
+	}
+
+	/*
+	 * bdi reserve area, safeguard against bdi dirty underflow and disk idle
+	 */
+	origin = bdi->avg_write_bandwidth + 2 * MIN_WRITEBACK_PAGES;
+	origin = min(origin, thresh - thresh / DIRTY_FULL_SCOPE);
+	if (bdi_dirty < origin) {
+		if (bdi_dirty > origin / 4)
+			bw = bw * origin / bdi_dirty;
+		else
+			bw = bw * 4;
+	}
+
+	/*
+	 * bdi setpoint
+	 */
+	if (unlikely(bdi_thresh > thresh))
+		bdi_thresh = thresh;
+	goal = bdi_thresh - bdi_thresh / DIRTY_SCOPE;
+	/*
+	 * In JBOD case, bdi_thresh could fluctuate proportional to its own
+	 * size. Otherwise the bdi write bandwidth is good for limiting the
+	 * floating area, to compensate for the global control line being too
+	 * flat in large memory systems.
+	 */
+	span = (u64) bdi_thresh * (thresh - bdi_thresh) +
+		(2 * bdi->avg_write_bandwidth) * bdi_thresh;
+	do_div(span, thresh + 1);
+	origin = goal + 2 * span;
+
+	if (likely(bdi->avg_dirty))
+		bdi_dirty = bdi->avg_dirty;
+	if (unlikely(bdi_dirty > goal + span)) {
+		if (bdi_dirty > limit)
+			return 0;
+		if (origin < limit) {
+			origin = limit;
+			goal += span;
+			bw >>= 1;
+		}
+	}
+	bw *= origin - bdi_dirty;
+	do_div(bw, origin - goal + 1);
+
+	return bw;
+}
+
 static void bdi_update_dirty_smooth(struct backing_dev_info *bdi,
 				    unsigned long dirty)
 {
@@ -611,6 +845,178 @@ static void bdi_update_dirty_threshold(s
 	bdi->old_dirty_threshold = thresh;
 }
 
+/*
+ * ref_bw typically fluctuates within a small range, with large isolated points
+ * from time to time. The smoothed reference_ratelimit can effectively filter
+ * out 1 such standalone point. When there comes 2+ isolated points together --
+ * observed in ext4 on sudden redirty -- reference_ratelimit may surge high and
+ * take long time to return to normal, which can mostly be counteracted by
+ * xref_bw and other update restrictions in bdi_update_dirty_ratelimit().
+ */
+static void bdi_update_reference_ratelimit(struct backing_dev_info *bdi,
+					   unsigned long ref_bw)
+{
+	unsigned long old = bdi->old_ref_ratelimit;
+	unsigned long avg = bdi->reference_ratelimit;
+
+	if (avg > old && old >= ref_bw && avg - old >= old - ref_bw)
+		avg -= (avg - old) >> 2;
+
+	if (avg < old && old <= ref_bw && old - avg >= ref_bw - old)
+		avg += (old - avg) >> 2;
+
+	bdi->reference_ratelimit = avg;
+	bdi->old_ref_ratelimit = ref_bw;
+}
+
+/*
+ * Base throttle bandwidth.
+ */
+static void bdi_update_dirty_ratelimit(struct backing_dev_info *bdi,
+				       unsigned long thresh,
+				       unsigned long dirty,
+				       unsigned long bdi_dirty,
+				       unsigned long dirtied,
+				       unsigned long elapsed)
+{
+	unsigned long limit = default_backing_dev_info.dirty_threshold;
+	unsigned long goal = thresh - thresh / DIRTY_SCOPE;
+	unsigned long bw = bdi->dirty_ratelimit;
+	unsigned long dirty_bw;
+	unsigned long pos_bw;
+	unsigned long delta;
+	unsigned long ref_bw;
+	unsigned long xref_bw;
+	unsigned long long pos_ratio;
+
+	if (dirty > limit - limit / DIRTY_BRAKE)
+		bdi->dirty_exceed_time = jiffies;
+
+	if (dirty < thresh - thresh / DIRTY_FULL_SCOPE + thresh / DIRTY_RAMPUP)
+		bdi->dirty_free_run = jiffies;
+
+	/*
+	 * The dirty rate will match the writeback rate in long term, except
+	 * when dirty pages are truncated by userspace before IO submission, or
+	 * re-dirtied when the FS finds it not suitable to do IO at the time.
+	 */
+	dirty_bw = (dirtied - bdi->dirtied_stamp) * HZ / elapsed;
+
+	pos_ratio = bdi_position_ratio(bdi, thresh, dirty, bdi_dirty);
+	/*
+	 * (pos_bw > bw) means the position of the number of dirty pages is
+	 * lower than the global and/or bdi setpoints. It does not necessarily
+	 * mean the base throttle bandwidth is larger than its balanced value.
+	 * The latter is likely only when
+	 * - (position) the dirty pages are at some distance from the setpoint,
+	 * - (speed) and either stands still or is departing from the setpoint.
+	 */
+	pos_bw = bw * pos_ratio >> RATIO_SHIFT;
+
+	/*
+	 * There may be
+	 * 1) X dd tasks writing to the current disk, and/or
+	 * 2) Y "rsync --bwlimit" tasks.
+	 * The below estimation is accurate enough for (1). For (2), where not
+	 * all task's dirty rate can be changed proportionally by adjusting the
+	 * base throttle bandwidth, it would require multiple adjust-reestimate
+	 * cycles to approach the rate balance point. That is not a big concern
+	 * as we do small steps anyway for the sake of other unknown noises.
+	 * The un-controllable tasks may only slow down the approximating
+	 * progress and is harmless otherwise.
+	 */
+	pos_ratio *= bdi->avg_write_bandwidth;
+	do_div(pos_ratio, dirty_bw | 1);
+	ref_bw = bw * pos_ratio >> RATIO_SHIFT;
+	ref_bw = min(ref_bw, bdi->avg_write_bandwidth);
+
+	/*
+	 * Update the base throttle bandwidth rigidly: eg. only try lowering it
+	 * when both the global/bdi dirty pages are away from their setpoints,
+	 * and are either standing still or continue departing away.
+	 *
+	 * The "+ (avg_dirty >> 8)" margin mainly help btrfs, which behaves
+	 * amazingly smoothly. Its @avg_dirty is ever approaching @dirty,
+	 * slower and slower, but very hard to cross it to trigger a base
+	 * bandwidth update. The added margin says "when @avg_dirty is _close
+	 * enough_ to @dirty, it indicates slowed down @dirty change rate,
+	 * hence the other inequalities are now a good indication of something
+	 * unbalanced in the current bdi".
+	 *
+	 * In the cases of hitting the upper/lower margins, it's obviously
+	 * necessary to adjust the (possibly very unbalanced) base bandwidth,
+	 * unless the opposite margin was also been hit recently, which
+	 * indicates that the dirty control scope may be smaller than the bdi
+	 * write bandwidth and hence the dirty pages are quickly fluctuating
+	 * between the upper/lower margins.
+	 */
+	if (bw < pos_bw) {
+		if (dirty < goal &&
+		    dirty <= default_backing_dev_info.avg_dirty +
+			     (default_backing_dev_info.avg_dirty >> 8) &&
+		    bdi_dirty <= bdi->avg_dirty + (bdi->avg_dirty >> 8) &&
+		    bdi_dirty <= bdi->old_dirty)
+			goto adjust;
+		if (dirty < thresh - thresh / DIRTY_FULL_SCOPE
+				   + thresh / DIRTY_RAMPUP &&
+		    !dirty_exceeded_recently(bdi, HZ))
+			goto adjust;
+	}
+
+	if (bw > pos_bw) {
+		if (dirty > goal &&
+		    dirty >= default_backing_dev_info.avg_dirty -
+			     (default_backing_dev_info.avg_dirty >> 8) &&
+		    bdi_dirty >= bdi->avg_dirty - (bdi->avg_dirty >> 8) &&
+		    bdi_dirty >= bdi->old_dirty)
+			goto adjust;
+		if (dirty > limit - limit / DIRTY_BRAKE &&
+		    !dirty_free_run_recently(bdi, HZ))
+			goto adjust;
+	}
+
+	goto out;
+
+adjust:
+	/*
+	 * The min/max'ed xref_bw is an effective safeguard against transient
+	 * large deviations. By considering not only the current ref_bw value,
+	 * but also the old/avg values, the sudden drop can be filtered out.
+	 */
+	if (pos_bw > bw) {
+		xref_bw = min(ref_bw, bdi->old_ref_ratelimit);
+		xref_bw = min(xref_bw, bdi->reference_ratelimit);
+		if (xref_bw > bw)
+			delta = xref_bw - bw;
+		else
+			delta = 0;
+	} else {
+		xref_bw = max(ref_bw, bdi->old_ref_ratelimit);
+		xref_bw = max(xref_bw, bdi->reference_ratelimit);
+		if (xref_bw < bw)
+			delta = bw - xref_bw;
+		else
+			delta = 0;
+	}
+
+	/*
+	 * Don't pursue 100% rate matching. It's impossible since the balanced
+	 * rate itself is constantly fluctuating. So decrease the track speed
+	 * when it gets close to the target. This avoids possible oscillations.
+	 * Also limit the step size to avoid overshooting.
+	 */
+	delta >>= bw / (8 * delta + 1);
+
+	if (pos_bw > bw)
+		bw += min(delta, pos_bw - bw) >> 2;
+	else
+		bw -= min(delta, bw - pos_bw) >> 2;
+
+	bdi->dirty_ratelimit = bw;
+out:
+	bdi_update_reference_ratelimit(bdi, ref_bw);
+}
+
 void bdi_update_bandwidth(struct backing_dev_info *bdi,
 			  unsigned long thresh,
 			  unsigned long dirty,
@@ -620,12 +1026,14 @@ void bdi_update_bandwidth(struct backing
 	static DEFINE_SPINLOCK(dirty_lock);
 	unsigned long now = jiffies;
 	unsigned long elapsed;
+	unsigned long dirtied;
 	unsigned long written;
 
 	if (!spin_trylock(&dirty_lock))
 		return;
 
 	elapsed = now - bdi->bw_time_stamp;
+	dirtied = percpu_counter_read(&bdi->bdi_stat[BDI_DIRTIED]);
 	written = percpu_counter_read(&bdi->bdi_stat[BDI_WRITTEN]);
 
 	/* skip quiet periods when disk bandwidth is under-utilized */
@@ -649,12 +1057,15 @@ void bdi_update_bandwidth(struct backing
 		default_backing_dev_info.bw_time_stamp = now;
 	}
 	if (thresh) {
+		bdi_update_dirty_ratelimit(bdi, thresh, dirty,
+					   bdi_dirty, dirtied, elapsed);
 		bdi_update_dirty_threshold(bdi, thresh, dirty);
 		bdi_update_dirty_smooth(bdi, bdi_dirty);
 	}
 	__bdi_update_write_bandwidth(bdi, elapsed, written);
 
 snapshot:
+	bdi->dirtied_stamp = dirtied;
 	bdi->written_stamp = written;
 	bdi->bw_time_stamp = now;
 unlock:
--- linux-next.orig/mm/backing-dev.c	2011-04-16 17:54:02.000000000 +0800
+++ linux-next/mm/backing-dev.c	2011-04-16 17:54:09.000000000 +0800
@@ -668,6 +668,7 @@ int bdi_init(struct backing_dev_info *bd
 
 	bdi->write_bandwidth = INIT_BW;
 	bdi->avg_write_bandwidth = INIT_BW;
+	bdi->dirty_ratelimit = INIT_BW;
 
 	bdi->avg_dirty = 0;
 	bdi->old_dirty = 0;


--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 08/12] writeback: IO-less balance_dirty_pages()
  2011-04-16 13:25 [PATCH 00/12] IO-less dirty throttling v7 Wu Fengguang
                   ` (6 preceding siblings ...)
  2011-04-16 13:25 ` [PATCH 07/12] writeback: base throttle bandwidth and position ratio Wu Fengguang
@ 2011-04-16 13:25 ` Wu Fengguang
  2011-04-16 13:25 ` [PATCH 09/12] writeback: show bdi write bandwidth in debugfs Wu Fengguang
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 29+ messages in thread
From: Wu Fengguang @ 2011-04-16 13:25 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Jan Kara, Wu Fengguang, Christoph Hellwig, Trond Myklebust,
	Dave Chinner, Theodore Ts'o, Chris Mason, Peter Zijlstra,
	Mel Gorman, Rik van Riel, KOSAKI Motohiro, Greg Thelen,
	Minchan Kim, Vivek Goyal, Andrea Righi, Balbir Singh, linux-mm,
	linux-fsdevel, LKML

[-- Attachment #1: writeback-ioless-balance_dirty_pages.patch --]
[-- Type: text/plain, Size: 27481 bytes --]

As proposed by Chris, Dave and Jan, don't start foreground writeback IO
inside balance_dirty_pages(). Instead, simply let it idle sleep for some
time to throttle the dirtying task. In the mean while, kick off the
per-bdi flusher thread to do background writeback IO.

RATIONALS
=========

- disk seeks on concurrent writeback of multiple inodes (Dave Chinner)

  If every thread doing writes and being throttled start foreground
  writeback, it leads to N IO submitters from at least N different
  inodes at the same time, end up with N different sets of IO being
  issued with potentially zero locality to each other, resulting in
  much lower elevator sort/merge efficiency and hence we seek the disk
  all over the place to service the different sets of IO.
  OTOH, if there is only one submission thread, it doesn't jump between
  inodes in the same way when congestion clears - it keeps writing to
  the same inode, resulting in large related chunks of sequential IOs
  being issued to the disk. This is more efficient than the above
  foreground writeback because the elevator works better and the disk
  seeks less.

- lock contention and cache bouncing on concurrent IO submitters (Dave Chinner)
  
  With this patchset, the fs_mark benchmark on a 12-drive software RAID0 goes
  from CPU bound to IO bound, freeing "3-4 CPUs worth of spinlock contention".

  * "CPU usage has dropped by ~55%", "it certainly appears that most of
    the CPU time saving comes from the removal of contention on the
    inode_wb_list_lock" (IMHO at least 10% comes from the reduction of
    cacheline bouncing, because the new code is able to call much less
    frequently into balance_dirty_pages() and hence access the global
    page states)

  * the user space "App overhead" is reduced by 20%, by avoiding the
    cacheline pollution by the complex writeback code path

  * "for a ~5% throughput reduction", "the number of write IOs have
    dropped by ~25%", and the elapsed time reduced from 41:42.17 to
    40:53.23.

  * On a simple test of 100 dd, it reduces the CPU %system time from 30% to 3%,
    and improves IO throughput from 38MB/s to 42MB/s.

- IO size too small for fast arrays and too large for slow USB sticks

  The write_chunk used by current balance_dirty_pages() cannot be
  directly set to some large value (eg. 128MB) for better IO efficiency.
  Because it could lead to more than 1 second user perceivable stalls.
  Even the current 4MB write size may be too large for slow USB sticks.
  The fact that balance_dirty_pages() starts IO on itself couples the
  IO size to wait time, which makes it hard to do suitable IO size while
  keeping the wait time under control.

  Now it's possible to increase writeback chunk size proportional to the
  disk bandwidth. In a simple test of 50 dd's on XFS, 1-HDD, 3GB ram,
  the larger writeback size dramatically reduces the seek count to 1/10
  (far beyond my expectation) and improves the write throughput by 24%.

- long block time in balance_dirty_pages() hurts desktop responsiveness

  Many of us may have the experience: it often takes a couple of seconds
  or even long time to stop a heavy writing dd/cp/tar command with
  Ctrl-C or "kill -9".

- IO pipeline broken by bumpy write() progress

  There are a broad class of "loop {read(buf); write(buf);}" applications
  whose read() pipeline will be under-utilized or even come to a stop if
  the write()s have long latencies _or_ don't progress in a constant rate.
  The current threshold based throttling inherently transfers the large
  low level IO completion fluctuations to bumpy application write()s,
  and further deteriorates with increasing number of dirtiers and/or bdi's.

  For example, when doing 50 dd's + 1 remote rsync to an XFS partition,
  the rsync progresses very bumpy in legacy kernel, and throughput is
  improved by 67% by this patchset. (plus the larger write chunk size,
  it will be 93% speedup).

  The new rate based throttling can support 1000+ dd's with excellent
  smoothness, low latency and low overheads.

For the above reasons, it's much better to do IO-less and low latency
pauses in balance_dirty_pages().

Jan Kara, Dave Chinner and me explored the scheme to let
balance_dirty_pages() wait for enough writeback IO completions to
safeguard the dirty limit. However it's found to have two problems:

- in large NUMA systems, the per-cpu counters may have big accounting
  errors, leading to big throttle wait time and jitters.

- NFS may kill large amount of unstable pages with one single COMMIT.
  Because NFS server serves COMMIT with expensive fsync() IOs, it is
  desirable to delay and reduce the number of COMMITs. So it's not
  likely to optimize away such kind of bursty IO completions, and the
  resulted large (and tiny) stall times in IO completion based throttling.

So here is a pause time oriented approach, which tries to control the
pause time in each balance_dirty_pages() invocations, by controlling
the number of pages dirtied before calling balance_dirty_pages(), for
smooth and efficient dirty throttling:

- avoid useless (eg. zero pause time) balance_dirty_pages() calls
- avoid too small pause time (less than   4ms, which burns CPU power)
- avoid too large pause time (more than 200ms, which hurts responsiveness)
- avoid big fluctuations of pause times

It can control pause times at will. The default policy is to do ~10ms
pauses in 1-dd case, and increase to ~100ms in 1000-dd case.

BOUNDARY CONTROL REGIONS
========================

The pause time scheme can only throttle a task to 1 page per 200ms, or
about 20KB/s in x86. The max-pause, pass-good and loop boundary control
regions are setup to stop huge number of slow dirtiers, sudden workload
changes or other unknown abnormalities.

balance_dirty_pages():

	/* free run */
	if (below (dirty_thresh + background_thresh) / 2)
		quit

	/* smooth throttling */
	if (within dirty control scope)
		sleep (dirtied_pages / task_ratelimit)

	/* max pause */
	if (dirty_limit exceeded)
		nap and quit

	/* pass good bdi */
	if (dirty_limit+dirty_limit/8 exceeded && bdi_thresh not exceeded)
		nap and quit

	/* loop */
	while (dirty_limit+dirty_limit/4 exceeded)
		nap

BEHAVIOR CHANGE
===============

(1) dirty threshold

Users will notice that the applications will get throttled once crossing
the global (background + dirty)/2=15% threshold, and then balanced around
17.5%. Before patch, the behavior is to just throttle it at 20% dirtyable
memory in 1-dd case.

Since the task will be soft throttled earlier than before, it may be
perceived by end users as performance "slow down" if his application
happens to dirty more than 15% dirtyable memory.

(2) fast rampup

The dirty pages will now rampup to the balance point much faster.

(3) smoothness/responsiveness

Users will notice a more responsive system during heavy writeback.
"killall dd" will take effect very fast.

THINK TIME
==========

The task's think time is compensated when computing the final pause time,
so that throttle bandwidth will be executed accurately. In the rare case
that the task slept longer than the period time (result in negative
pause time), the extra sleep time will be compensated in next period if
it's not too big (<500ms).  Accumulated errors are carefully avoided as
long as the task does not sleep for long time.

	period = task_bw / pages_dirtied;
	think = jiffies - paused_when;
	pause = period - think;

case 1: period > think

                pause = period - think
                paused_when += pause

                             period time
              |======================================>|
                  think time
              |===============>|
        ------|----------------|----------------------|-----------
        paused_when         jiffies


case 2: period <= think

                don't pause; reduce future pause time by:
                paused_when += period

                       period time
              |=========================>|
                             think time
              |======================================>|
        ------|--------------------------+------------|-----------
        paused_when                                jiffies

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 include/linux/backing-dev.h |    1 
 include/linux/sched.h       |    8 
 mm/backing-dev.c            |    2 
 mm/memory_hotplug.c         |    3 
 mm/page-writeback.c         |  367 +++++++++++++++-------------------
 5 files changed, 175 insertions(+), 206 deletions(-)

--- linux-next.orig/include/linux/sched.h	2011-04-15 14:18:29.000000000 +0800
+++ linux-next/include/linux/sched.h	2011-04-15 14:23:00.000000000 +0800
@@ -1493,6 +1493,14 @@ struct task_struct {
 	int make_it_fail;
 #endif
 	struct prop_local_single dirties;
+	/*
+	 * when (nr_dirtied >= nr_dirtied_pause), it's time to call
+	 * balance_dirty_pages() for some dirty throttling pause
+	 */
+	int nr_dirtied;
+	int nr_dirtied_pause;
+	unsigned long paused_when;	/* start of a write-and-pause period */
+
 #ifdef CONFIG_LATENCYTOP
 	int latency_record_count;
 	struct latency_record latency_record[LT_SAVECOUNT];
--- linux-next.orig/mm/page-writeback.c	2011-04-15 14:22:55.000000000 +0800
+++ linux-next/mm/page-writeback.c	2011-04-15 14:23:00.000000000 +0800
@@ -36,27 +36,12 @@
 #include <linux/pagevec.h>
 #include <trace/events/writeback.h>
 
-#define RATIO_SHIFT	10
-
 /*
- * After a CPU has dirtied this many pages, balance_dirty_pages_ratelimited
- * will look to see if it needs to force writeback or throttling.
+ * Sleep at most 200ms at a time in balance_dirty_pages().
  */
-static long ratelimit_pages = 32;
+#define MAX_PAUSE	max(HZ/5, 1)
 
-/*
- * When balance_dirty_pages decides that the caller needs to perform some
- * non-background writeback, this is how many pages it will attempt to write.
- * It should be somewhat larger than dirtied pages to ensure that reasonably
- * large amounts of I/O are submitted.
- */
-static inline long sync_writeback_pages(unsigned long dirtied)
-{
-	if (dirtied < ratelimit_pages)
-		dirtied = ratelimit_pages;
-
-	return dirtied + dirtied / 2;
-}
+#define RATIO_SHIFT	10
 
 /* The following parameters are exported via /proc/sys/vm */
 
@@ -251,43 +236,6 @@ static void bdi_writeout_fraction(struct
 				numerator, denominator);
 }
 
-static inline void task_dirties_fraction(struct task_struct *tsk,
-		long *numerator, long *denominator)
-{
-	prop_fraction_single(&vm_dirties, &tsk->dirties,
-				numerator, denominator);
-}
-
-/*
- * task_dirty_limit - scale down dirty throttling threshold for one task
- *
- * task specific dirty limit:
- *
- *   dirty -= (dirty/8) * p_{t}
- *
- * To protect light/slow dirtying tasks from heavier/fast ones, we start
- * throttling individual tasks before reaching the bdi dirty limit.
- * Relatively low thresholds will be allocated to heavy dirtiers. So when
- * dirty pages grow large, heavy dirtiers will be throttled first, which will
- * effectively curb the growth of dirty pages. Light dirtiers with high enough
- * dirty threshold may never get throttled.
- */
-static unsigned long task_dirty_limit(struct task_struct *tsk,
-				       unsigned long bdi_dirty)
-{
-	long numerator, denominator;
-	unsigned long dirty = bdi_dirty;
-	u64 inv = dirty >> 3;
-
-	task_dirties_fraction(tsk, &numerator, &denominator);
-	inv *= numerator;
-	do_div(inv, denominator);
-
-	dirty -= inv;
-
-	return max(dirty, bdi_dirty/2);
-}
-
 /*
  *
  */
@@ -407,8 +355,6 @@ static unsigned long hard_dirty_limit(un
  * Calculate the dirty thresholds based on sysctl parameters
  * - vm.dirty_background_ratio  or  vm.dirty_background_bytes
  * - vm.dirty_ratio             or  vm.dirty_bytes
- * The dirty limits will be lifted by 1/4 for PF_LESS_THROTTLE (ie. nfsd) and
- * real-time tasks.
  */
 void global_dirty_limits(unsigned long *pbackground, unsigned long *pdirty)
 {
@@ -439,10 +385,6 @@ void global_dirty_limits(unsigned long *
 		background = dirty - dirty / DIRTY_FULL_SCOPE;
 
 	tsk = current;
-	if (tsk->flags & PF_LESS_THROTTLE || rt_task(tsk)) {
-		background += background / 4;
-		dirty += dirty / 4;
-	}
 	*pbackground = background;
 	*pdirty = dirty;
 }
@@ -486,6 +428,23 @@ unsigned long bdi_dirty_limit(struct bac
 }
 
 /*
+ * After a task dirtied this many pages, balance_dirty_pages_ratelimited_nr()
+ * will look to see if it needs to start dirty throttling.
+ *
+ * If ratelimit_pages is too low then big NUMA machines will call the expensive
+ * global_page_state() too often. So scale it near-sqrt to the safety margin
+ * (the number of pages we may dirty without exceeding the dirty limits).
+ */
+static unsigned long ratelimit_pages(unsigned long dirty,
+				     unsigned long thresh)
+{
+	if (thresh > dirty)
+		return 1UL << (ilog2(thresh - dirty) >> 1);
+
+	return 1;
+}
+
+/*
  * last time exceeded (limit - limit/DIRTY_BRAKE)
  */
 static bool dirty_exceeded_recently(struct backing_dev_info *bdi,
@@ -1037,7 +996,7 @@ void bdi_update_bandwidth(struct backing
 	written = percpu_counter_read(&bdi->bdi_stat[BDI_WRITTEN]);
 
 	/* skip quiet periods when disk bandwidth is under-utilized */
-	if (elapsed > HZ &&
+	if (elapsed > 5 * MAX_PAUSE &&
 	    elapsed > now - start_time)
 		goto snapshot;
 
@@ -1045,13 +1004,13 @@ void bdi_update_bandwidth(struct backing
 	 * rate-limit, only update once every 200ms. Demand higher threshold
 	 * on the flusher so that the throttled task(s) can do most updates.
 	 */
-	if (!thresh && elapsed <= HZ / 3)
+	if (!thresh && elapsed <= 2 * MAX_PAUSE)
 		goto unlock;
-	if (elapsed <= HZ / 5)
+	if (elapsed <= MAX_PAUSE)
 		goto unlock;
 
 	if (thresh &&
-	    now - default_backing_dev_info.bw_time_stamp >= HZ / 5) {
+	    now - default_backing_dev_info.bw_time_stamp >= MAX_PAUSE) {
 		update_dirty_limit(thresh, dirty);
 		bdi_update_dirty_smooth(&default_backing_dev_info, dirty);
 		default_backing_dev_info.bw_time_stamp = now;
@@ -1072,6 +1031,38 @@ unlock:
 	spin_unlock(&dirty_lock);
 }
 
+static unsigned long max_pause(struct backing_dev_info *bdi,
+			       unsigned long bdi_dirty)
+{
+	unsigned long hi = ilog2(bdi->write_bandwidth);
+	unsigned long lo = ilog2(bdi->dirty_ratelimit);
+	unsigned long t;
+
+	/* target for 10ms pause on 1-dd case */
+	t = HZ / 50;
+
+	/*
+	 * Scale up pause time for concurrent dirtiers in order to reduce CPU
+	 * overheads.
+	 *
+	 * (N * 20ms) on 2^N concurrent tasks.
+	 */
+	if (hi > lo)
+		t += (hi - lo) * (20 * HZ) / 1024;
+
+	/*
+	 * Limit pause time for small memory systems. If sleeping for too long
+	 * time, a small pool of dirty/writeback pages may go empty and disk go
+	 * idle.
+	 *
+	 * 1ms for every 1MB; may further consider bdi bandwidth.
+	 */
+	if (bdi_dirty)
+		t = min(t, bdi_dirty >> (30 - PAGE_CACHE_SHIFT - ilog2(HZ)));
+
+	return clamp_val(t, 4, MAX_PAUSE);
+}
+
 /*
  * balance_dirty_pages() must be called by processes which are generating dirty
  * data.  It looks at the number of dirty pages in the machine and will force
@@ -1080,33 +1071,32 @@ unlock:
  * perform some writeout.
  */
 static void balance_dirty_pages(struct address_space *mapping,
-				unsigned long write_chunk)
+				unsigned long pages_dirtied)
 {
-	long nr_reclaimable, bdi_nr_reclaimable;
-	long nr_writeback, bdi_nr_writeback;
+	unsigned long nr_reclaimable;
+	unsigned long nr_dirty;  /* = file_dirty + writeback + unstable_nfs */
+	unsigned long bdi_dirty;
 	unsigned long background_thresh;
 	unsigned long dirty_thresh;
-	unsigned long bdi_thresh;
-	unsigned long pages_written = 0;
-	unsigned long pause = 1;
-	bool dirty_exceeded = false;
+	unsigned long bw;
+	unsigned long base_bw;
+	unsigned long period;
+	unsigned long pause = 0;
+	unsigned long pause_max;
 	struct backing_dev_info *bdi = mapping->backing_dev_info;
 	unsigned long start_time = jiffies;
 
-	if (!bdi_cap_account_dirty(bdi))
-		return;
-
 	for (;;) {
-		struct writeback_control wbc = {
-			.sync_mode	= WB_SYNC_NONE,
-			.older_than_this = NULL,
-			.nr_to_write	= write_chunk,
-			.range_cyclic	= 1,
-		};
-
+		unsigned long now = jiffies;
+		/*
+		 * Unstable writes are a feature of certain networked
+		 * filesystems (i.e. NFS) in which data may have been
+		 * written to the server's write cache, but has not yet
+		 * been flushed to permanent storage.
+		 */
 		nr_reclaimable = global_page_state(NR_FILE_DIRTY) +
 					global_page_state(NR_UNSTABLE_NFS);
-		nr_writeback = global_page_state(NR_WRITEBACK);
+		nr_dirty = nr_reclaimable + global_page_state(NR_WRITEBACK);
 
 		global_dirty_limits(&background_thresh, &dirty_thresh);
 
@@ -1115,12 +1105,11 @@ static void balance_dirty_pages(struct a
 		 * catch-up. This avoids (excessively) small writeouts
 		 * when the bdi limits are ramping up.
 		 */
-		if (nr_reclaimable + nr_writeback <=
-				(background_thresh + dirty_thresh) / 2)
+		if (nr_dirty <= (background_thresh + dirty_thresh) / 2) {
+			current->paused_when = jiffies;
+			current->nr_dirtied = 0;
 			break;
-
-		bdi_thresh = bdi_dirty_limit(bdi, dirty_thresh);
-		bdi_thresh = task_dirty_limit(current, bdi_thresh);
+		}
 
 		/*
 		 * In order to avoid the stacked BDI deadlock we need
@@ -1132,67 +1121,87 @@ static void balance_dirty_pages(struct a
 		 * actually dirty; with m+n sitting in the percpu
 		 * deltas.
 		 */
-		if (bdi_thresh < 2*bdi_stat_error(bdi)) {
-			bdi_nr_reclaimable = bdi_stat_sum(bdi, BDI_RECLAIMABLE);
-			bdi_nr_writeback = bdi_stat_sum(bdi, BDI_WRITEBACK);
+		if (bdi->dirty_threshold < 2*bdi_stat_error(bdi)) {
+			bdi_dirty = bdi_stat_sum(bdi, BDI_RECLAIMABLE) +
+				    bdi_stat_sum(bdi, BDI_WRITEBACK);
 		} else {
-			bdi_nr_reclaimable = bdi_stat(bdi, BDI_RECLAIMABLE);
-			bdi_nr_writeback = bdi_stat(bdi, BDI_WRITEBACK);
+			bdi_dirty = bdi_stat(bdi, BDI_RECLAIMABLE) +
+				    bdi_stat(bdi, BDI_WRITEBACK);
 		}
 
-		bdi_update_bandwidth(bdi, dirty_thresh,
-				     nr_reclaimable + nr_writeback,
-				     bdi_nr_reclaimable + bdi_nr_writeback,
-				     start_time);
+		bdi_update_bandwidth(bdi, dirty_thresh, nr_dirty,
+				     bdi_dirty, start_time);
 
-		/*
-		 * The bdi thresh is somehow "soft" limit derived from the
-		 * global "hard" limit. The former helps to prevent heavy IO
-		 * bdi or process from holding back light ones; The latter is
-		 * the last resort safeguard.
-		 */
-		dirty_exceeded =
-			(bdi_nr_reclaimable + bdi_nr_writeback > bdi_thresh)
-			|| (nr_reclaimable + nr_writeback > dirty_thresh);
-
-		if (!dirty_exceeded)
-			break;
+		if (unlikely(!writeback_in_progress(bdi)))
+			bdi_start_background_writeback(bdi);
 
-		if (!bdi->dirty_exceeded)
-			bdi->dirty_exceeded = 1;
+		pause_max = max_pause(bdi, bdi_dirty);
 
-		/* Note: nr_reclaimable denotes nr_dirty + nr_unstable.
-		 * Unstable writes are a feature of certain networked
-		 * filesystems (i.e. NFS) in which data may have been
-		 * written to the server's write cache, but has not yet
-		 * been flushed to permanent storage.
-		 * Only move pages to writeback if this bdi is over its
-		 * threshold otherwise wait until the disk writes catch
-		 * up.
+		base_bw = bdi->dirty_ratelimit;
+		/*
+		 * Double the bandwidth for PF_LESS_THROTTLE (ie. nfsd) and
+		 * real-time tasks.
 		 */
-		trace_wbc_balance_dirty_start(&wbc, bdi);
-		if (bdi_nr_reclaimable > bdi_thresh) {
-			writeback_inodes_wb(&bdi->wb, &wbc);
-			pages_written += write_chunk - wbc.nr_to_write;
-			trace_wbc_balance_dirty_written(&wbc, bdi);
-			if (pages_written >= write_chunk)
-				break;		/* We've done our duty */
+		if (current->flags & PF_LESS_THROTTLE || rt_task(current))
+			base_bw *= 2;
+		bw = bdi_position_ratio(bdi, dirty_thresh, nr_dirty, bdi_dirty);
+		if (unlikely(bw == 0)) {
+			period = pause_max;
+			pause = pause_max;
+			goto pause;
 		}
-		trace_wbc_balance_dirty_wait(&wbc, bdi);
+		bw = (u64)base_bw * bw >> RATIO_SHIFT;
+		period = (HZ * pages_dirtied + bw / 2) / (bw | 1);
+		pause = current->paused_when + period - now;
+		/*
+		 * Take it as long think time if pause falls into (-10s, 0).
+		 * If it's less than 500ms (ext2 blocks the dirtier task for
+		 * up to 400ms from time to time on 1-HDD; so does xfs, however
+		 * at much less frequency), try to compensate it in future by
+		 * updating the virtual time; otherwise just reset the time, as
+		 * it may be a light dirtier.
+		 */
+		if (unlikely(-pause < HZ*10)) {
+			if (-pause > HZ/2) {
+				current->paused_when = now;
+				current->nr_dirtied = 0;
+			} else if (period) {
+				current->paused_when += period;
+				current->nr_dirtied = 0;
+			}
+			pause = 1;
+			break;
+		}
+		pause = min(pause, pause_max);
+
+pause:
+		current->paused_when = now;
 		__set_current_state(TASK_UNINTERRUPTIBLE);
 		io_schedule_timeout(pause);
+		current->paused_when += pause;
+		current->nr_dirtied = 0;
 
-		/*
-		 * Increase the delay for each loop, up to our previous
-		 * default of taking a 100ms nap.
-		 */
-		pause <<= 1;
-		if (pause > HZ / 10)
-			pause = HZ / 10;
+		dirty_thresh = hard_dirty_limit(dirty_thresh);
+		if (nr_dirty < dirty_thresh + dirty_thresh / DIRTY_MAXPAUSE)
+			break;
+		if (nr_dirty < dirty_thresh + dirty_thresh / DIRTY_PASSGOOD &&
+		    bdi_dirty < bdi->dirty_threshold)
+			break;
 	}
 
-	if (!dirty_exceeded && bdi->dirty_exceeded)
-		bdi->dirty_exceeded = 0;
+	if (pause == 0)
+		current->nr_dirtied_pause =
+				ratelimit_pages(nr_dirty, dirty_thresh);
+	else if (period <= pause_max / 4)
+		current->nr_dirtied_pause = clamp_val(
+						base_bw * (pause_max/2) / HZ,
+						pages_dirtied + pages_dirtied/8,
+						pages_dirtied * 4);
+	else if (pause >= pause_max)
+		current->nr_dirtied_pause = 1 | clamp_val(
+						base_bw * (pause_max*3/8) / HZ,
+						current->nr_dirtied_pause / 4,
+						current->nr_dirtied_pause*7/8);
 
 	if (writeback_in_progress(bdi))
 		return;
@@ -1205,8 +1214,10 @@ static void balance_dirty_pages(struct a
 	 * In normal mode, we start background writeout at the lower
 	 * background_thresh, to keep the amount of dirty memory low.
 	 */
-	if ((laptop_mode && pages_written) ||
-	    (!laptop_mode && (nr_reclaimable > background_thresh)))
+	if (laptop_mode)
+		return;
+
+	if (nr_reclaimable > background_thresh)
 		bdi_start_background_writeback(bdi);
 }
 
@@ -1220,8 +1231,6 @@ void set_page_dirty_balance(struct page 
 	}
 }
 
-static DEFINE_PER_CPU(unsigned long, bdp_ratelimits) = 0;
-
 /**
  * balance_dirty_pages_ratelimited_nr - balance dirty memory state
  * @mapping: address_space which was dirtied
@@ -1231,36 +1240,35 @@ static DEFINE_PER_CPU(unsigned long, bdp
  * which was newly dirtied.  The function will periodically check the system's
  * dirty state and will initiate writeback if needed.
  *
- * On really big machines, get_writeback_state is expensive, so try to avoid
+ * On really big machines, global_page_state() is expensive, so try to avoid
  * calling it too often (ratelimiting).  But once we're over the dirty memory
- * limit we decrease the ratelimiting by a lot, to prevent individual processes
- * from overshooting the limit by (ratelimit_pages) each.
+ * limit we disable the ratelimiting, to prevent individual processes from
+ * overshooting the limit by (ratelimit_pages) each.
  */
 void balance_dirty_pages_ratelimited_nr(struct address_space *mapping,
 					unsigned long nr_pages_dirtied)
 {
-	unsigned long ratelimit;
-	unsigned long *p;
+	struct backing_dev_info *bdi = mapping->backing_dev_info;
+
+	if (!bdi_cap_account_dirty(bdi))
+		return;
 
-	ratelimit = ratelimit_pages;
-	if (mapping->backing_dev_info->dirty_exceeded)
-		ratelimit = 8;
+	current->nr_dirtied += nr_pages_dirtied;
+
+	if (dirty_exceeded_recently(bdi, MAX_PAUSE)) {
+		unsigned long max = current->nr_dirtied +
+						(128 >> (PAGE_SHIFT - 10));
+
+		if (current->nr_dirtied_pause > max)
+			current->nr_dirtied_pause = max;
+	}
 
 	/*
 	 * Check the rate limiting. Also, we do not want to throttle real-time
 	 * tasks in balance_dirty_pages(). Period.
 	 */
-	preempt_disable();
-	p =  &__get_cpu_var(bdp_ratelimits);
-	*p += nr_pages_dirtied;
-	if (unlikely(*p >= ratelimit)) {
-		ratelimit = sync_writeback_pages(*p);
-		*p = 0;
-		preempt_enable();
-		balance_dirty_pages(mapping, ratelimit);
-		return;
-	}
-	preempt_enable();
+	if (unlikely(current->nr_dirtied >= current->nr_dirtied_pause))
+		balance_dirty_pages(mapping, current->nr_dirtied);
 }
 EXPORT_SYMBOL(balance_dirty_pages_ratelimited_nr);
 
@@ -1348,44 +1356,6 @@ void laptop_sync_completion(void)
 #endif
 
 /*
- * If ratelimit_pages is too high then we can get into dirty-data overload
- * if a large number of processes all perform writes at the same time.
- * If it is too low then SMP machines will call the (expensive)
- * get_writeback_state too often.
- *
- * Here we set ratelimit_pages to a level which ensures that when all CPUs are
- * dirtying in parallel, we cannot go more than 3% (1/32) over the dirty memory
- * thresholds before writeback cuts in.
- *
- * But the limit should not be set too high.  Because it also controls the
- * amount of memory which the balance_dirty_pages() caller has to write back.
- * If this is too large then the caller will block on the IO queue all the
- * time.  So limit it to four megabytes - the balance_dirty_pages() caller
- * will write six megabyte chunks, max.
- */
-
-void writeback_set_ratelimit(void)
-{
-	ratelimit_pages = vm_total_pages / (num_online_cpus() * 32);
-	if (ratelimit_pages < 16)
-		ratelimit_pages = 16;
-	if (ratelimit_pages * PAGE_CACHE_SIZE > 4096 * 1024)
-		ratelimit_pages = (4096 * 1024) / PAGE_CACHE_SIZE;
-}
-
-static int __cpuinit
-ratelimit_handler(struct notifier_block *self, unsigned long u, void *v)
-{
-	writeback_set_ratelimit();
-	return NOTIFY_DONE;
-}
-
-static struct notifier_block __cpuinitdata ratelimit_nb = {
-	.notifier_call	= ratelimit_handler,
-	.next		= NULL,
-};
-
-/*
  * Called early on to tune the page writeback dirty limits.
  *
  * We used to scale dirty pages according to how total memory
@@ -1407,9 +1377,6 @@ void __init page_writeback_init(void)
 {
 	int shift;
 
-	writeback_set_ratelimit();
-	register_cpu_notifier(&ratelimit_nb);
-
 	shift = calc_period_shift();
 	prop_descriptor_init(&vm_completions, shift);
 	prop_descriptor_init(&vm_dirties, shift);
--- linux-next.orig/include/linux/backing-dev.h	2011-04-15 14:22:55.000000000 +0800
+++ linux-next/include/linux/backing-dev.h	2011-04-15 14:23:00.000000000 +0800
@@ -89,7 +89,6 @@ struct backing_dev_info {
 	unsigned long old_dirty_threshold;
 
 	struct prop_local_percpu completions;
-	int dirty_exceeded;
 
 	/* last time exceeded (limit - limit/DIRTY_BRAKE) */
 	unsigned long dirty_exceed_time;
--- linux-next.orig/mm/memory_hotplug.c	2011-04-15 14:18:29.000000000 +0800
+++ linux-next/mm/memory_hotplug.c	2011-04-15 14:23:00.000000000 +0800
@@ -468,8 +468,6 @@ int online_pages(unsigned long pfn, unsi
 
 	vm_total_pages = nr_free_pagecache_pages();
 
-	writeback_set_ratelimit();
-
 	if (onlined_pages)
 		memory_notify(MEM_ONLINE, &arg);
 	unlock_memory_hotplug();
@@ -901,7 +899,6 @@ repeat:
 	}
 
 	vm_total_pages = nr_free_pagecache_pages();
-	writeback_set_ratelimit();
 
 	memory_notify(MEM_OFFLINE, &arg);
 	unlock_memory_hotplug();
--- linux-next.orig/mm/backing-dev.c	2011-04-15 14:22:55.000000000 +0800
+++ linux-next/mm/backing-dev.c	2011-04-15 14:23:00.000000000 +0800
@@ -661,8 +661,6 @@ int bdi_init(struct backing_dev_info *bd
 			goto err;
 	}
 
-	bdi->dirty_exceeded = 0;
-
 	bdi->bw_time_stamp = jiffies;
 	bdi->written_stamp = 0;
 



^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 09/12] writeback: show bdi write bandwidth in debugfs
  2011-04-16 13:25 [PATCH 00/12] IO-less dirty throttling v7 Wu Fengguang
                   ` (7 preceding siblings ...)
  2011-04-16 13:25 ` [PATCH 08/12] writeback: IO-less balance_dirty_pages() Wu Fengguang
@ 2011-04-16 13:25 ` Wu Fengguang
  2011-04-16 13:25 ` [PATCH 10/12] writeback: trace dirty_ratelimit Wu Fengguang
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 29+ messages in thread
From: Wu Fengguang @ 2011-04-16 13:25 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Jan Kara, Theodore Tso, Peter Zijlstra, Wu Fengguang,
	Christoph Hellwig, Trond Myklebust, Dave Chinner, Chris Mason,
	Mel Gorman, Rik van Riel, KOSAKI Motohiro, Greg Thelen,
	Minchan Kim, Vivek Goyal, Andrea Righi, Balbir Singh, linux-mm,
	linux-fsdevel, LKML

[-- Attachment #1: writeback-bandwidth-show.patch --]
[-- Type: text/plain, Size: 2593 bytes --]

Add a "BdiWriteBandwidth" entry and indent others in /debug/bdi/*/stats.

btw, increase digital field width to 10, for keeping the possibly
huge BdiWritten number aligned at least for desktop systems.

This could break user space tools if they are dumb enough to depend on
the number of white spaces.

CC: Theodore Ts'o <tytso@mit.edu>
CC: Jan Kara <jack@suse.cz>
CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 mm/backing-dev.c |   34 ++++++++++++++++++++--------------
 1 file changed, 20 insertions(+), 14 deletions(-)

--- linux-next.orig/mm/backing-dev.c	2011-04-13 17:18:16.000000000 +0800
+++ linux-next/mm/backing-dev.c	2011-04-13 17:18:17.000000000 +0800
@@ -81,24 +81,30 @@ static int bdi_debug_stats_show(struct s
 
 #define K(x) ((x) << (PAGE_SHIFT - 10))
 	seq_printf(m,
-		   "BdiWriteback:     %8lu kB\n"
-		   "BdiReclaimable:   %8lu kB\n"
-		   "BdiDirtyThresh:   %8lu kB\n"
-		   "DirtyThresh:      %8lu kB\n"
-		   "BackgroundThresh: %8lu kB\n"
-		   "BdiDirtied:       %8lu kB\n"
-		   "BdiWritten:       %8lu kB\n"
-		   "b_dirty:          %8lu\n"
-		   "b_io:             %8lu\n"
-		   "b_more_io:        %8lu\n"
-		   "bdi_list:         %8u\n"
-		   "state:            %8lx\n",
+		   "BdiWriteback:       %10lu kB\n"
+		   "BdiReclaimable:     %10lu kB\n"
+		   "BdiDirtyThresh:     %10lu kB\n"
+		   "DirtyThresh:        %10lu kB\n"
+		   "BackgroundThresh:   %10lu kB\n"
+		   "BdiDirtied:         %10lu kB\n"
+		   "BdiWritten:         %10lu kB\n"
+		   "BdiWriteBandwidth:  %10lu kBps\n"
+		   "b_dirty:            %10lu\n"
+		   "b_io:               %10lu\n"
+		   "b_more_io:          %10lu\n"
+		   "bdi_list:           %10u\n"
+		   "state:              %10lx\n",
 		   (unsigned long) K(bdi_stat(bdi, BDI_WRITEBACK)),
 		   (unsigned long) K(bdi_stat(bdi, BDI_RECLAIMABLE)),
-		   K(bdi_thresh), K(dirty_thresh), K(background_thresh),
+		   K(bdi_thresh),
+		   K(dirty_thresh),
+		   K(background_thresh),
 		   (unsigned long) K(bdi_stat(bdi, BDI_DIRTIED)),
 		   (unsigned long) K(bdi_stat(bdi, BDI_WRITTEN)),
-		   nr_dirty, nr_io, nr_more_io,
+		   (unsigned long) K(bdi->write_bandwidth),
+		   nr_dirty,
+		   nr_io,
+		   nr_more_io,
 		   !list_empty(&bdi->bdi_list), bdi->state);
 #undef K
 


--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 10/12] writeback: trace dirty_ratelimit
  2011-04-16 13:25 [PATCH 00/12] IO-less dirty throttling v7 Wu Fengguang
                   ` (8 preceding siblings ...)
  2011-04-16 13:25 ` [PATCH 09/12] writeback: show bdi write bandwidth in debugfs Wu Fengguang
@ 2011-04-16 13:25 ` Wu Fengguang
  2011-04-16 13:25 ` [PATCH 11/12] writeback: trace balance_dirty_pages Wu Fengguang
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 29+ messages in thread
From: Wu Fengguang @ 2011-04-16 13:25 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Jan Kara, Wu Fengguang, Christoph Hellwig, Trond Myklebust,
	Dave Chinner, Theodore Ts'o, Chris Mason, Peter Zijlstra,
	Mel Gorman, Rik van Riel, KOSAKI Motohiro, Greg Thelen,
	Minchan Kim, Vivek Goyal, Andrea Righi, Balbir Singh, linux-mm,
	linux-fsdevel, LKML

[-- Attachment #1: writeback-trace-throttle-bandwidth.patch --]
[-- Type: text/plain, Size: 2801 bytes --]

It provides critical information to understand how various throttle
bandwidths are updated.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 include/trace/events/writeback.h |   51 +++++++++++++++++++++++++++--
 mm/page-writeback.c              |    1 
 2 files changed, 49 insertions(+), 3 deletions(-)

--- linux-next.orig/mm/page-writeback.c	2011-04-16 11:28:21.000000000 +0800
+++ linux-next/mm/page-writeback.c	2011-04-16 11:28:27.000000000 +0800
@@ -974,6 +974,7 @@ adjust:
 	bdi->dirty_ratelimit = bw;
 out:
 	bdi_update_reference_ratelimit(bdi, ref_bw);
+	trace_dirty_ratelimit(bdi, dirty_bw, pos_bw, ref_bw);
 }
 
 void bdi_update_bandwidth(struct backing_dev_info *bdi,
--- linux-next.orig/include/trace/events/writeback.h	2011-04-16 11:28:17.000000000 +0800
+++ linux-next/include/trace/events/writeback.h	2011-04-16 11:28:27.000000000 +0800
@@ -147,11 +147,56 @@ DEFINE_EVENT(wbc_class, name, \
 DEFINE_WBC_EVENT(wbc_writeback_start);
 DEFINE_WBC_EVENT(wbc_writeback_written);
 DEFINE_WBC_EVENT(wbc_writeback_wait);
-DEFINE_WBC_EVENT(wbc_balance_dirty_start);
-DEFINE_WBC_EVENT(wbc_balance_dirty_written);
-DEFINE_WBC_EVENT(wbc_balance_dirty_wait);
 DEFINE_WBC_EVENT(wbc_writepage);
 
+#define KBps(x)			((x) << (PAGE_SHIFT - 10))
+
+TRACE_EVENT(dirty_ratelimit,
+
+	TP_PROTO(struct backing_dev_info *bdi,
+		 unsigned long dirty_bw,
+		 unsigned long pos_bw,
+		 unsigned long ref_bw),
+
+	TP_ARGS(bdi, dirty_bw, pos_bw, ref_bw),
+
+	TP_STRUCT__entry(
+		__array(char,		bdi, 32)
+		__field(unsigned long,	write_bw)
+		__field(unsigned long,	avg_bw)
+		__field(unsigned long,	dirty_bw)
+		__field(unsigned long,	base_bw)
+		__field(unsigned long,	pos_bw)
+		__field(unsigned long,	ref_bw)
+		__field(unsigned long,	avg_ref_bw)
+	),
+
+	TP_fast_assign(
+		strlcpy(__entry->bdi, dev_name(bdi->dev), 32);
+		__entry->write_bw	= KBps(bdi->write_bandwidth);
+		__entry->avg_bw		= KBps(bdi->avg_write_bandwidth);
+		__entry->dirty_bw	= KBps(dirty_bw);
+		__entry->base_bw	= KBps(bdi->dirty_ratelimit);
+		__entry->pos_bw		= KBps(pos_bw);
+		__entry->ref_bw		= KBps(ref_bw);
+		__entry->avg_ref_bw	= KBps(bdi->reference_ratelimit);
+	),
+
+
+	TP_printk("bdi %s: "
+		  "write_bw=%lu awrite_bw=%lu dirty_bw=%lu "
+		  "base_bw=%lu pos_bw=%lu ref_bw=%lu aref_bw=%lu",
+		  __entry->bdi,
+		  __entry->write_bw,	/* write bandwidth */
+		  __entry->avg_bw,	/* avg write bandwidth */
+		  __entry->dirty_bw,	/* dirty bandwidth */
+		  __entry->base_bw,	/* dirty ratelimit on each task */
+		  __entry->pos_bw,	/* position control ratelimit */
+		  __entry->ref_bw,	/* the reference ratelimit */
+		  __entry->avg_ref_bw	/* smoothed reference ratelimit */
+	)
+);
+
 DECLARE_EVENT_CLASS(writeback_congest_waited_template,
 
 	TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed),



^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 11/12] writeback: trace balance_dirty_pages
  2011-04-16 13:25 [PATCH 00/12] IO-less dirty throttling v7 Wu Fengguang
                   ` (9 preceding siblings ...)
  2011-04-16 13:25 ` [PATCH 10/12] writeback: trace dirty_ratelimit Wu Fengguang
@ 2011-04-16 13:25 ` Wu Fengguang
  2011-04-16 13:25 ` [PATCH 12/12] writeback: trace global_dirty_state Wu Fengguang
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 29+ messages in thread
From: Wu Fengguang @ 2011-04-16 13:25 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Jan Kara, Wu Fengguang, Christoph Hellwig, Trond Myklebust,
	Dave Chinner, Theodore Ts'o, Chris Mason, Peter Zijlstra,
	Mel Gorman, Rik van Riel, KOSAKI Motohiro, Greg Thelen,
	Minchan Kim, Vivek Goyal, Andrea Righi, Balbir Singh, linux-mm,
	linux-fsdevel, LKML

[-- Attachment #1: writeback-trace-balance_dirty_pages.patch --]
[-- Type: text/plain, Size: 6733 bytes --]

It would be useful for analyzing the dynamics of the throttling
algorithms, and helpful for debugging user reported problems.

Here is an interesting test to verify the theory with balance_dirty_pages()
tracing. On a partition that can do ~60MB/s, a sparse file is created and
4 rsync tasks with different write bandwidth started:

	dd if=/dev/zero of=/mnt/1T bs=1M count=1 seek=1024000
	echo 1 > /debug/tracing/events/writeback/balance_dirty_pages/enable

	rsync localhost:/mnt/1T /mnt/a --bwlimit 10000&
	rsync localhost:/mnt/1T /mnt/A --bwlimit 10000&
	rsync localhost:/mnt/1T /mnt/b --bwlimit 20000&
	rsync localhost:/mnt/1T /mnt/c --bwlimit 30000&

Trace outputs (an old version) within 0.1 second, grouped by tasks:

rsync-3824  [004] 15002.076447: balance_dirty_pages: bdi=btrfs-2 weight=15% limit=130876 gap=5340 dirtied=192 pause=20

rsync-3822  [003] 15002.091701: balance_dirty_pages: bdi=btrfs-2 weight=15% limit=130777 gap=5113 dirtied=192 pause=20

rsync-3821  [006] 15002.004667: balance_dirty_pages: bdi=btrfs-2 weight=30% limit=129570 gap=3714 dirtied=64 pause=8
rsync-3821  [006] 15002.012654: balance_dirty_pages: bdi=btrfs-2 weight=30% limit=129589 gap=3733 dirtied=64 pause=8
rsync-3821  [006] 15002.021838: balance_dirty_pages: bdi=btrfs-2 weight=30% limit=129604 gap=3748 dirtied=64 pause=8
rsync-3821  [004] 15002.091193: balance_dirty_pages: bdi=btrfs-2 weight=29% limit=129583 gap=3983 dirtied=64 pause=8
rsync-3821  [004] 15002.102729: balance_dirty_pages: bdi=btrfs-2 weight=29% limit=129594 gap=3802 dirtied=64 pause=8
rsync-3821  [000] 15002.109252: balance_dirty_pages: bdi=btrfs-2 weight=29% limit=129619 gap=3827 dirtied=64 pause=8

rsync-3823  [002] 15002.009029: balance_dirty_pages: bdi=btrfs-2 weight=39% limit=128762 gap=2842 dirtied=64 pause=12
rsync-3823  [002] 15002.021598: balance_dirty_pages: bdi=btrfs-2 weight=39% limit=128813 gap=3021 dirtied=64 pause=12
rsync-3823  [003] 15002.032973: balance_dirty_pages: bdi=btrfs-2 weight=39% limit=128805 gap=2885 dirtied=64 pause=12
rsync-3823  [003] 15002.048800: balance_dirty_pages: bdi=btrfs-2 weight=39% limit=128823 gap=2967 dirtied=64 pause=12
rsync-3823  [003] 15002.060728: balance_dirty_pages: bdi=btrfs-2 weight=39% limit=128821 gap=3221 dirtied=64 pause=12
rsync-3823  [000] 15002.073152: balance_dirty_pages: bdi=btrfs-2 weight=39% limit=128825 gap=3225 dirtied=64 pause=12
rsync-3823  [005] 15002.090111: balance_dirty_pages: bdi=btrfs-2 weight=39% limit=128782 gap=3214 dirtied=64 pause=12
rsync-3823  [004] 15002.102520: balance_dirty_pages: bdi=btrfs-2 weight=39% limit=128764 gap=3036 dirtied=64 pause=12

The data vividly show that

- the heaviest writer is throttled a bit (weight=39%)

- the lighter writers run at full speed (weight=15%,15%,30%)

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 include/trace/events/writeback.h |   80 +++++++++++++++++++++++++++++
 mm/page-writeback.c              |   20 +++++++
 2 files changed, 100 insertions(+)

--- linux-next.orig/include/trace/events/writeback.h	2011-04-16 11:28:27.000000000 +0800
+++ linux-next/include/trace/events/writeback.h	2011-04-16 11:28:28.000000000 +0800
@@ -197,6 +197,86 @@ TRACE_EVENT(dirty_ratelimit,
 	)
 );
 
+TRACE_EVENT(balance_dirty_pages,
+
+	TP_PROTO(struct backing_dev_info *bdi,
+		 unsigned long thresh,
+		 unsigned long dirty,
+		 unsigned long bdi_dirty,
+		 unsigned long base_bw,
+		 unsigned long task_bw,
+		 unsigned long dirtied,
+		 unsigned long period,
+		 long pause,
+		 unsigned long start_time),
+
+	TP_ARGS(bdi, thresh, dirty, bdi_dirty,
+		base_bw, task_bw, dirtied, period, pause, start_time),
+
+	TP_STRUCT__entry(
+		__array(	 char,	bdi, 32)
+		__field(unsigned long,	limit)
+		__field(unsigned long,	goal)
+		__field(unsigned long,	dirty)
+		__field(unsigned long,	bdi_goal)
+		__field(unsigned long,	bdi_dirty)
+		__field(unsigned long,	avg_dirty)
+		__field(unsigned long,	base_bw)
+		__field(unsigned long,	task_bw)
+		__field(unsigned int,	dirtied)
+		__field(unsigned int,	dirtied_pause)
+		__field(unsigned long,	period)
+		__field(	 long,	think)
+		__field(	 long,	pause)
+		__field(unsigned long,	paused)
+	),
+
+	TP_fast_assign(
+		strlcpy(__entry->bdi, dev_name(bdi->dev), 32);
+
+		__entry->limit = default_backing_dev_info.dirty_threshold;
+		__entry->goal		= thresh - thresh / DIRTY_SCOPE;
+		__entry->dirty		= dirty;
+		__entry->bdi_goal	= bdi->dirty_threshold -
+					  bdi->dirty_threshold / DIRTY_SCOPE;
+		__entry->bdi_dirty	= bdi_dirty;
+		__entry->avg_dirty	= bdi->avg_dirty;
+		__entry->base_bw	= KBps(base_bw);
+		__entry->task_bw	= KBps(task_bw);
+		__entry->dirtied	= dirtied;
+		__entry->dirtied_pause	= current->nr_dirtied_pause;
+		__entry->think		= current->paused_when == 0 ? 0 :
+			 (long)(jiffies - current->paused_when) * 1000 / HZ;
+		__entry->period		= period * 1000 / HZ;
+		__entry->pause		= pause * 1000 / HZ;
+		__entry->paused		= (jiffies - start_time) * 1000 / HZ;
+	),
+
+
+	TP_printk("bdi %s: "
+		  "limit=%lu goal=%lu dirty=%lu "
+		  "bdi_goal=%lu bdi_dirty=%lu avg_dirty=%lu "
+		  "base_bw=%lu task_bw=%lu "
+		  "dirtied=%u dirtied_pause=%u "
+		  "period=%lu think=%ld pause=%ld paused=%lu",
+		  __entry->bdi,
+		  __entry->limit,
+		  __entry->goal,
+		  __entry->dirty,
+		  __entry->bdi_goal,
+		  __entry->bdi_dirty,
+		  __entry->avg_dirty,
+		  __entry->base_bw,	/* base throttle bandwidth */
+		  __entry->task_bw,	/* task throttle bandwidth */
+		  __entry->dirtied,
+		  __entry->dirtied_pause,
+		  __entry->period,	/* ms */
+		  __entry->think,	/* ms */
+		  __entry->pause,	/* ms */
+		  __entry->paused	/* ms */
+		  )
+);
+
 DECLARE_EVENT_CLASS(writeback_congest_waited_template,
 
 	TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed),
--- linux-next.orig/mm/page-writeback.c	2011-04-16 11:28:27.000000000 +0800
+++ linux-next/mm/page-writeback.c	2011-04-16 11:28:28.000000000 +0800
@@ -1163,6 +1163,16 @@ static void balance_dirty_pages(struct a
 		 * it may be a light dirtier.
 		 */
 		if (unlikely(-pause < HZ*10)) {
+			trace_balance_dirty_pages(bdi,
+						  dirty_thresh,
+						  nr_dirty,
+						  bdi_dirty,
+						  base_bw,
+						  bw,
+						  pages_dirtied,
+						  period,
+						  pause,
+						  start_time);
 			if (-pause > HZ/2) {
 				current->paused_when = now;
 				current->nr_dirtied = 0;
@@ -1176,6 +1186,16 @@ static void balance_dirty_pages(struct a
 		pause = min(pause, pause_max);
 
 pause:
+		trace_balance_dirty_pages(bdi,
+					  dirty_thresh,
+					  nr_dirty,
+					  bdi_dirty,
+					  base_bw,
+					  bw,
+					  pages_dirtied,
+					  period,
+					  pause,
+					  start_time);
 		current->paused_when = now;
 		__set_current_state(TASK_UNINTERRUPTIBLE);
 		io_schedule_timeout(pause);



^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH 12/12] writeback: trace global_dirty_state
  2011-04-16 13:25 [PATCH 00/12] IO-less dirty throttling v7 Wu Fengguang
                   ` (10 preceding siblings ...)
  2011-04-16 13:25 ` [PATCH 11/12] writeback: trace balance_dirty_pages Wu Fengguang
@ 2011-04-16 13:25 ` Wu Fengguang
  2011-04-16 16:27 ` [PATCH 00/12] IO-less dirty throttling v7 Sedat Dilek
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 29+ messages in thread
From: Wu Fengguang @ 2011-04-16 13:25 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Jan Kara, Wu Fengguang, Christoph Hellwig, Trond Myklebust,
	Dave Chinner, Theodore Ts'o, Chris Mason, Peter Zijlstra,
	Mel Gorman, Rik van Riel, KOSAKI Motohiro, Greg Thelen,
	Minchan Kim, Vivek Goyal, Andrea Righi, Balbir Singh, linux-mm,
	linux-fsdevel, LKML

[-- Attachment #1: writeback-trace-global-dirty-states.patch --]
[-- Type: text/plain, Size: 2475 bytes --]

Add trace balance_dirty_state for showing the global dirty page counts
and thresholds at each balance_dirty_pages() loop.

Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 include/trace/events/writeback.h |   48 +++++++++++++++++++++++++++++
 mm/page-writeback.c              |    1 
 2 files changed, 49 insertions(+)

--- linux-next.orig/mm/page-writeback.c	2011-04-16 11:28:28.000000000 +0800
+++ linux-next/mm/page-writeback.c	2011-04-16 11:28:30.000000000 +0800
@@ -387,6 +387,7 @@ void global_dirty_limits(unsigned long *
 	tsk = current;
 	*pbackground = background;
 	*pdirty = dirty;
+	trace_global_dirty_state(background, dirty);
 }
 
 /**
--- linux-next.orig/include/trace/events/writeback.h	2011-04-16 11:28:28.000000000 +0800
+++ linux-next/include/trace/events/writeback.h	2011-04-16 11:28:30.000000000 +0800
@@ -277,6 +277,54 @@ TRACE_EVENT(balance_dirty_pages,
 		  )
 );
 
+TRACE_EVENT(global_dirty_state,
+
+	TP_PROTO(unsigned long background_thresh,
+		 unsigned long dirty_thresh
+	),
+
+	TP_ARGS(background_thresh,
+		dirty_thresh
+	),
+
+	TP_STRUCT__entry(
+		__field(unsigned long,	nr_dirty)
+		__field(unsigned long,	nr_writeback)
+		__field(unsigned long,	nr_unstable)
+		__field(unsigned long,	background_thresh)
+		__field(unsigned long,	dirty_thresh)
+		__field(unsigned long,	dirty_limit)
+		__field(unsigned long,	nr_dirtied)
+		__field(unsigned long,	nr_written)
+	),
+
+	TP_fast_assign(
+		__entry->nr_dirty	= global_page_state(NR_FILE_DIRTY);
+		__entry->nr_writeback	= global_page_state(NR_WRITEBACK);
+		__entry->nr_unstable	= global_page_state(NR_UNSTABLE_NFS);
+		__entry->nr_dirtied	= global_page_state(NR_DIRTIED);
+		__entry->nr_written	= global_page_state(NR_WRITTEN);
+		__entry->background_thresh = background_thresh;
+		__entry->dirty_thresh	= dirty_thresh;
+		__entry->dirty_limit = default_backing_dev_info.dirty_threshold;
+	),
+
+	TP_printk("dirty=%lu writeback=%lu unstable=%lu "
+		  "bg_thresh=%lu thresh=%lu limit=%lu gap=%ld "
+		  "dirtied=%lu written=%lu",
+		  __entry->nr_dirty,
+		  __entry->nr_writeback,
+		  __entry->nr_unstable,
+		  __entry->background_thresh,
+		  __entry->dirty_thresh,
+		  __entry->dirty_limit,
+		  __entry->dirty_thresh - __entry->nr_dirty -
+		  __entry->nr_writeback - __entry->nr_unstable,
+		  __entry->nr_dirtied,
+		  __entry->nr_written
+	)
+);
+
 DECLARE_EVENT_CLASS(writeback_congest_waited_template,
 
 	TP_PROTO(unsigned int usec_timeout, unsigned int usec_delayed),



^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 00/12] IO-less dirty throttling v7
  2011-04-16 13:25 [PATCH 00/12] IO-less dirty throttling v7 Wu Fengguang
                   ` (11 preceding siblings ...)
  2011-04-16 13:25 ` [PATCH 12/12] writeback: trace global_dirty_state Wu Fengguang
@ 2011-04-16 16:27 ` Sedat Dilek
  2011-04-17  1:44   ` Wu Fengguang
  2011-04-17  7:31 ` Marco Stornelli
  2011-04-26 17:19 ` Vivek Goyal
  14 siblings, 1 reply; 29+ messages in thread
From: Sedat Dilek @ 2011-04-16 16:27 UTC (permalink / raw)
  To: Wu Fengguang
  Cc: Andrew Morton, Jan Kara, Christoph Hellwig, Trond Myklebust,
	Dave Chinner, Theodore Ts'o, Chris Mason, Peter Zijlstra,
	Mel Gorman, Rik van Riel, KOSAKI Motohiro, Greg Thelen,
	Minchan Kim, Vivek Goyal, Andrea Righi, Balbir Singh, linux-mm,
	linux-fsdevel, LKML

[-- Attachment #1: Type: text/plain, Size: 3195 bytes --]

On Sat, Apr 16, 2011 at 3:25 PM, Wu Fengguang <fengguang.wu@intel.com> wrote:
> Andrew,
>
> This revision undergoes a number of simplifications, cleanups and fixes.
> Independent patches are separated out. The core patches (07, 08) now have
> easier to understand changelog. Detailed rationals can be found in patch 08.
>
> In response to the complexity complaints, an introduction document is
> written explaining the rationals, algorithm and visual case studies:
>
> http://www.kernel.org/pub/linux/kernel/people/wfg/writeback/slides/smooth-dirty-throttling.pdf
>
> The full patchset is accessible in
>
> git://git.kernel.org/pub/scm/linux/kernel/git/wfg/writeback.git dirty-throttling-v7
>
> Questions, reviews and independent tests will be highly appreciated.
>
> supporting functionalities
>
>        [PATCH 01/12] writeback: account per-bdi accumulated written pages
>        [PATCH 02/12] writeback: account per-bdi accumulated dirtied pages
>        [PATCH 03/12] writeback: bdi write bandwidth estimation
>        [PATCH 04/12] writeback: smoothed global/bdi dirty pages
>        [PATCH 05/12] writeback: smoothed dirty threshold and limit
>        [PATCH 06/12] writeback: enforce 1/4 gap between the dirty/background thresholds
>
> core changes
>
>        [PATCH 07/12] writeback: base throttle bandwidth and position ratio
>        [PATCH 08/12] writeback: IO-less balance_dirty_pages()
>
> tracing
>
>        [PATCH 09/12] writeback: show bdi write bandwidth in debugfs
>        [PATCH 10/12] writeback: trace dirty_ratelimit
>        [PATCH 11/12] writeback: trace balance_dirty_pages
>        [PATCH 12/12] writeback: trace global_dirty_state
>
>  fs/fs-writeback.c                |    3
>  include/linux/backing-dev.h      |   23
>  include/linux/sched.h            |    8
>  include/linux/writeback.h        |   49 +
>  include/trace/events/writeback.h |  179 +++++
>  mm/backing-dev.c                 |   51 +
>  mm/memory_hotplug.c              |    3
>  mm/page-writeback.c              |  980 +++++++++++++++++++++++------
>  8 files changed, 1085 insertions(+), 211 deletions(-)
>
> Thanks,
> Fengguang
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

I pulled your tree into linux-next (next-20110415) on an i386 Debian host.

My build breaks here:
...
  MODPOST vmlinux.o
  GEN     .version
  CHK     include/generated/compile.h
  UPD     include/generated/compile.h
  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1
mm/built-in.o: In function `bdi_position_ratio':
page-writeback.c:(.text+0x5c83): undefined reference to `__udivdi3'
mm/built-in.o: In function `calc_period_shift.part.10':
page-writeback.c:(.text+0x6446): undefined reference to `____ilog2_NaN'
make[4]: *** [.tmp_vmlinux1] Error

BTW, which kernel-config options have to be set besides
CONFIG_BLK_DEV_THROTTLING=y?

- Sedat -

[-- Attachment #2: config_writeback-dirty-throttling-v7.txt --]
[-- Type: text/plain, Size: 88038 bytes --]

#
# Automatically generated make config: don't edit
# Linux/x86 2.6.39-rc3 Kernel Configuration
# Sat Apr 16 17:44:31 2011
#
# CONFIG_64BIT is not set
CONFIG_X86_32=y
# CONFIG_X86_64 is not set
CONFIG_X86=y
CONFIG_INSTRUCTION_DECODER=y
CONFIG_OUTPUT_FORMAT="elf32-i386"
CONFIG_ARCH_DEFCONFIG="arch/x86/configs/i386_defconfig"
CONFIG_GENERIC_CMOS_UPDATE=y
CONFIG_CLOCKSOURCE_WATCHDOG=y
CONFIG_GENERIC_CLOCKEVENTS=y
CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
CONFIG_LOCKDEP_SUPPORT=y
CONFIG_STACKTRACE_SUPPORT=y
CONFIG_HAVE_LATENCYTOP_SUPPORT=y
CONFIG_MMU=y
CONFIG_ZONE_DMA=y
CONFIG_NEED_DMA_MAP_STATE=y
CONFIG_NEED_SG_DMA_LENGTH=y
CONFIG_GENERIC_ISA_DMA=y
CONFIG_GENERIC_IOMAP=y
CONFIG_GENERIC_BUG=y
CONFIG_GENERIC_HWEIGHT=y
CONFIG_GENERIC_GPIO=y
CONFIG_ARCH_MAY_HAVE_PC_FDC=y
# CONFIG_RWSEM_GENERIC_SPINLOCK is not set
CONFIG_RWSEM_XCHGADD_ALGORITHM=y
CONFIG_ARCH_HAS_CPU_IDLE_WAIT=y
CONFIG_GENERIC_CALIBRATE_DELAY=y
# CONFIG_GENERIC_TIME_VSYSCALL is not set
CONFIG_ARCH_HAS_CPU_RELAX=y
CONFIG_ARCH_HAS_DEFAULT_IDLE=y
CONFIG_ARCH_HAS_CACHE_LINE_SIZE=y
CONFIG_HAVE_SETUP_PER_CPU_AREA=y
CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
# CONFIG_HAVE_CPUMASK_OF_CPU_MAP is not set
CONFIG_ARCH_HIBERNATION_POSSIBLE=y
CONFIG_ARCH_SUSPEND_POSSIBLE=y
# CONFIG_ZONE_DMA32 is not set
CONFIG_ARCH_POPULATES_NODE_MAP=y
# CONFIG_AUDIT_ARCH is not set
CONFIG_ARCH_SUPPORTS_OPTIMIZED_INLINING=y
CONFIG_ARCH_SUPPORTS_DEBUG_PAGEALLOC=y
CONFIG_HAVE_INTEL_TXT=y
CONFIG_X86_32_SMP=y
CONFIG_X86_HT=y
CONFIG_ARCH_HWEIGHT_CFLAGS="-fcall-saved-ecx -fcall-saved-edx"
CONFIG_KTIME_SCALAR=y
CONFIG_ARCH_CPU_PROBE_RELEASE=y
CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
CONFIG_CONSTRUCTORS=y
CONFIG_HAVE_IRQ_WORK=y
CONFIG_IRQ_WORK=y

#
# General setup
#
CONFIG_EXPERIMENTAL=y
CONFIG_INIT_ENV_ARG_LIMIT=32
CONFIG_CROSS_COMPILE=""
CONFIG_LOCALVERSION=""
# CONFIG_LOCALVERSION_AUTO is not set
CONFIG_HAVE_KERNEL_GZIP=y
CONFIG_HAVE_KERNEL_BZIP2=y
CONFIG_HAVE_KERNEL_LZMA=y
CONFIG_HAVE_KERNEL_XZ=y
CONFIG_HAVE_KERNEL_LZO=y
CONFIG_KERNEL_GZIP=y
# CONFIG_KERNEL_BZIP2 is not set
# CONFIG_KERNEL_LZMA is not set
# CONFIG_KERNEL_XZ is not set
# CONFIG_KERNEL_LZO is not set
CONFIG_SWAP=y
CONFIG_SYSVIPC=y
CONFIG_SYSVIPC_SYSCTL=y
CONFIG_POSIX_MQUEUE=y
CONFIG_POSIX_MQUEUE_SYSCTL=y
CONFIG_BSD_PROCESS_ACCT=y
CONFIG_BSD_PROCESS_ACCT_V3=y
# CONFIG_FHANDLE is not set
CONFIG_TASKSTATS=y
CONFIG_TASK_DELAY_ACCT=y
CONFIG_TASK_XACCT=y
CONFIG_TASK_IO_ACCOUNTING=y
CONFIG_AUDIT=y
CONFIG_AUDITSYSCALL=y
CONFIG_AUDIT_WATCH=y
CONFIG_AUDIT_TREE=y
CONFIG_HAVE_GENERIC_HARDIRQS=y

#
# IRQ subsystem
#
CONFIG_GENERIC_HARDIRQS=y
CONFIG_HAVE_SPARSE_IRQ=y
CONFIG_GENERIC_IRQ_PROBE=y
CONFIG_GENERIC_IRQ_SHOW=y
CONFIG_GENERIC_PENDING_IRQ=y
CONFIG_IRQ_FORCED_THREADING=y
# CONFIG_SPARSE_IRQ is not set

#
# RCU Subsystem
#
CONFIG_TREE_RCU=y
# CONFIG_PREEMPT_RCU is not set
CONFIG_RCU_TRACE=y
CONFIG_RCU_FANOUT=32
# CONFIG_RCU_FANOUT_EXACT is not set
CONFIG_RCU_FAST_NO_HZ=y
CONFIG_TREE_RCU_TRACE=y
CONFIG_IKCONFIG=m
# CONFIG_IKCONFIG_PROC is not set
CONFIG_LOG_BUF_SHIFT=17
CONFIG_HAVE_UNSTABLE_SCHED_CLOCK=y
CONFIG_CGROUPS=y
CONFIG_CGROUP_DEBUG=y
CONFIG_CGROUP_NS=y
CONFIG_CGROUP_FREEZER=y
CONFIG_CGROUP_DEVICE=y
CONFIG_CPUSETS=y
CONFIG_PROC_PID_CPUSET=y
CONFIG_CGROUP_CPUACCT=y
# CONFIG_RESOURCE_COUNTERS is not set
# CONFIG_CGROUP_PERF is not set
CONFIG_CGROUP_SCHED=y
CONFIG_FAIR_GROUP_SCHED=y
# CONFIG_RT_GROUP_SCHED is not set
CONFIG_BLK_CGROUP=y
CONFIG_DEBUG_BLK_CGROUP=y
CONFIG_NAMESPACES=y
CONFIG_UTS_NS=y
CONFIG_IPC_NS=y
CONFIG_USER_NS=y
CONFIG_PID_NS=y
CONFIG_NET_NS=y
# CONFIG_SCHED_AUTOGROUP is not set
CONFIG_SCHED_TTWU_QUEUE=y
# CONFIG_SYSFS_DEPRECATED is not set
CONFIG_RELAY=y
CONFIG_BLK_DEV_INITRD=y
CONFIG_INITRAMFS_SOURCE=""
CONFIG_RD_GZIP=y
CONFIG_RD_BZIP2=y
CONFIG_RD_LZMA=y
CONFIG_RD_XZ=y
CONFIG_RD_LZO=y
CONFIG_CC_OPTIMIZE_FOR_SIZE=y
CONFIG_SYSCTL=y
CONFIG_ANON_INODES=y
# CONFIG_EXPERT is not set
# CONFIG_EMBEDDED is not set
CONFIG_UID16=y
CONFIG_SYSCTL_SYSCALL=y
CONFIG_KALLSYMS=y
# CONFIG_KALLSYMS_ALL is not set
# CONFIG_KALLSYMS_EXTRA_PASS is not set
CONFIG_HOTPLUG=y
CONFIG_PRINTK=y
CONFIG_BUG=y
CONFIG_ELF_CORE=y
CONFIG_PCSPKR_PLATFORM=y
CONFIG_BASE_FULL=y
CONFIG_FUTEX=y
CONFIG_EPOLL=y
CONFIG_SIGNALFD=y
CONFIG_TIMERFD=y
CONFIG_EVENTFD=y
CONFIG_SHMEM=y
CONFIG_AIO=y
CONFIG_HAVE_PERF_EVENTS=y

#
# Kernel Performance Events And Counters
#
CONFIG_PERF_EVENTS=y
# CONFIG_PERF_COUNTERS is not set
# CONFIG_DEBUG_PERF_USE_VMALLOC is not set
CONFIG_VM_EVENT_COUNTERS=y
CONFIG_PCI_QUIRKS=y
CONFIG_SLUB_DEBUG=y
# CONFIG_COMPAT_BRK is not set
# CONFIG_SLAB is not set
CONFIG_SLUB=y
CONFIG_PROFILING=y
CONFIG_TRACEPOINTS=y
# CONFIG_OPROFILE is not set
CONFIG_HAVE_OPROFILE=y
CONFIG_KPROBES=y
# CONFIG_JUMP_LABEL is not set
CONFIG_OPTPROBES=y
CONFIG_HAVE_EFFICIENT_UNALIGNED_ACCESS=y
CONFIG_KRETPROBES=y
CONFIG_HAVE_IOREMAP_PROT=y
CONFIG_HAVE_KPROBES=y
CONFIG_HAVE_KRETPROBES=y
CONFIG_HAVE_OPTPROBES=y
CONFIG_HAVE_ARCH_TRACEHOOK=y
CONFIG_HAVE_DMA_ATTRS=y
CONFIG_USE_GENERIC_SMP_HELPERS=y
CONFIG_HAVE_REGS_AND_STACK_ACCESS_API=y
CONFIG_HAVE_DMA_API_DEBUG=y
CONFIG_HAVE_HW_BREAKPOINT=y
CONFIG_HAVE_MIXED_BREAKPOINTS_REGS=y
CONFIG_HAVE_USER_RETURN_NOTIFIER=y
CONFIG_HAVE_PERF_EVENTS_NMI=y
CONFIG_HAVE_ARCH_JUMP_LABEL=y

#
# GCOV-based kernel profiling
#
# CONFIG_GCOV_KERNEL is not set
CONFIG_HAVE_GENERIC_DMA_COHERENT=y
CONFIG_SLABINFO=y
CONFIG_RT_MUTEXES=y
CONFIG_BASE_SMALL=0
CONFIG_MODULES=y
CONFIG_MODULE_FORCE_LOAD=y
CONFIG_MODULE_UNLOAD=y
CONFIG_MODULE_FORCE_UNLOAD=y
CONFIG_MODVERSIONS=y
# CONFIG_MODULE_SRCVERSION_ALL is not set
CONFIG_STOP_MACHINE=y
CONFIG_BLOCK=y
CONFIG_LBDAF=y
CONFIG_BLK_DEV_BSG=y
CONFIG_BLK_DEV_INTEGRITY=y
CONFIG_BLK_DEV_THROTTLING=y

#
# IO Schedulers
#
CONFIG_IOSCHED_NOOP=y
CONFIG_IOSCHED_DEADLINE=y
CONFIG_IOSCHED_CFQ=y
CONFIG_CFQ_GROUP_IOSCHED=y
# CONFIG_DEFAULT_DEADLINE is not set
CONFIG_DEFAULT_CFQ=y
# CONFIG_DEFAULT_NOOP is not set
CONFIG_DEFAULT_IOSCHED="cfq"
# CONFIG_INLINE_SPIN_TRYLOCK is not set
# CONFIG_INLINE_SPIN_TRYLOCK_BH is not set
# CONFIG_INLINE_SPIN_LOCK is not set
# CONFIG_INLINE_SPIN_LOCK_BH is not set
# CONFIG_INLINE_SPIN_LOCK_IRQ is not set
# CONFIG_INLINE_SPIN_LOCK_IRQSAVE is not set
CONFIG_INLINE_SPIN_UNLOCK=y
# CONFIG_INLINE_SPIN_UNLOCK_BH is not set
CONFIG_INLINE_SPIN_UNLOCK_IRQ=y
# CONFIG_INLINE_SPIN_UNLOCK_IRQRESTORE is not set
# CONFIG_INLINE_READ_TRYLOCK is not set
# CONFIG_INLINE_READ_LOCK is not set
# CONFIG_INLINE_READ_LOCK_BH is not set
# CONFIG_INLINE_READ_LOCK_IRQ is not set
# CONFIG_INLINE_READ_LOCK_IRQSAVE is not set
CONFIG_INLINE_READ_UNLOCK=y
# CONFIG_INLINE_READ_UNLOCK_BH is not set
CONFIG_INLINE_READ_UNLOCK_IRQ=y
# CONFIG_INLINE_READ_UNLOCK_IRQRESTORE is not set
# CONFIG_INLINE_WRITE_TRYLOCK is not set
# CONFIG_INLINE_WRITE_LOCK is not set
# CONFIG_INLINE_WRITE_LOCK_BH is not set
# CONFIG_INLINE_WRITE_LOCK_IRQ is not set
# CONFIG_INLINE_WRITE_LOCK_IRQSAVE is not set
CONFIG_INLINE_WRITE_UNLOCK=y
# CONFIG_INLINE_WRITE_UNLOCK_BH is not set
CONFIG_INLINE_WRITE_UNLOCK_IRQ=y
# CONFIG_INLINE_WRITE_UNLOCK_IRQRESTORE is not set
CONFIG_MUTEX_SPIN_ON_OWNER=y
CONFIG_FREEZER=y

#
# Processor type and features
#
CONFIG_TICK_ONESHOT=y
CONFIG_NO_HZ=y
CONFIG_HIGH_RES_TIMERS=y
CONFIG_GENERIC_CLOCKEVENTS_BUILD=y
CONFIG_SMP=y
CONFIG_X86_MPPARSE=y
CONFIG_X86_BIGSMP=y
# CONFIG_X86_EXTENDED_PLATFORM is not set
CONFIG_X86_SUPPORTS_MEMORY_FAILURE=y
# CONFIG_X86_32_IRIS is not set
CONFIG_SCHED_OMIT_FRAME_POINTER=y
CONFIG_PARAVIRT_GUEST=y
# CONFIG_XEN_PRIVILEGED_GUEST is not set
CONFIG_KVM_CLOCK=y
CONFIG_KVM_GUEST=y
CONFIG_LGUEST_GUEST=y
CONFIG_PARAVIRT=y
# CONFIG_PARAVIRT_SPINLOCKS is not set
CONFIG_PARAVIRT_CLOCK=y
# CONFIG_PARAVIRT_DEBUG is not set
CONFIG_NO_BOOTMEM=y
# CONFIG_MEMTEST is not set
# CONFIG_M386 is not set
# CONFIG_M486 is not set
# CONFIG_M586 is not set
# CONFIG_M586TSC is not set
# CONFIG_M586MMX is not set
CONFIG_M686=y
# CONFIG_MPENTIUMII is not set
# CONFIG_MPENTIUMIII is not set
# CONFIG_MPENTIUMM is not set
# CONFIG_MPENTIUM4 is not set
# CONFIG_MK6 is not set
# CONFIG_MK7 is not set
# CONFIG_MK8 is not set
# CONFIG_MCRUSOE is not set
# CONFIG_MEFFICEON is not set
# CONFIG_MWINCHIPC6 is not set
# CONFIG_MWINCHIP3D is not set
# CONFIG_MELAN is not set
# CONFIG_MGEODEGX1 is not set
# CONFIG_MGEODE_LX is not set
# CONFIG_MCYRIXIII is not set
# CONFIG_MVIAC3_2 is not set
# CONFIG_MVIAC7 is not set
# CONFIG_MCORE2 is not set
# CONFIG_MATOM is not set
CONFIG_X86_GENERIC=y
CONFIG_X86_INTERNODE_CACHE_SHIFT=6
CONFIG_X86_CMPXCHG=y
CONFIG_CMPXCHG_LOCAL=y
CONFIG_X86_L1_CACHE_SHIFT=6
CONFIG_X86_XADD=y
# CONFIG_X86_PPRO_FENCE is not set
CONFIG_X86_WP_WORKS_OK=y
CONFIG_X86_INVLPG=y
CONFIG_X86_BSWAP=y
CONFIG_X86_POPAD_OK=y
CONFIG_X86_INTEL_USERCOPY=y
CONFIG_X86_USE_PPRO_CHECKSUM=y
CONFIG_X86_TSC=y
CONFIG_X86_CMPXCHG64=y
CONFIG_X86_CMOV=y
CONFIG_X86_MINIMUM_CPU_FAMILY=5
CONFIG_X86_DEBUGCTLMSR=y
CONFIG_CPU_SUP_INTEL=y
CONFIG_CPU_SUP_CYRIX_32=y
CONFIG_CPU_SUP_AMD=y
CONFIG_CPU_SUP_CENTAUR=y
CONFIG_CPU_SUP_TRANSMETA_32=y
CONFIG_CPU_SUP_UMC_32=y
CONFIG_HPET_TIMER=y
CONFIG_HPET_EMULATE_RTC=y
CONFIG_DMI=y
# CONFIG_IOMMU_HELPER is not set
CONFIG_IOMMU_API=y
CONFIG_NR_CPUS=32
CONFIG_SCHED_SMT=y
CONFIG_SCHED_MC=y
# CONFIG_IRQ_TIME_ACCOUNTING is not set
# CONFIG_PREEMPT_NONE is not set
CONFIG_PREEMPT_VOLUNTARY=y
# CONFIG_PREEMPT is not set
CONFIG_X86_LOCAL_APIC=y
CONFIG_X86_IO_APIC=y
CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
CONFIG_X86_MCE=y
CONFIG_X86_MCE_INTEL=y
CONFIG_X86_MCE_AMD=y
# CONFIG_X86_ANCIENT_MCE is not set
CONFIG_X86_MCE_THRESHOLD=y
# CONFIG_X86_MCE_INJECT is not set
CONFIG_X86_THERMAL_VECTOR=y
CONFIG_VM86=y
# CONFIG_TOSHIBA is not set
# CONFIG_I8K is not set
CONFIG_X86_REBOOTFIXUPS=y
# CONFIG_MICROCODE is not set
# CONFIG_X86_MSR is not set
# CONFIG_X86_CPUID is not set
# CONFIG_NOHIGHMEM is not set
CONFIG_HIGHMEM4G=y
# CONFIG_HIGHMEM64G is not set
CONFIG_PAGE_OFFSET=0xC0000000
CONFIG_HIGHMEM=y
# CONFIG_ARCH_PHYS_ADDR_T_64BIT is not set
# CONFIG_ARCH_DMA_ADDR_T_64BIT is not set
CONFIG_ARCH_FLATMEM_ENABLE=y
CONFIG_ARCH_SPARSEMEM_ENABLE=y
CONFIG_ARCH_SELECT_MEMORY_MODEL=y
CONFIG_ILLEGAL_POINTER_VALUE=0
CONFIG_SELECT_MEMORY_MODEL=y
CONFIG_FLATMEM_MANUAL=y
# CONFIG_SPARSEMEM_MANUAL is not set
CONFIG_FLATMEM=y
CONFIG_FLAT_NODE_MEM_MAP=y
CONFIG_SPARSEMEM_STATIC=y
CONFIG_HAVE_MEMBLOCK=y
CONFIG_PAGEFLAGS_EXTENDED=y
CONFIG_SPLIT_PTLOCK_CPUS=4
CONFIG_COMPACTION=y
CONFIG_MIGRATION=y
# CONFIG_PHYS_ADDR_T_64BIT is not set
CONFIG_ZONE_DMA_FLAG=1
CONFIG_BOUNCE=y
CONFIG_VIRT_TO_BUS=y
CONFIG_KSM=y
CONFIG_DEFAULT_MMAP_MIN_ADDR=65536
CONFIG_ARCH_SUPPORTS_MEMORY_FAILURE=y
CONFIG_MEMORY_FAILURE=y
# CONFIG_HWPOISON_INJECT is not set
# CONFIG_TRANSPARENT_HUGEPAGE is not set
CONFIG_CLEANCACHE=y
CONFIG_HIGHPTE=y
# CONFIG_X86_CHECK_BIOS_CORRUPTION is not set
CONFIG_X86_RESERVE_LOW=64
# CONFIG_MATH_EMULATION is not set
CONFIG_MTRR=y
CONFIG_MTRR_SANITIZER=y
CONFIG_MTRR_SANITIZER_ENABLE_DEFAULT=0
CONFIG_MTRR_SANITIZER_SPARE_REG_NR_DEFAULT=1
CONFIG_X86_PAT=y
CONFIG_ARCH_USES_PG_UNCACHED=y
CONFIG_EFI=y
CONFIG_SECCOMP=y
CONFIG_CC_STACKPROTECTOR=y
# CONFIG_HZ_100 is not set
CONFIG_HZ_250=y
# CONFIG_HZ_300 is not set
# CONFIG_HZ_1000 is not set
CONFIG_HZ=250
CONFIG_SCHED_HRTICK=y
CONFIG_KEXEC=y
# CONFIG_CRASH_DUMP is not set
CONFIG_PHYSICAL_START=0x1000000
CONFIG_RELOCATABLE=y
CONFIG_X86_NEED_RELOCS=y
CONFIG_PHYSICAL_ALIGN=0x1000000
CONFIG_HOTPLUG_CPU=y
# CONFIG_COMPAT_VDSO is not set
# CONFIG_CMDLINE_BOOL is not set
CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y

#
# Power management and ACPI options
#
CONFIG_SUSPEND=y
CONFIG_SUSPEND_FREEZER=y
# CONFIG_HIBERNATION is not set
CONFIG_PM_SLEEP=y
CONFIG_PM_SLEEP_SMP=y
CONFIG_PM_RUNTIME=y
CONFIG_PM=y
CONFIG_PM_DEBUG=y
# CONFIG_PM_VERBOSE is not set
CONFIG_PM_ADVANCED_DEBUG=y
# CONFIG_PM_TEST_SUSPEND is not set
CONFIG_CAN_PM_TRACE=y
# CONFIG_PM_TRACE_RTC is not set
CONFIG_ACPI=y
CONFIG_ACPI_SLEEP=y
# CONFIG_ACPI_PROCFS is not set
# CONFIG_ACPI_PROCFS_POWER is not set
# CONFIG_ACPI_POWER_METER is not set
# CONFIG_ACPI_EC_DEBUGFS is not set
# CONFIG_ACPI_PROC_EVENT is not set
CONFIG_ACPI_AC=m
CONFIG_ACPI_BATTERY=m
CONFIG_ACPI_BUTTON=m
CONFIG_ACPI_VIDEO=m
# CONFIG_ACPI_FAN is not set
CONFIG_ACPI_DOCK=y
CONFIG_ACPI_PROCESSOR=m
CONFIG_ACPI_HOTPLUG_CPU=y
# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set
CONFIG_ACPI_THERMAL=m
# CONFIG_ACPI_CUSTOM_DSDT is not set
CONFIG_ACPI_BLACKLIST_YEAR=0
# CONFIG_ACPI_DEBUG is not set
# CONFIG_ACPI_PCI_SLOT is not set
CONFIG_X86_PM_TIMER=y
CONFIG_ACPI_CONTAINER=m
# CONFIG_ACPI_SBS is not set
# CONFIG_ACPI_HED is not set
CONFIG_ACPI_APEI=y
# CONFIG_ACPI_APEI_GHES is not set
# CONFIG_ACPI_APEI_PCIEAER is not set
# CONFIG_ACPI_APEI_EINJ is not set
# CONFIG_ACPI_APEI_ERST_DEBUG is not set
CONFIG_SFI=y
# CONFIG_APM is not set

#
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
# CONFIG_CPU_FREQ_DEBUG is not set
CONFIG_CPU_FREQ_STAT=m
# CONFIG_CPU_FREQ_STAT_DETAILS is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
CONFIG_CPU_FREQ_GOV_USERSPACE=m
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m

#
# CPUFreq processor drivers
#
# CONFIG_X86_PCC_CPUFREQ is not set
CONFIG_X86_ACPI_CPUFREQ=m
# CONFIG_X86_POWERNOW_K6 is not set
# CONFIG_X86_POWERNOW_K7 is not set
CONFIG_X86_POWERNOW_K8=m
# CONFIG_X86_GX_SUSPMOD is not set
# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
# CONFIG_X86_SPEEDSTEP_ICH is not set
# CONFIG_X86_SPEEDSTEP_SMI is not set
# CONFIG_X86_P4_CLOCKMOD is not set
# CONFIG_X86_CPUFREQ_NFORCE2 is not set
# CONFIG_X86_LONGRUN is not set
# CONFIG_X86_LONGHAUL is not set
# CONFIG_X86_E_POWERSAVER is not set

#
# shared options
#
# CONFIG_X86_SPEEDSTEP_LIB is not set
CONFIG_CPU_IDLE=y
CONFIG_CPU_IDLE_GOV_LADDER=y
CONFIG_CPU_IDLE_GOV_MENU=y
# CONFIG_INTEL_IDLE is not set

#
# Bus options (PCI etc.)
#
CONFIG_PCI=y
# CONFIG_PCI_GOBIOS is not set
# CONFIG_PCI_GOMMCONFIG is not set
# CONFIG_PCI_GODIRECT is not set
CONFIG_PCI_GOANY=y
CONFIG_PCI_BIOS=y
CONFIG_PCI_DIRECT=y
CONFIG_PCI_MMCONFIG=y
CONFIG_PCI_DOMAINS=y
# CONFIG_PCI_CNB20LE_QUIRK is not set
CONFIG_DMAR=y
# CONFIG_DMAR_DEFAULT_ON is not set
CONFIG_DMAR_FLOPPY_WA=y
CONFIG_PCIEPORTBUS=y
# CONFIG_HOTPLUG_PCI_PCIE is not set
CONFIG_PCIEAER=y
# CONFIG_PCIE_ECRC is not set
# CONFIG_PCIEAER_INJECT is not set
CONFIG_PCIEASPM=y
# CONFIG_PCIEASPM_DEBUG is not set
CONFIG_PCIE_PME=y
CONFIG_ARCH_SUPPORTS_MSI=y
CONFIG_PCI_MSI=y
# CONFIG_PCI_DEBUG is not set
# CONFIG_PCI_STUB is not set
CONFIG_HT_IRQ=y
CONFIG_PCI_IOV=y
CONFIG_PCI_IOAPIC=y
CONFIG_PCI_LABEL=y
CONFIG_ISA_DMA_API=y
# CONFIG_ISA is not set
# CONFIG_MCA is not set
# CONFIG_SCx200 is not set
# CONFIG_OLPC is not set
CONFIG_AMD_NB=y
CONFIG_PCCARD=m
CONFIG_PCMCIA=m
CONFIG_PCMCIA_LOAD_CIS=y
CONFIG_CARDBUS=y

#
# PC-card bridges
#
CONFIG_YENTA=m
CONFIG_YENTA_O2=y
CONFIG_YENTA_RICOH=y
CONFIG_YENTA_TI=y
CONFIG_YENTA_ENE_TUNE=y
CONFIG_YENTA_TOSHIBA=y
# CONFIG_PD6729 is not set
# CONFIG_I82092 is not set
CONFIG_PCCARD_NONSTATIC=y
CONFIG_HOTPLUG_PCI=m
# CONFIG_HOTPLUG_PCI_FAKE is not set
# CONFIG_HOTPLUG_PCI_COMPAQ is not set
# CONFIG_HOTPLUG_PCI_IBM is not set
# CONFIG_HOTPLUG_PCI_ACPI is not set
CONFIG_HOTPLUG_PCI_CPCI=y
# CONFIG_HOTPLUG_PCI_CPCI_ZT5550 is not set
# CONFIG_HOTPLUG_PCI_CPCI_GENERIC is not set
CONFIG_HOTPLUG_PCI_SHPC=m
# CONFIG_RAPIDIO is not set

#
# Executable file formats / Emulations
#
CONFIG_BINFMT_ELF=y
CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
CONFIG_HAVE_AOUT=y
# CONFIG_BINFMT_AOUT is not set
CONFIG_BINFMT_MISC=m
CONFIG_HAVE_ATOMIC_IOMAP=y
CONFIG_HAVE_TEXT_POKE_SMP=y
CONFIG_NET=y

#
# Networking options
#
CONFIG_PACKET=y
CONFIG_UNIX=y
CONFIG_XFRM=y
# CONFIG_XFRM_USER is not set
CONFIG_XFRM_SUB_POLICY=y
CONFIG_XFRM_MIGRATE=y
# CONFIG_XFRM_STATISTICS is not set
# CONFIG_NET_KEY is not set
CONFIG_INET=y
CONFIG_IP_MULTICAST=y
CONFIG_IP_ADVANCED_ROUTER=y
# CONFIG_IP_FIB_TRIE_STATS is not set
CONFIG_IP_MULTIPLE_TABLES=y
CONFIG_IP_ROUTE_MULTIPATH=y
CONFIG_IP_ROUTE_VERBOSE=y
# CONFIG_IP_PNP is not set
# CONFIG_NET_IPIP is not set
# CONFIG_NET_IPGRE_DEMUX is not set
CONFIG_IP_MROUTE=y
CONFIG_IP_MROUTE_MULTIPLE_TABLES=y
CONFIG_IP_PIMSM_V1=y
CONFIG_IP_PIMSM_V2=y
# CONFIG_ARPD is not set
CONFIG_SYN_COOKIES=y
# CONFIG_INET_AH is not set
# CONFIG_INET_ESP is not set
# CONFIG_INET_IPCOMP is not set
# CONFIG_INET_XFRM_TUNNEL is not set
# CONFIG_INET_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET_XFRM_MODE_TUNNEL is not set
# CONFIG_INET_XFRM_MODE_BEET is not set
# CONFIG_INET_LRO is not set
# CONFIG_INET_DIAG is not set
CONFIG_TCP_CONG_ADVANCED=y
# CONFIG_TCP_CONG_BIC is not set
CONFIG_TCP_CONG_CUBIC=y
# CONFIG_TCP_CONG_WESTWOOD is not set
# CONFIG_TCP_CONG_HTCP is not set
# CONFIG_TCP_CONG_HSTCP is not set
# CONFIG_TCP_CONG_HYBLA is not set
# CONFIG_TCP_CONG_VEGAS is not set
# CONFIG_TCP_CONG_SCALABLE is not set
# CONFIG_TCP_CONG_LP is not set
# CONFIG_TCP_CONG_VENO is not set
# CONFIG_TCP_CONG_YEAH is not set
# CONFIG_TCP_CONG_ILLINOIS is not set
CONFIG_DEFAULT_CUBIC=y
# CONFIG_DEFAULT_RENO is not set
CONFIG_DEFAULT_TCP_CONG="cubic"
CONFIG_TCP_MD5SIG=y
CONFIG_IPV6=y
CONFIG_IPV6_PRIVACY=y
CONFIG_IPV6_ROUTER_PREF=y
CONFIG_IPV6_ROUTE_INFO=y
CONFIG_IPV6_OPTIMISTIC_DAD=y
# CONFIG_INET6_AH is not set
# CONFIG_INET6_ESP is not set
# CONFIG_INET6_IPCOMP is not set
CONFIG_IPV6_MIP6=y
# CONFIG_INET6_XFRM_TUNNEL is not set
# CONFIG_INET6_TUNNEL is not set
# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
# CONFIG_INET6_XFRM_MODE_BEET is not set
# CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set
# CONFIG_IPV6_SIT is not set
# CONFIG_IPV6_TUNNEL is not set
CONFIG_IPV6_MULTIPLE_TABLES=y
CONFIG_IPV6_SUBTREES=y
CONFIG_IPV6_MROUTE=y
CONFIG_IPV6_MROUTE_MULTIPLE_TABLES=y
CONFIG_IPV6_PIMSM_V2=y
# CONFIG_NETLABEL is not set
CONFIG_NETWORK_SECMARK=y
# CONFIG_NETWORK_PHY_TIMESTAMPING is not set
CONFIG_NETFILTER=y
# CONFIG_NETFILTER_DEBUG is not set
CONFIG_NETFILTER_ADVANCED=y

#
# Core Netfilter Configuration
#
# CONFIG_NETFILTER_NETLINK_QUEUE is not set
# CONFIG_NETFILTER_NETLINK_LOG is not set
# CONFIG_NF_CONNTRACK is not set
# CONFIG_NETFILTER_XTABLES is not set
# CONFIG_IP_VS is not set

#
# IP: Netfilter Configuration
#
# CONFIG_NF_DEFRAG_IPV4 is not set
# CONFIG_IP_NF_QUEUE is not set
# CONFIG_IP_NF_IPTABLES is not set
# CONFIG_IP_NF_ARPTABLES is not set

#
# IPv6: Netfilter Configuration
#
# CONFIG_NF_DEFRAG_IPV6 is not set
# CONFIG_IP6_NF_QUEUE is not set
# CONFIG_IP6_NF_IPTABLES is not set
# CONFIG_IP_DCCP is not set
CONFIG_IP_SCTP=m
# CONFIG_NET_SCTPPROBE is not set
# CONFIG_SCTP_DBG_MSG is not set
# CONFIG_SCTP_DBG_OBJCNT is not set
# CONFIG_SCTP_HMAC_NONE is not set
# CONFIG_SCTP_HMAC_SHA1 is not set
CONFIG_SCTP_HMAC_MD5=y
# CONFIG_RDS is not set
# CONFIG_TIPC is not set
# CONFIG_ATM is not set
# CONFIG_L2TP is not set
# CONFIG_BRIDGE is not set
# CONFIG_NET_DSA is not set
# CONFIG_VLAN_8021Q is not set
# CONFIG_DECNET is not set
CONFIG_LLC=y
# CONFIG_LLC2 is not set
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
# CONFIG_X25 is not set
# CONFIG_LAPB is not set
# CONFIG_ECONET is not set
# CONFIG_WAN_ROUTER is not set
# CONFIG_PHONET is not set
# CONFIG_IEEE802154 is not set
CONFIG_NET_SCHED=y

#
# Queueing/Scheduling
#
# CONFIG_NET_SCH_CBQ is not set
# CONFIG_NET_SCH_HTB is not set
# CONFIG_NET_SCH_HFSC is not set
# CONFIG_NET_SCH_PRIO is not set
# CONFIG_NET_SCH_MULTIQ is not set
# CONFIG_NET_SCH_RED is not set
# CONFIG_NET_SCH_SFB is not set
# CONFIG_NET_SCH_SFQ is not set
# CONFIG_NET_SCH_TEQL is not set
# CONFIG_NET_SCH_TBF is not set
# CONFIG_NET_SCH_GRED is not set
# CONFIG_NET_SCH_DSMARK is not set
# CONFIG_NET_SCH_NETEM is not set
# CONFIG_NET_SCH_DRR is not set
# CONFIG_NET_SCH_MQPRIO is not set
# CONFIG_NET_SCH_CHOKE is not set
# CONFIG_NET_SCH_QFQ is not set
# CONFIG_NET_SCH_INGRESS is not set

#
# Classification
#
CONFIG_NET_CLS=y
# CONFIG_NET_CLS_BASIC is not set
# CONFIG_NET_CLS_TCINDEX is not set
# CONFIG_NET_CLS_ROUTE4 is not set
# CONFIG_NET_CLS_FW is not set
# CONFIG_NET_CLS_U32 is not set
# CONFIG_NET_CLS_RSVP is not set
# CONFIG_NET_CLS_RSVP6 is not set
# CONFIG_NET_CLS_FLOW is not set
CONFIG_NET_CLS_CGROUP=y
CONFIG_NET_EMATCH=y
CONFIG_NET_EMATCH_STACK=32
# CONFIG_NET_EMATCH_CMP is not set
# CONFIG_NET_EMATCH_NBYTE is not set
# CONFIG_NET_EMATCH_U32 is not set
# CONFIG_NET_EMATCH_META is not set
# CONFIG_NET_EMATCH_TEXT is not set
CONFIG_NET_CLS_ACT=y
# CONFIG_NET_ACT_POLICE is not set
# CONFIG_NET_ACT_GACT is not set
# CONFIG_NET_ACT_MIRRED is not set
# CONFIG_NET_ACT_NAT is not set
# CONFIG_NET_ACT_PEDIT is not set
# CONFIG_NET_ACT_SIMP is not set
# CONFIG_NET_ACT_SKBEDIT is not set
# CONFIG_NET_ACT_CSUM is not set
CONFIG_NET_SCH_FIFO=y
CONFIG_DCB=y
CONFIG_DNS_RESOLVER=y
# CONFIG_BATMAN_ADV is not set
CONFIG_RPS=y
CONFIG_RFS_ACCEL=y
CONFIG_XPS=y

#
# Network testing
#
# CONFIG_NET_PKTGEN is not set
# CONFIG_NET_TCPPROBE is not set
CONFIG_NET_DROP_MONITOR=y
CONFIG_HAMRADIO=y

#
# Packet Radio protocols
#
# CONFIG_AX25 is not set
# CONFIG_CAN is not set
CONFIG_IRDA=m

#
# IrDA protocols
#
# CONFIG_IRLAN is not set
# CONFIG_IRCOMM is not set
# CONFIG_IRDA_ULTRA is not set

#
# IrDA options
#
CONFIG_IRDA_CACHE_LAST_LSAP=y
CONFIG_IRDA_FAST_RR=y
# CONFIG_IRDA_DEBUG is not set

#
# Infrared-port device drivers
#

#
# SIR device drivers
#
# CONFIG_IRTTY_SIR is not set

#
# Dongle support
#
# CONFIG_KINGSUN_DONGLE is not set
# CONFIG_KSDAZZLE_DONGLE is not set
# CONFIG_KS959_DONGLE is not set

#
# FIR device drivers
#
# CONFIG_USB_IRDA is not set
# CONFIG_SIGMATEL_FIR is not set
CONFIG_NSC_FIR=m
# CONFIG_WINBOND_FIR is not set
# CONFIG_TOSHIBA_FIR is not set
# CONFIG_SMC_IRCC_FIR is not set
# CONFIG_ALI_FIR is not set
# CONFIG_VLSI_FIR is not set
# CONFIG_VIA_FIR is not set
# CONFIG_MCS_FIR is not set
CONFIG_BT=m
CONFIG_BT_L2CAP=y
CONFIG_BT_SCO=y
CONFIG_BT_RFCOMM=m
CONFIG_BT_RFCOMM_TTY=y
CONFIG_BT_BNEP=m
CONFIG_BT_BNEP_MC_FILTER=y
CONFIG_BT_BNEP_PROTO_FILTER=y
# CONFIG_BT_HIDP is not set

#
# Bluetooth device drivers
#
# CONFIG_BT_HCIBTUSB is not set
# CONFIG_BT_HCIUART is not set
# CONFIG_BT_HCIBCM203X is not set
# CONFIG_BT_HCIBPA10X is not set
# CONFIG_BT_HCIBFUSB is not set
# CONFIG_BT_HCIDTL1 is not set
# CONFIG_BT_HCIBT3C is not set
# CONFIG_BT_HCIBLUECARD is not set
# CONFIG_BT_HCIBTUART is not set
# CONFIG_BT_HCIVHCI is not set
# CONFIG_BT_MRVL is not set
# CONFIG_AF_RXRPC is not set
CONFIG_FIB_RULES=y
CONFIG_WIRELESS=y
CONFIG_WEXT_CORE=y
CONFIG_WEXT_PROC=y
CONFIG_CFG80211=m
# CONFIG_NL80211_TESTMODE is not set
# CONFIG_CFG80211_DEVELOPER_WARNINGS is not set
# CONFIG_CFG80211_REG_DEBUG is not set
CONFIG_CFG80211_DEFAULT_PS=y
# CONFIG_CFG80211_DEBUGFS is not set
# CONFIG_CFG80211_INTERNAL_REGDB is not set
CONFIG_CFG80211_WEXT=y
# CONFIG_WIRELESS_EXT_SYSFS is not set
# CONFIG_LIB80211 is not set
CONFIG_MAC80211=m
CONFIG_MAC80211_HAS_RC=y
CONFIG_MAC80211_RC_MINSTREL=y
CONFIG_MAC80211_RC_MINSTREL_HT=y
CONFIG_MAC80211_RC_DEFAULT_MINSTREL=y
CONFIG_MAC80211_RC_DEFAULT="minstrel_ht"
CONFIG_MAC80211_MESH=y
CONFIG_MAC80211_LEDS=y
# CONFIG_MAC80211_DEBUGFS is not set
# CONFIG_MAC80211_DEBUG_MENU is not set
# CONFIG_WIMAX is not set
CONFIG_RFKILL=m
CONFIG_RFKILL_LEDS=y
CONFIG_RFKILL_INPUT=y
# CONFIG_NET_9P is not set
# CONFIG_CAIF is not set
# CONFIG_CEPH_LIB is not set

#
# Device Drivers
#

#
# Generic Driver Options
#
CONFIG_UEVENT_HELPER_PATH=""
CONFIG_DEVTMPFS=y
# CONFIG_DEVTMPFS_MOUNT is not set
CONFIG_STANDALONE=y
CONFIG_PREVENT_FIRMWARE_BUILD=y
CONFIG_FW_LOADER=y
# CONFIG_FIRMWARE_IN_KERNEL is not set
CONFIG_EXTRA_FIRMWARE=""
# CONFIG_DEBUG_DRIVER is not set
# CONFIG_DEBUG_DEVRES is not set
# CONFIG_SYS_HYPERVISOR is not set
CONFIG_ARCH_NO_SYSDEV_OPS=y
# CONFIG_CONNECTOR is not set
# CONFIG_MTD is not set
CONFIG_PARPORT=m
CONFIG_PARPORT_PC=m
# CONFIG_PARPORT_SERIAL is not set
# CONFIG_PARPORT_PC_FIFO is not set
# CONFIG_PARPORT_PC_SUPERIO is not set
# CONFIG_PARPORT_PC_PCMCIA is not set
# CONFIG_PARPORT_GSC is not set
# CONFIG_PARPORT_AX88796 is not set
CONFIG_PARPORT_1284=y
CONFIG_PNP=y
# CONFIG_PNP_DEBUG_MESSAGES is not set

#
# Protocols
#
CONFIG_PNPACPI=y
CONFIG_BLK_DEV=y
CONFIG_BLK_DEV_FD=m
CONFIG_PARIDE=m

#
# Parallel IDE high-level drivers
#
# CONFIG_PARIDE_PD is not set
CONFIG_PARIDE_PCD=m
# CONFIG_PARIDE_PF is not set
# CONFIG_PARIDE_PT is not set
# CONFIG_PARIDE_PG is not set

#
# Parallel IDE protocol modules
#
# CONFIG_PARIDE_ATEN is not set
# CONFIG_PARIDE_BPCK is not set
# CONFIG_PARIDE_BPCK6 is not set
# CONFIG_PARIDE_COMM is not set
# CONFIG_PARIDE_DSTR is not set
# CONFIG_PARIDE_FIT2 is not set
# CONFIG_PARIDE_FIT3 is not set
# CONFIG_PARIDE_EPAT is not set
# CONFIG_PARIDE_EPIA is not set
# CONFIG_PARIDE_FRIQ is not set
# CONFIG_PARIDE_FRPW is not set
# CONFIG_PARIDE_KBIC is not set
# CONFIG_PARIDE_KTTI is not set
# CONFIG_PARIDE_ON20 is not set
# CONFIG_PARIDE_ON26 is not set
# CONFIG_BLK_CPQ_DA is not set
# CONFIG_BLK_CPQ_CISS_DA is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
# CONFIG_BLK_DEV_COW_COMMON is not set
# CONFIG_BLK_DEV_LOOP is not set

#
# DRBD disabled because PROC_FS, INET or CONNECTOR not selected
#
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_SX8 is not set
# CONFIG_BLK_DEV_UB is not set
# CONFIG_BLK_DEV_RAM is not set
CONFIG_CDROM_PKTCDVD=m
CONFIG_CDROM_PKTCDVD_BUFFERS=8
# CONFIG_CDROM_PKTCDVD_WCACHE is not set
# CONFIG_ATA_OVER_ETH is not set
# CONFIG_VIRTIO_BLK is not set
# CONFIG_BLK_DEV_HD is not set
# CONFIG_BLK_DEV_RBD is not set
# CONFIG_SENSORS_LIS3LV02D is not set
CONFIG_MISC_DEVICES=y
# CONFIG_AD525X_DPOT is not set
# CONFIG_IBM_ASM is not set
# CONFIG_PHANTOM is not set
# CONFIG_SGI_IOC4 is not set
# CONFIG_TIFM_CORE is not set
# CONFIG_ICS932S401 is not set
# CONFIG_ENCLOSURE_SERVICES is not set
# CONFIG_CS5535_MFGPT is not set
# CONFIG_HP_ILO is not set
# CONFIG_APDS9802ALS is not set
# CONFIG_ISL29003 is not set
# CONFIG_ISL29020 is not set
# CONFIG_SENSORS_TSL2550 is not set
# CONFIG_SENSORS_BH1780 is not set
# CONFIG_SENSORS_BH1770 is not set
# CONFIG_SENSORS_APDS990X is not set
# CONFIG_HMC6352 is not set
# CONFIG_DS1682 is not set
# CONFIG_TI_DAC7512 is not set
# CONFIG_VMWARE_BALLOON is not set
# CONFIG_BMP085 is not set
# CONFIG_PCH_PHUB is not set
# CONFIG_C2PORT is not set

#
# EEPROM support
#
# CONFIG_EEPROM_AT24 is not set
# CONFIG_EEPROM_AT25 is not set
# CONFIG_EEPROM_LEGACY is not set
# CONFIG_EEPROM_MAX6875 is not set
# CONFIG_EEPROM_93CX6 is not set
# CONFIG_CB710_CORE is not set

#
# Texas Instruments shared transport line discipline
#
# CONFIG_TI_ST is not set
# CONFIG_SENSORS_LIS3_I2C is not set
CONFIG_HAVE_IDE=y
CONFIG_IDE=m

#
# Please see Documentation/ide/ide.txt for help/info on IDE drives
#
CONFIG_IDE_ATAPI=y
# CONFIG_BLK_DEV_IDE_SATA is not set
# CONFIG_IDE_GD is not set
# CONFIG_BLK_DEV_IDECS is not set
# CONFIG_BLK_DEV_DELKIN is not set
CONFIG_BLK_DEV_IDECD=m
CONFIG_BLK_DEV_IDECD_VERBOSE_ERRORS=y
# CONFIG_BLK_DEV_IDETAPE is not set
# CONFIG_BLK_DEV_IDEACPI is not set
# CONFIG_IDE_TASK_IOCTL is not set
CONFIG_IDE_PROC_FS=y

#
# IDE chipset support/bugfixes
#
# CONFIG_IDE_GENERIC is not set
# CONFIG_BLK_DEV_PLATFORM is not set
# CONFIG_BLK_DEV_CMD640 is not set
# CONFIG_BLK_DEV_IDEPNP is not set

#
# PCI IDE chipsets support
#
# CONFIG_BLK_DEV_GENERIC is not set
# CONFIG_BLK_DEV_OPTI621 is not set
# CONFIG_BLK_DEV_RZ1000 is not set
# CONFIG_BLK_DEV_AEC62XX is not set
# CONFIG_BLK_DEV_ALI15X3 is not set
# CONFIG_BLK_DEV_AMD74XX is not set
# CONFIG_BLK_DEV_ATIIXP is not set
# CONFIG_BLK_DEV_CMD64X is not set
# CONFIG_BLK_DEV_TRIFLEX is not set
# CONFIG_BLK_DEV_CS5520 is not set
# CONFIG_BLK_DEV_CS5530 is not set
# CONFIG_BLK_DEV_CS5535 is not set
# CONFIG_BLK_DEV_CS5536 is not set
# CONFIG_BLK_DEV_HPT366 is not set
# CONFIG_BLK_DEV_JMICRON is not set
# CONFIG_BLK_DEV_SC1200 is not set
# CONFIG_BLK_DEV_PIIX is not set
# CONFIG_BLK_DEV_IT8172 is not set
# CONFIG_BLK_DEV_IT8213 is not set
# CONFIG_BLK_DEV_IT821X is not set
# CONFIG_BLK_DEV_NS87415 is not set
# CONFIG_BLK_DEV_PDC202XX_OLD is not set
# CONFIG_BLK_DEV_PDC202XX_NEW is not set
# CONFIG_BLK_DEV_SVWKS is not set
# CONFIG_BLK_DEV_SIIMAGE is not set
# CONFIG_BLK_DEV_SIS5513 is not set
# CONFIG_BLK_DEV_SLC90E66 is not set
# CONFIG_BLK_DEV_TRM290 is not set
# CONFIG_BLK_DEV_VIA82CXXX is not set
# CONFIG_BLK_DEV_TC86C001 is not set
# CONFIG_BLK_DEV_IDEDMA is not set

#
# SCSI device support
#
CONFIG_SCSI_MOD=m
# CONFIG_RAID_ATTRS is not set
CONFIG_SCSI=m
CONFIG_SCSI_DMA=y
# CONFIG_SCSI_TGT is not set
CONFIG_SCSI_NETLINK=y
# CONFIG_SCSI_PROC_FS is not set

#
# SCSI support type (disk, tape, CD-ROM)
#
CONFIG_BLK_DEV_SD=m
# CONFIG_CHR_DEV_ST is not set
# CONFIG_CHR_DEV_OSST is not set
CONFIG_BLK_DEV_SR=m
CONFIG_BLK_DEV_SR_VENDOR=y
CONFIG_CHR_DEV_SG=m
# CONFIG_CHR_DEV_SCH is not set
CONFIG_SCSI_MULTI_LUN=y
CONFIG_SCSI_CONSTANTS=y
CONFIG_SCSI_LOGGING=y
CONFIG_SCSI_SCAN_ASYNC=y
CONFIG_SCSI_WAIT_SCAN=m

#
# SCSI Transports
#
# CONFIG_SCSI_SPI_ATTRS is not set
CONFIG_SCSI_FC_ATTRS=m
CONFIG_SCSI_ISCSI_ATTRS=m
# CONFIG_SCSI_SAS_ATTRS is not set
# CONFIG_SCSI_SAS_LIBSAS is not set
# CONFIG_SCSI_SRP_ATTRS is not set
CONFIG_SCSI_LOWLEVEL=y
# CONFIG_ISCSI_TCP is not set
# CONFIG_ISCSI_BOOT_SYSFS is not set
CONFIG_SCSI_CXGB3_ISCSI=m
CONFIG_SCSI_CXGB4_ISCSI=m
CONFIG_SCSI_BNX2_ISCSI=m
# CONFIG_SCSI_BNX2X_FCOE is not set
# CONFIG_BE2ISCSI is not set
# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
# CONFIG_SCSI_HPSA is not set
# CONFIG_SCSI_3W_9XXX is not set
# CONFIG_SCSI_3W_SAS is not set
# CONFIG_SCSI_ACARD is not set
# CONFIG_SCSI_AACRAID is not set
# CONFIG_SCSI_AIC7XXX is not set
# CONFIG_SCSI_AIC7XXX_OLD is not set
# CONFIG_SCSI_AIC79XX is not set
# CONFIG_SCSI_AIC94XX is not set
# CONFIG_SCSI_MVSAS is not set
# CONFIG_SCSI_DPT_I2O is not set
# CONFIG_SCSI_ADVANSYS is not set
# CONFIG_SCSI_ARCMSR is not set
CONFIG_MEGARAID_NEWGEN=y
# CONFIG_MEGARAID_MM is not set
# CONFIG_MEGARAID_LEGACY is not set
# CONFIG_MEGARAID_SAS is not set
# CONFIG_SCSI_MPT2SAS is not set
# CONFIG_SCSI_HPTIOP is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_VMWARE_PVSCSI is not set
# CONFIG_LIBFC is not set
# CONFIG_LIBFCOE is not set
# CONFIG_FCOE is not set
# CONFIG_FCOE_FNIC is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_EATA is not set
# CONFIG_SCSI_FUTURE_DOMAIN is not set
# CONFIG_SCSI_GDTH is not set
# CONFIG_SCSI_IPS is not set
# CONFIG_SCSI_INITIO is not set
# CONFIG_SCSI_INIA100 is not set
# CONFIG_SCSI_PPA is not set
# CONFIG_SCSI_IMM is not set
# CONFIG_SCSI_STEX is not set
# CONFIG_SCSI_SYM53C8XX_2 is not set
# CONFIG_SCSI_IPR is not set
# CONFIG_SCSI_QLOGIC_1280 is not set
# CONFIG_SCSI_QLA_FC is not set
# CONFIG_SCSI_QLA_ISCSI is not set
# CONFIG_SCSI_LPFC is not set
# CONFIG_SCSI_DC395x is not set
# CONFIG_SCSI_DC390T is not set
# CONFIG_SCSI_NSP32 is not set
# CONFIG_SCSI_DEBUG is not set
# CONFIG_SCSI_PMCRAID is not set
# CONFIG_SCSI_PM8001 is not set
# CONFIG_SCSI_SRP is not set
# CONFIG_SCSI_BFA_FC is not set
CONFIG_SCSI_LOWLEVEL_PCMCIA=y
# CONFIG_PCMCIA_AHA152X is not set
# CONFIG_PCMCIA_FDOMAIN is not set
# CONFIG_PCMCIA_NINJA_SCSI is not set
# CONFIG_PCMCIA_QLOGIC is not set
# CONFIG_PCMCIA_SYM53C500 is not set
# CONFIG_SCSI_DH is not set
# CONFIG_SCSI_OSD_INITIATOR is not set
CONFIG_ATA=m
# CONFIG_ATA_NONSTANDARD is not set
CONFIG_ATA_VERBOSE_ERROR=y
CONFIG_ATA_ACPI=y
CONFIG_SATA_PMP=y

#
# Controllers with non-SFF native interface
#
# CONFIG_SATA_AHCI is not set
# CONFIG_SATA_AHCI_PLATFORM is not set
# CONFIG_SATA_INIC162X is not set
# CONFIG_SATA_ACARD_AHCI is not set
# CONFIG_SATA_SIL24 is not set
CONFIG_ATA_SFF=y

#
# SFF controllers with custom DMA interface
#
# CONFIG_PDC_ADMA is not set
# CONFIG_SATA_QSTOR is not set
# CONFIG_SATA_SX4 is not set
CONFIG_ATA_BMDMA=y

#
# SATA SFF controllers with BMDMA
#
CONFIG_ATA_PIIX=m
# CONFIG_SATA_MV is not set
# CONFIG_SATA_NV is not set
# CONFIG_SATA_PROMISE is not set
# CONFIG_SATA_SIL is not set
# CONFIG_SATA_SIS is not set
# CONFIG_SATA_SVW is not set
# CONFIG_SATA_ULI is not set
# CONFIG_SATA_VIA is not set
# CONFIG_SATA_VITESSE is not set

#
# PATA SFF controllers with BMDMA
#
# CONFIG_PATA_ALI is not set
# CONFIG_PATA_AMD is not set
# CONFIG_PATA_ARASAN_CF is not set
# CONFIG_PATA_ARTOP is not set
# CONFIG_PATA_ATIIXP is not set
# CONFIG_PATA_ATP867X is not set
# CONFIG_PATA_CMD64X is not set
# CONFIG_PATA_CS5520 is not set
# CONFIG_PATA_CS5530 is not set
# CONFIG_PATA_CS5535 is not set
# CONFIG_PATA_CS5536 is not set
# CONFIG_PATA_CYPRESS is not set
# CONFIG_PATA_EFAR is not set
# CONFIG_PATA_HPT366 is not set
# CONFIG_PATA_HPT37X is not set
# CONFIG_PATA_HPT3X2N is not set
# CONFIG_PATA_HPT3X3 is not set
# CONFIG_PATA_IT8213 is not set
# CONFIG_PATA_IT821X is not set
# CONFIG_PATA_JMICRON is not set
# CONFIG_PATA_MARVELL is not set
# CONFIG_PATA_NETCELL is not set
# CONFIG_PATA_NINJA32 is not set
# CONFIG_PATA_NS87415 is not set
# CONFIG_PATA_OLDPIIX is not set
# CONFIG_PATA_OPTIDMA is not set
# CONFIG_PATA_PDC2027X is not set
# CONFIG_PATA_PDC_OLD is not set
# CONFIG_PATA_RADISYS is not set
# CONFIG_PATA_RDC is not set
# CONFIG_PATA_SC1200 is not set
# CONFIG_PATA_SCH is not set
# CONFIG_PATA_SERVERWORKS is not set
# CONFIG_PATA_SIL680 is not set
# CONFIG_PATA_SIS is not set
# CONFIG_PATA_TOSHIBA is not set
# CONFIG_PATA_TRIFLEX is not set
# CONFIG_PATA_VIA is not set
# CONFIG_PATA_WINBOND is not set

#
# PIO-only SFF controllers
#
# CONFIG_PATA_CMD640_PCI is not set
# CONFIG_PATA_MPIIX is not set
# CONFIG_PATA_NS87410 is not set
# CONFIG_PATA_OPTI is not set
# CONFIG_PATA_PCMCIA is not set
# CONFIG_PATA_RZ1000 is not set

#
# Generic fallback / legacy drivers
#
# CONFIG_PATA_ACPI is not set
CONFIG_ATA_GENERIC=m
# CONFIG_PATA_LEGACY is not set
CONFIG_MD=y
# CONFIG_BLK_DEV_MD is not set
CONFIG_BLK_DEV_DM=m
# CONFIG_DM_DEBUG is not set
# CONFIG_DM_CRYPT is not set
# CONFIG_DM_SNAPSHOT is not set
# CONFIG_DM_MIRROR is not set
# CONFIG_DM_RAID is not set
# CONFIG_DM_ZERO is not set
# CONFIG_DM_MULTIPATH is not set
# CONFIG_DM_DELAY is not set
CONFIG_DM_UEVENT=y
# CONFIG_DM_FLAKEY is not set
# CONFIG_TARGET_CORE is not set
CONFIG_FUSION=y
# CONFIG_FUSION_SPI is not set
# CONFIG_FUSION_FC is not set
# CONFIG_FUSION_SAS is not set
CONFIG_FUSION_MAX_SGE=128
# CONFIG_FUSION_LOGGING is not set

#
# IEEE 1394 (FireWire) support
#
CONFIG_FIREWIRE=m
# CONFIG_FIREWIRE_OHCI is not set
# CONFIG_FIREWIRE_SBP2 is not set
# CONFIG_FIREWIRE_NET is not set
# CONFIG_FIREWIRE_NOSY is not set
# CONFIG_I2O is not set
# CONFIG_MACINTOSH_DRIVERS is not set
CONFIG_NETDEVICES=y
# CONFIG_IFB is not set
# CONFIG_DUMMY is not set
# CONFIG_BONDING is not set
# CONFIG_MACVLAN is not set
# CONFIG_EQUALIZER is not set
# CONFIG_TUN is not set
# CONFIG_VETH is not set
# CONFIG_NET_SB1000 is not set
# CONFIG_ARCNET is not set
# CONFIG_MII is not set
# CONFIG_PHYLIB is not set
CONFIG_NET_ETHERNET=y
# CONFIG_HAPPYMEAL is not set
# CONFIG_SUNGEM is not set
# CONFIG_CASSINI is not set
CONFIG_NET_VENDOR_3COM=y
# CONFIG_VORTEX is not set
# CONFIG_TYPHOON is not set
# CONFIG_ENC28J60 is not set
# CONFIG_ETHOC is not set
# CONFIG_DNET is not set
CONFIG_NET_TULIP=y
# CONFIG_DE2104X is not set
# CONFIG_TULIP is not set
# CONFIG_DE4X5 is not set
# CONFIG_WINBOND_840 is not set
# CONFIG_DM9102 is not set
# CONFIG_ULI526X is not set
# CONFIG_PCMCIA_XIRCOM is not set
# CONFIG_HP100 is not set
# CONFIG_IBM_NEW_EMAC_ZMII is not set
# CONFIG_IBM_NEW_EMAC_RGMII is not set
# CONFIG_IBM_NEW_EMAC_TAH is not set
# CONFIG_IBM_NEW_EMAC_EMAC4 is not set
# CONFIG_IBM_NEW_EMAC_NO_FLOW_CTRL is not set
# CONFIG_IBM_NEW_EMAC_MAL_CLR_ICINTSTAT is not set
# CONFIG_IBM_NEW_EMAC_MAL_COMMON_ERR is not set
CONFIG_NET_PCI=y
# CONFIG_PCNET32 is not set
# CONFIG_AMD8111_ETH is not set
# CONFIG_ADAPTEC_STARFIRE is not set
# CONFIG_KSZ884X_PCI is not set
# CONFIG_B44 is not set
# CONFIG_FORCEDETH is not set
# CONFIG_E100 is not set
# CONFIG_FEALNX is not set
# CONFIG_NATSEMI is not set
# CONFIG_NE2K_PCI is not set
# CONFIG_8139CP is not set
# CONFIG_8139TOO is not set
# CONFIG_R6040 is not set
# CONFIG_SIS900 is not set
# CONFIG_EPIC100 is not set
# CONFIG_SMSC9420 is not set
# CONFIG_SUNDANCE is not set
# CONFIG_TLAN is not set
# CONFIG_KS8851 is not set
# CONFIG_KS8851_MLL is not set
# CONFIG_VIA_RHINE is not set
# CONFIG_SC92031 is not set
# CONFIG_NET_POCKET is not set
# CONFIG_ATL2 is not set
CONFIG_NETDEV_1000=y
# CONFIG_ACENIC is not set
# CONFIG_DL2K is not set
CONFIG_E1000=m
# CONFIG_E1000E is not set
# CONFIG_IP1000 is not set
# CONFIG_IGB is not set
# CONFIG_IGBVF is not set
# CONFIG_NS83820 is not set
# CONFIG_HAMACHI is not set
# CONFIG_YELLOWFIN is not set
# CONFIG_R8169 is not set
# CONFIG_SIS190 is not set
# CONFIG_SKGE is not set
# CONFIG_SKY2 is not set
# CONFIG_VIA_VELOCITY is not set
# CONFIG_TIGON3 is not set
CONFIG_BNX2=m
CONFIG_CNIC=m
# CONFIG_QLA3XXX is not set
# CONFIG_ATL1 is not set
# CONFIG_ATL1E is not set
# CONFIG_ATL1C is not set
# CONFIG_JME is not set
# CONFIG_STMMAC_ETH is not set
# CONFIG_PCH_GBE is not set
CONFIG_NETDEV_10000=y
CONFIG_MDIO=m
# CONFIG_CHELSIO_T1 is not set
CONFIG_CHELSIO_T3=m
CONFIG_CHELSIO_T4=m
# CONFIG_CHELSIO_T4VF is not set
# CONFIG_ENIC is not set
# CONFIG_IXGBE is not set
# CONFIG_IXGBEVF is not set
# CONFIG_IXGB is not set
# CONFIG_S2IO is not set
# CONFIG_VXGE is not set
# CONFIG_MYRI10GE is not set
# CONFIG_NETXEN_NIC is not set
# CONFIG_NIU is not set
# CONFIG_MLX4_EN is not set
# CONFIG_MLX4_CORE is not set
# CONFIG_TEHUTI is not set
# CONFIG_BNX2X is not set
# CONFIG_QLCNIC is not set
# CONFIG_QLGE is not set
# CONFIG_BNA is not set
CONFIG_SFC=m
# CONFIG_BE2NET is not set
CONFIG_TR=y
# CONFIG_IBMOL is not set
# CONFIG_IBMLS is not set
# CONFIG_3C359 is not set
# CONFIG_TMS380TR is not set
CONFIG_WLAN=y
# CONFIG_PCMCIA_RAYCS is not set
# CONFIG_LIBERTAS_THINFIRM is not set
# CONFIG_AIRO is not set
# CONFIG_ATMEL is not set
# CONFIG_AT76C50X_USB is not set
# CONFIG_AIRO_CS is not set
# CONFIG_PCMCIA_WL3501 is not set
# CONFIG_PRISM54 is not set
# CONFIG_USB_ZD1201 is not set
# CONFIG_USB_NET_RNDIS_WLAN is not set
# CONFIG_RTL8180 is not set
# CONFIG_RTL8187 is not set
# CONFIG_ADM8211 is not set
# CONFIG_MAC80211_HWSIM is not set
# CONFIG_MWL8K is not set
CONFIG_ATH_COMMON=m
CONFIG_ATH_DEBUG=y
CONFIG_ATH5K=m
CONFIG_ATH5K_DEBUG=y
CONFIG_ATH5K_TRACER=y
CONFIG_ATH5K_PCI=y
# CONFIG_ATH9K is not set
# CONFIG_ATH9K_HTC is not set
# CONFIG_CARL9170 is not set
# CONFIG_B43 is not set
# CONFIG_B43LEGACY is not set
# CONFIG_HOSTAP is not set
# CONFIG_IPW2100 is not set
# CONFIG_IPW2200 is not set
# CONFIG_IWLAGN is not set
CONFIG_IWLWIFI_LEGACY=m

#
# Debugging Options
#
# CONFIG_IWLWIFI_LEGACY_DEBUG is not set
# CONFIG_IWLWIFI_LEGACY_DEVICE_TRACING is not set
CONFIG_IWL4965=m
CONFIG_IWL3945=m
# CONFIG_LIBERTAS is not set
# CONFIG_HERMES is not set
# CONFIG_P54_COMMON is not set
# CONFIG_RT2X00 is not set
# CONFIG_RTL8192CE is not set
# CONFIG_RTL8192CU is not set
# CONFIG_WL1251 is not set
# CONFIG_WL12XX_MENU is not set
# CONFIG_ZD1211RW is not set
# CONFIG_MWIFIEX is not set

#
# Enable WiMAX (Networking options) to see the WiMAX drivers
#

#
# USB Network Adapters
#
# CONFIG_USB_CATC is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_USBNET is not set
# CONFIG_USB_HSO is not set
# CONFIG_USB_IPHETH is not set
CONFIG_NET_PCMCIA=y
# CONFIG_PCMCIA_3C589 is not set
# CONFIG_PCMCIA_3C574 is not set
# CONFIG_PCMCIA_FMVJ18X is not set
# CONFIG_PCMCIA_PCNET is not set
# CONFIG_PCMCIA_NMCLAN is not set
# CONFIG_PCMCIA_SMC91C92 is not set
# CONFIG_PCMCIA_XIRC2PS is not set
# CONFIG_PCMCIA_AXNET is not set
# CONFIG_PCMCIA_IBMTR is not set
CONFIG_WAN=y
# CONFIG_HDLC is not set
# CONFIG_DLCI is not set
# CONFIG_SBNI is not set

#
# CAIF transport drivers
#
CONFIG_FDDI=y
# CONFIG_DEFXX is not set
# CONFIG_SKFP is not set
CONFIG_HIPPI=y
# CONFIG_ROADRUNNER is not set
# CONFIG_PLIP is not set
# CONFIG_PPP is not set
# CONFIG_SLIP is not set
CONFIG_NET_FC=y
# CONFIG_NETCONSOLE is not set
# CONFIG_NETPOLL is not set
# CONFIG_NET_POLL_CONTROLLER is not set
# CONFIG_VIRTIO_NET is not set
# CONFIG_VMXNET3 is not set
CONFIG_ISDN=y
# CONFIG_ISDN_I4L is not set
# CONFIG_ISDN_CAPI is not set
# CONFIG_ISDN_DRV_GIGASET is not set
# CONFIG_HYSDN is not set
# CONFIG_MISDN is not set
# CONFIG_PHONE is not set

#
# Input device support
#
CONFIG_INPUT=y
CONFIG_INPUT_FF_MEMLESS=m
# CONFIG_INPUT_POLLDEV is not set
# CONFIG_INPUT_SPARSEKMAP is not set

#
# Userland interfaces
#
CONFIG_INPUT_MOUSEDEV=y
CONFIG_INPUT_MOUSEDEV_PSAUX=y
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
CONFIG_INPUT_JOYDEV=m
CONFIG_INPUT_EVDEV=m
# CONFIG_INPUT_EVBUG is not set

#
# Input Device Drivers
#
CONFIG_INPUT_KEYBOARD=y
# CONFIG_KEYBOARD_ADP5588 is not set
CONFIG_KEYBOARD_ATKBD=y
# CONFIG_KEYBOARD_QT1070 is not set
# CONFIG_KEYBOARD_QT2160 is not set
# CONFIG_KEYBOARD_LKKBD is not set
# CONFIG_KEYBOARD_GPIO is not set
# CONFIG_KEYBOARD_GPIO_POLLED is not set
# CONFIG_KEYBOARD_TCA6416 is not set
# CONFIG_KEYBOARD_MATRIX is not set
# CONFIG_KEYBOARD_LM8323 is not set
# CONFIG_KEYBOARD_MAX7359 is not set
# CONFIG_KEYBOARD_MCS is not set
# CONFIG_KEYBOARD_NEWTON is not set
# CONFIG_KEYBOARD_OPENCORES is not set
# CONFIG_KEYBOARD_STOWAWAY is not set
# CONFIG_KEYBOARD_SUNKBD is not set
# CONFIG_KEYBOARD_XTKBD is not set
CONFIG_INPUT_MOUSE=y
CONFIG_MOUSE_PS2=m
CONFIG_MOUSE_PS2_ALPS=y
CONFIG_MOUSE_PS2_LOGIPS2PP=y
CONFIG_MOUSE_PS2_SYNAPTICS=y
CONFIG_MOUSE_PS2_LIFEBOOK=y
CONFIG_MOUSE_PS2_TRACKPOINT=y
CONFIG_MOUSE_PS2_ELANTECH=y
CONFIG_MOUSE_PS2_SENTELIC=y
# CONFIG_MOUSE_PS2_TOUCHKIT is not set
# CONFIG_MOUSE_SERIAL is not set
# CONFIG_MOUSE_APPLETOUCH is not set
# CONFIG_MOUSE_BCM5974 is not set
# CONFIG_MOUSE_VSXXXAA is not set
# CONFIG_MOUSE_GPIO is not set
# CONFIG_MOUSE_SYNAPTICS_I2C is not set
CONFIG_INPUT_JOYSTICK=y
# CONFIG_JOYSTICK_ANALOG is not set
# CONFIG_JOYSTICK_A3D is not set
# CONFIG_JOYSTICK_ADI is not set
# CONFIG_JOYSTICK_COBRA is not set
# CONFIG_JOYSTICK_GF2K is not set
# CONFIG_JOYSTICK_GRIP is not set
# CONFIG_JOYSTICK_GRIP_MP is not set
# CONFIG_JOYSTICK_GUILLEMOT is not set
# CONFIG_JOYSTICK_INTERACT is not set
# CONFIG_JOYSTICK_SIDEWINDER is not set
# CONFIG_JOYSTICK_TMDC is not set
# CONFIG_JOYSTICK_IFORCE is not set
# CONFIG_JOYSTICK_WARRIOR is not set
# CONFIG_JOYSTICK_MAGELLAN is not set
# CONFIG_JOYSTICK_SPACEORB is not set
# CONFIG_JOYSTICK_SPACEBALL is not set
# CONFIG_JOYSTICK_STINGER is not set
# CONFIG_JOYSTICK_TWIDJOY is not set
# CONFIG_JOYSTICK_ZHENHUA is not set
# CONFIG_JOYSTICK_DB9 is not set
# CONFIG_JOYSTICK_GAMECON is not set
# CONFIG_JOYSTICK_TURBOGRAFX is not set
# CONFIG_JOYSTICK_AS5011 is not set
# CONFIG_JOYSTICK_JOYDUMP is not set
# CONFIG_JOYSTICK_XPAD is not set
# CONFIG_JOYSTICK_WALKERA0701 is not set
CONFIG_INPUT_TABLET=y
# CONFIG_TABLET_USB_ACECAD is not set
# CONFIG_TABLET_USB_AIPTEK is not set
# CONFIG_TABLET_USB_GTCO is not set
# CONFIG_TABLET_USB_HANWANG is not set
# CONFIG_TABLET_USB_KBTAB is not set
# CONFIG_TABLET_USB_WACOM is not set
CONFIG_INPUT_TOUCHSCREEN=y
# CONFIG_TOUCHSCREEN_ADS7846 is not set
# CONFIG_TOUCHSCREEN_AD7877 is not set
# CONFIG_TOUCHSCREEN_AD7879 is not set
# CONFIG_TOUCHSCREEN_ATMEL_MXT is not set
# CONFIG_TOUCHSCREEN_BU21013 is not set
# CONFIG_TOUCHSCREEN_CY8CTMG110 is not set
# CONFIG_TOUCHSCREEN_DYNAPRO is not set
# CONFIG_TOUCHSCREEN_HAMPSHIRE is not set
# CONFIG_TOUCHSCREEN_EETI is not set
# CONFIG_TOUCHSCREEN_FUJITSU is not set
# CONFIG_TOUCHSCREEN_GUNZE is not set
# CONFIG_TOUCHSCREEN_ELO is not set
# CONFIG_TOUCHSCREEN_WACOM_W8001 is not set
# CONFIG_TOUCHSCREEN_MAX11801 is not set
# CONFIG_TOUCHSCREEN_MCS5000 is not set
# CONFIG_TOUCHSCREEN_MTOUCH is not set
# CONFIG_TOUCHSCREEN_INEXIO is not set
# CONFIG_TOUCHSCREEN_MK712 is not set
# CONFIG_TOUCHSCREEN_PENMOUNT is not set
# CONFIG_TOUCHSCREEN_TOUCHRIGHT is not set
# CONFIG_TOUCHSCREEN_TOUCHWIN is not set
# CONFIG_TOUCHSCREEN_WM97XX is not set
# CONFIG_TOUCHSCREEN_USB_COMPOSITE is not set
# CONFIG_TOUCHSCREEN_TOUCHIT213 is not set
# CONFIG_TOUCHSCREEN_TSC2005 is not set
# CONFIG_TOUCHSCREEN_TSC2007 is not set
# CONFIG_TOUCHSCREEN_ST1232 is not set
# CONFIG_TOUCHSCREEN_TPS6507X is not set
CONFIG_INPUT_MISC=y
# CONFIG_INPUT_AD714X is not set
CONFIG_INPUT_PCSPKR=m
# CONFIG_INPUT_APANEL is not set
# CONFIG_INPUT_WISTRON_BTNS is not set
# CONFIG_INPUT_ATLAS_BTNS is not set
# CONFIG_INPUT_ATI_REMOTE is not set
# CONFIG_INPUT_ATI_REMOTE2 is not set
# CONFIG_INPUT_KEYSPAN_REMOTE is not set
# CONFIG_INPUT_POWERMATE is not set
# CONFIG_INPUT_YEALINK is not set
# CONFIG_INPUT_CM109 is not set
# CONFIG_INPUT_UINPUT is not set
# CONFIG_INPUT_PCF8574 is not set
# CONFIG_INPUT_GPIO_ROTARY_ENCODER is not set
# CONFIG_INPUT_ADXL34X is not set
# CONFIG_INPUT_CMA3000 is not set

#
# Hardware I/O ports
#
CONFIG_SERIO=y
CONFIG_SERIO_I8042=y
# CONFIG_SERIO_SERPORT is not set
# CONFIG_SERIO_CT82C710 is not set
# CONFIG_SERIO_PARKBD is not set
# CONFIG_SERIO_PCIPS2 is not set
CONFIG_SERIO_LIBPS2=y
CONFIG_SERIO_RAW=m
# CONFIG_SERIO_ALTERA_PS2 is not set
# CONFIG_SERIO_PS2MULT is not set
# CONFIG_GAMEPORT is not set

#
# Character devices
#
CONFIG_VT=y
CONFIG_CONSOLE_TRANSLATIONS=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y
CONFIG_VT_HW_CONSOLE_BINDING=y
CONFIG_UNIX98_PTYS=y
CONFIG_DEVPTS_MULTIPLE_INSTANCES=y
# CONFIG_LEGACY_PTYS is not set
CONFIG_SERIAL_NONSTANDARD=y
# CONFIG_ROCKETPORT is not set
# CONFIG_CYCLADES is not set
# CONFIG_MOXA_INTELLIO is not set
# CONFIG_MOXA_SMARTIO is not set
# CONFIG_SYNCLINK is not set
# CONFIG_SYNCLINKMP is not set
# CONFIG_SYNCLINK_GT is not set
# CONFIG_NOZOMI is not set
# CONFIG_ISI is not set
# CONFIG_N_HDLC is not set
# CONFIG_N_GSM is not set
# CONFIG_DEVKMEM is not set
CONFIG_STALDRV=y

#
# Serial drivers
#
CONFIG_SERIAL_8250=y
CONFIG_SERIAL_8250_CONSOLE=y
CONFIG_FIX_EARLYCON_MEM=y
CONFIG_SERIAL_8250_PCI=y
CONFIG_SERIAL_8250_PNP=y
# CONFIG_SERIAL_8250_CS is not set
CONFIG_SERIAL_8250_NR_UARTS=32
CONFIG_SERIAL_8250_RUNTIME_UARTS=4
CONFIG_SERIAL_8250_EXTENDED=y
CONFIG_SERIAL_8250_MANY_PORTS=y
CONFIG_SERIAL_8250_SHARE_IRQ=y
# CONFIG_SERIAL_8250_DETECT_IRQ is not set
CONFIG_SERIAL_8250_RSA=y

#
# Non-8250 serial port support
#
# CONFIG_SERIAL_MAX3100 is not set
# CONFIG_SERIAL_MAX3107 is not set
# CONFIG_SERIAL_MFD_HSU is not set
CONFIG_SERIAL_CORE=y
CONFIG_SERIAL_CORE_CONSOLE=y
CONFIG_CONSOLE_POLL=y
# CONFIG_SERIAL_JSM is not set
# CONFIG_SERIAL_TIMBERDALE is not set
# CONFIG_SERIAL_ALTERA_JTAGUART is not set
# CONFIG_SERIAL_ALTERA_UART is not set
# CONFIG_SERIAL_IFX6X60 is not set
# CONFIG_SERIAL_PCH_UART is not set
CONFIG_PRINTER=m
# CONFIG_LP_CONSOLE is not set
CONFIG_PPDEV=m
CONFIG_HVC_DRIVER=y
CONFIG_VIRTIO_CONSOLE=y
# CONFIG_IPMI_HANDLER is not set
CONFIG_HW_RANDOM=m
# CONFIG_HW_RANDOM_TIMERIOMEM is not set
# CONFIG_HW_RANDOM_INTEL is not set
# CONFIG_HW_RANDOM_AMD is not set
# CONFIG_HW_RANDOM_GEODE is not set
# CONFIG_HW_RANDOM_VIA is not set
# CONFIG_HW_RANDOM_VIRTIO is not set
CONFIG_NVRAM=m
# CONFIG_R3964 is not set
# CONFIG_APPLICOM is not set
# CONFIG_SONYPI is not set

#
# PCMCIA character devices
#
# CONFIG_SYNCLINK_CS is not set
# CONFIG_CARDMAN_4000 is not set
# CONFIG_CARDMAN_4040 is not set
# CONFIG_IPWIRELESS is not set
# CONFIG_MWAVE is not set
# CONFIG_PC8736x_GPIO is not set
# CONFIG_NSC_GPIO is not set
# CONFIG_RAW_DRIVER is not set
CONFIG_HPET=y
CONFIG_HPET_MMAP=y
# CONFIG_HANGCHECK_TIMER is not set
CONFIG_TCG_TPM=m
CONFIG_TCG_TIS=m
# CONFIG_TCG_NSC is not set
# CONFIG_TCG_ATMEL is not set
# CONFIG_TCG_INFINEON is not set
# CONFIG_TELCLOCK is not set
CONFIG_DEVPORT=y
# CONFIG_RAMOOPS is not set
CONFIG_I2C=m
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_COMPAT=y
# CONFIG_I2C_CHARDEV is not set
# CONFIG_I2C_MUX is not set
CONFIG_I2C_HELPER_AUTO=y
CONFIG_I2C_ALGOBIT=m

#
# I2C Hardware Bus support
#

#
# PC SMBus host controller drivers
#
# CONFIG_I2C_ALI1535 is not set
# CONFIG_I2C_ALI1563 is not set
# CONFIG_I2C_ALI15X3 is not set
# CONFIG_I2C_AMD756 is not set
# CONFIG_I2C_AMD8111 is not set
CONFIG_I2C_I801=m
# CONFIG_I2C_ISCH is not set
# CONFIG_I2C_PIIX4 is not set
# CONFIG_I2C_NFORCE2 is not set
# CONFIG_I2C_SIS5595 is not set
# CONFIG_I2C_SIS630 is not set
# CONFIG_I2C_SIS96X is not set
# CONFIG_I2C_VIA is not set
# CONFIG_I2C_VIAPRO is not set

#
# ACPI drivers
#
# CONFIG_I2C_SCMI is not set

#
# I2C system bus drivers (mostly embedded / system-on-chip)
#
# CONFIG_I2C_DESIGNWARE_PCI is not set
# CONFIG_I2C_GPIO is not set
# CONFIG_I2C_OCORES is not set
# CONFIG_I2C_PCA_PLATFORM is not set
# CONFIG_I2C_PXA_PCI is not set
# CONFIG_I2C_SIMTEC is not set
# CONFIG_I2C_XILINX is not set
# CONFIG_I2C_EG20T is not set

#
# External I2C/SMBus adapter drivers
#
# CONFIG_I2C_DIOLAN_U2C is not set
# CONFIG_I2C_PARPORT is not set
# CONFIG_I2C_PARPORT_LIGHT is not set
# CONFIG_I2C_TAOS_EVM is not set
# CONFIG_I2C_TINY_USB is not set

#
# Other I2C/SMBus bus drivers
#
# CONFIG_I2C_STUB is not set
# CONFIG_SCx200_ACB is not set
# CONFIG_I2C_DEBUG_CORE is not set
# CONFIG_I2C_DEBUG_ALGO is not set
# CONFIG_I2C_DEBUG_BUS is not set
CONFIG_SPI=y
# CONFIG_SPI_DEBUG is not set
CONFIG_SPI_MASTER=y

#
# SPI Master Controller Drivers
#
# CONFIG_SPI_ALTERA is not set
# CONFIG_SPI_BITBANG is not set
# CONFIG_SPI_BUTTERFLY is not set
# CONFIG_SPI_GPIO is not set
# CONFIG_SPI_LM70_LLP is not set
# CONFIG_SPI_OC_TINY is not set
# CONFIG_SPI_PXA2XX is not set
# CONFIG_SPI_PXA2XX_PCI is not set
# CONFIG_SPI_TOPCLIFF_PCH is not set
# CONFIG_SPI_XILINX is not set
# CONFIG_SPI_DESIGNWARE is not set

#
# SPI Protocol Masters
#
# CONFIG_SPI_SPIDEV is not set
# CONFIG_SPI_TLE62X0 is not set

#
# PPS support
#
# CONFIG_PPS is not set

#
# PPS generators support
#
CONFIG_ARCH_WANT_OPTIONAL_GPIOLIB=y
CONFIG_GPIOLIB=y
# CONFIG_DEBUG_GPIO is not set
# CONFIG_GPIO_SYSFS is not set

#
# Memory mapped GPIO expanders:
#
# CONFIG_GPIO_BASIC_MMIO is not set
# CONFIG_GPIO_IT8761E is not set
# CONFIG_GPIO_SCH is not set
# CONFIG_GPIO_VX855 is not set

#
# I2C GPIO expanders:
#
# CONFIG_GPIO_MAX7300 is not set
# CONFIG_GPIO_MAX732X is not set
# CONFIG_GPIO_PCA953X is not set
# CONFIG_GPIO_PCF857X is not set
# CONFIG_GPIO_ADP5588 is not set

#
# PCI GPIO expanders:
#
# CONFIG_GPIO_CS5535 is not set
CONFIG_GPIO_BT8XX=m
# CONFIG_GPIO_LANGWELL is not set
# CONFIG_GPIO_PCH is not set
# CONFIG_GPIO_ML_IOH is not set
# CONFIG_GPIO_RDC321X is not set

#
# SPI GPIO expanders:
#
# CONFIG_GPIO_MAX7301 is not set
# CONFIG_GPIO_MCP23S08 is not set
# CONFIG_GPIO_MC33880 is not set
# CONFIG_GPIO_74X164 is not set

#
# AC97 GPIO expanders:
#

#
# MODULbus GPIO expanders:
#
# CONFIG_W1 is not set
CONFIG_POWER_SUPPLY=m
# CONFIG_POWER_SUPPLY_DEBUG is not set
# CONFIG_PDA_POWER is not set
# CONFIG_TEST_POWER is not set
# CONFIG_BATTERY_DS2782 is not set
# CONFIG_BATTERY_BQ20Z75 is not set
# CONFIG_BATTERY_BQ27x00 is not set
# CONFIG_BATTERY_MAX17040 is not set
# CONFIG_BATTERY_MAX17042 is not set
# CONFIG_CHARGER_GPIO is not set
CONFIG_HWMON=y
# CONFIG_HWMON_VID is not set
# CONFIG_HWMON_DEBUG_CHIP is not set

#
# Native drivers
#
# CONFIG_SENSORS_ABITUGURU is not set
# CONFIG_SENSORS_ABITUGURU3 is not set
# CONFIG_SENSORS_AD7414 is not set
# CONFIG_SENSORS_AD7418 is not set
# CONFIG_SENSORS_ADCXX is not set
# CONFIG_SENSORS_ADM1021 is not set
# CONFIG_SENSORS_ADM1025 is not set
# CONFIG_SENSORS_ADM1026 is not set
# CONFIG_SENSORS_ADM1029 is not set
# CONFIG_SENSORS_ADM1031 is not set
# CONFIG_SENSORS_ADM9240 is not set
# CONFIG_SENSORS_ADT7411 is not set
# CONFIG_SENSORS_ADT7462 is not set
# CONFIG_SENSORS_ADT7470 is not set
# CONFIG_SENSORS_ADT7475 is not set
# CONFIG_SENSORS_ASC7621 is not set
# CONFIG_SENSORS_K8TEMP is not set
# CONFIG_SENSORS_K10TEMP is not set
# CONFIG_SENSORS_ASB100 is not set
# CONFIG_SENSORS_ATXP1 is not set
# CONFIG_SENSORS_DS620 is not set
# CONFIG_SENSORS_DS1621 is not set
# CONFIG_SENSORS_I5K_AMB is not set
# CONFIG_SENSORS_F71805F is not set
# CONFIG_SENSORS_F71882FG is not set
# CONFIG_SENSORS_F75375S is not set
# CONFIG_SENSORS_FSCHMD is not set
# CONFIG_SENSORS_G760A is not set
# CONFIG_SENSORS_GL518SM is not set
# CONFIG_SENSORS_GL520SM is not set
# CONFIG_SENSORS_GPIO_FAN is not set
# CONFIG_SENSORS_CORETEMP is not set
# CONFIG_SENSORS_PKGTEMP is not set
# CONFIG_SENSORS_IT87 is not set
# CONFIG_SENSORS_JC42 is not set
# CONFIG_SENSORS_LINEAGE is not set
# CONFIG_SENSORS_LM63 is not set
# CONFIG_SENSORS_LM70 is not set
# CONFIG_SENSORS_LM73 is not set
# CONFIG_SENSORS_LM75 is not set
# CONFIG_SENSORS_LM77 is not set
# CONFIG_SENSORS_LM78 is not set
# CONFIG_SENSORS_LM80 is not set
# CONFIG_SENSORS_LM83 is not set
# CONFIG_SENSORS_LM85 is not set
# CONFIG_SENSORS_LM87 is not set
# CONFIG_SENSORS_LM90 is not set
# CONFIG_SENSORS_LM92 is not set
# CONFIG_SENSORS_LM93 is not set
# CONFIG_SENSORS_LTC4151 is not set
# CONFIG_SENSORS_LTC4215 is not set
# CONFIG_SENSORS_LTC4245 is not set
# CONFIG_SENSORS_LTC4261 is not set
# CONFIG_SENSORS_LM95241 is not set
# CONFIG_SENSORS_MAX1111 is not set
# CONFIG_SENSORS_MAX1619 is not set
# CONFIG_SENSORS_MAX6639 is not set
# CONFIG_SENSORS_MAX6642 is not set
# CONFIG_SENSORS_MAX6650 is not set
# CONFIG_SENSORS_PC87360 is not set
# CONFIG_SENSORS_PC87427 is not set
# CONFIG_SENSORS_PCF8591 is not set
# CONFIG_PMBUS is not set
# CONFIG_SENSORS_SHT15 is not set
# CONFIG_SENSORS_SHT21 is not set
# CONFIG_SENSORS_SIS5595 is not set
# CONFIG_SENSORS_SMM665 is not set
# CONFIG_SENSORS_DME1737 is not set
# CONFIG_SENSORS_EMC1403 is not set
# CONFIG_SENSORS_EMC2103 is not set
# CONFIG_SENSORS_SMSC47M1 is not set
# CONFIG_SENSORS_SMSC47M192 is not set
# CONFIG_SENSORS_SMSC47B397 is not set
# CONFIG_SENSORS_SCH5627 is not set
# CONFIG_SENSORS_ADS1015 is not set
# CONFIG_SENSORS_ADS7828 is not set
# CONFIG_SENSORS_ADS7871 is not set
# CONFIG_SENSORS_AMC6821 is not set
# CONFIG_SENSORS_THMC50 is not set
# CONFIG_SENSORS_TMP102 is not set
# CONFIG_SENSORS_TMP401 is not set
# CONFIG_SENSORS_TMP421 is not set
# CONFIG_SENSORS_VIA_CPUTEMP is not set
# CONFIG_SENSORS_VIA686A is not set
# CONFIG_SENSORS_VT1211 is not set
# CONFIG_SENSORS_VT8231 is not set
# CONFIG_SENSORS_W83781D is not set
# CONFIG_SENSORS_W83791D is not set
# CONFIG_SENSORS_W83792D is not set
# CONFIG_SENSORS_W83793 is not set
# CONFIG_SENSORS_W83795 is not set
# CONFIG_SENSORS_W83L785TS is not set
# CONFIG_SENSORS_W83L786NG is not set
# CONFIG_SENSORS_W83627HF is not set
# CONFIG_SENSORS_W83627EHF is not set
# CONFIG_SENSORS_APPLESMC is not set

#
# ACPI drivers
#
# CONFIG_SENSORS_ATK0110 is not set
CONFIG_THERMAL=m
CONFIG_THERMAL_HWMON=y
CONFIG_WATCHDOG=y
# CONFIG_WATCHDOG_NOWAYOUT is not set

#
# Watchdog Device Drivers
#
# CONFIG_SOFT_WATCHDOG is not set
# CONFIG_ACQUIRE_WDT is not set
# CONFIG_ADVANTECH_WDT is not set
# CONFIG_ALIM1535_WDT is not set
# CONFIG_ALIM7101_WDT is not set
# CONFIG_F71808E_WDT is not set
# CONFIG_SP5100_TCO is not set
# CONFIG_SC520_WDT is not set
# CONFIG_SBC_FITPC2_WATCHDOG is not set
# CONFIG_EUROTECH_WDT is not set
# CONFIG_IB700_WDT is not set
# CONFIG_IBMASR is not set
# CONFIG_WAFER_WDT is not set
# CONFIG_I6300ESB_WDT is not set
# CONFIG_ITCO_WDT is not set
# CONFIG_IT8712F_WDT is not set
# CONFIG_IT87_WDT is not set
# CONFIG_HP_WATCHDOG is not set
# CONFIG_SC1200_WDT is not set
# CONFIG_PC87413_WDT is not set
# CONFIG_NV_TCO is not set
# CONFIG_60XX_WDT is not set
# CONFIG_SBC8360_WDT is not set
# CONFIG_SBC7240_WDT is not set
# CONFIG_CPU5_WDT is not set
# CONFIG_SMSC_SCH311X_WDT is not set
# CONFIG_SMSC37B787_WDT is not set
# CONFIG_W83627HF_WDT is not set
# CONFIG_W83697HF_WDT is not set
# CONFIG_W83697UG_WDT is not set
# CONFIG_W83877F_WDT is not set
# CONFIG_W83977F_WDT is not set
# CONFIG_MACHZ_WDT is not set
# CONFIG_SBC_EPX_C3_WATCHDOG is not set

#
# PCI-based Watchdog Cards
#
# CONFIG_PCIPCWATCHDOG is not set
# CONFIG_WDTPCI is not set

#
# USB-based Watchdog Cards
#
# CONFIG_USBPCWATCHDOG is not set
CONFIG_SSB_POSSIBLE=y

#
# Sonics Silicon Backplane
#
# CONFIG_SSB is not set
CONFIG_MFD_SUPPORT=y
# CONFIG_MFD_CORE is not set
# CONFIG_MFD_SM501 is not set
# CONFIG_HTC_PASIC3 is not set
# CONFIG_UCB1400_CORE is not set
# CONFIG_TPS6105X is not set
# CONFIG_TPS65010 is not set
# CONFIG_TPS6507X is not set
# CONFIG_MFD_TMIO is not set
# CONFIG_MFD_WM8400 is not set
# CONFIG_MFD_WM831X_SPI is not set
# CONFIG_MFD_PCF50633 is not set
# CONFIG_MFD_MC13XXX is not set
# CONFIG_ABX500_CORE is not set
# CONFIG_EZX_PCAP is not set
# CONFIG_MFD_CS5535 is not set
# CONFIG_MFD_TIMBERDALE is not set
# CONFIG_LPC_SCH is not set
# CONFIG_MFD_RDC321X is not set
# CONFIG_MFD_JANZ_CMODIO is not set
# CONFIG_MFD_VX855 is not set
# CONFIG_MFD_WL1273_CORE is not set
CONFIG_REGULATOR=y
# CONFIG_REGULATOR_DEBUG is not set
# CONFIG_REGULATOR_DUMMY is not set
# CONFIG_REGULATOR_FIXED_VOLTAGE is not set
# CONFIG_REGULATOR_VIRTUAL_CONSUMER is not set
# CONFIG_REGULATOR_USERSPACE_CONSUMER is not set
# CONFIG_REGULATOR_BQ24022 is not set
# CONFIG_REGULATOR_MAX1586 is not set
# CONFIG_REGULATOR_MAX8649 is not set
# CONFIG_REGULATOR_MAX8660 is not set
# CONFIG_REGULATOR_MAX8952 is not set
# CONFIG_REGULATOR_LP3971 is not set
# CONFIG_REGULATOR_LP3972 is not set
# CONFIG_REGULATOR_TPS65023 is not set
# CONFIG_REGULATOR_TPS6507X is not set
# CONFIG_REGULATOR_ISL6271A is not set
# CONFIG_REGULATOR_AD5398 is not set
# CONFIG_REGULATOR_TPS6524X is not set
CONFIG_MEDIA_SUPPORT=m

#
# Multimedia core support
#
# CONFIG_MEDIA_CONTROLLER is not set
# CONFIG_VIDEO_DEV is not set
# CONFIG_DVB_CORE is not set
# CONFIG_VIDEO_MEDIA is not set

#
# Multimedia drivers
#
# CONFIG_RC_CORE is not set

#
# Graphics support
#
CONFIG_AGP=y
CONFIG_AGP_ALI=y
CONFIG_AGP_ATI=y
CONFIG_AGP_AMD=y
CONFIG_AGP_AMD64=y
CONFIG_AGP_INTEL=y
CONFIG_AGP_NVIDIA=y
CONFIG_AGP_SIS=y
CONFIG_AGP_SWORKS=y
CONFIG_AGP_VIA=y
CONFIG_AGP_EFFICEON=y
CONFIG_VGA_ARB=y
CONFIG_VGA_ARB_MAX_GPUS=16
CONFIG_VGA_SWITCHEROO=y
CONFIG_DRM=m
CONFIG_DRM_KMS_HELPER=m
CONFIG_DRM_TTM=m
# CONFIG_DRM_TDFX is not set
# CONFIG_DRM_R128 is not set
CONFIG_DRM_RADEON=m
CONFIG_DRM_RADEON_KMS=y
CONFIG_DRM_I810=m
CONFIG_DRM_I915=m
# CONFIG_DRM_I915_KMS is not set
# CONFIG_DRM_MGA is not set
# CONFIG_DRM_SIS is not set
# CONFIG_DRM_VIA is not set
# CONFIG_DRM_SAVAGE is not set
# CONFIG_STUB_POULSBO is not set
CONFIG_VGASTATE=m
CONFIG_VIDEO_OUTPUT_CONTROL=m
CONFIG_FB=y
CONFIG_FIRMWARE_EDID=y
CONFIG_FB_DDC=m
CONFIG_FB_BOOT_VESA_SUPPORT=y
CONFIG_FB_CFB_FILLRECT=y
CONFIG_FB_CFB_COPYAREA=y
CONFIG_FB_CFB_IMAGEBLIT=y
# CONFIG_FB_CFB_REV_PIXELS_IN_BYTE is not set
# CONFIG_FB_SYS_FILLRECT is not set
# CONFIG_FB_SYS_COPYAREA is not set
# CONFIG_FB_SYS_IMAGEBLIT is not set
# CONFIG_FB_FOREIGN_ENDIAN is not set
# CONFIG_FB_SYS_FOPS is not set
# CONFIG_FB_WMT_GE_ROPS is not set
# CONFIG_FB_SVGALIB is not set
# CONFIG_FB_MACMODES is not set
CONFIG_FB_BACKLIGHT=y
CONFIG_FB_MODE_HELPERS=y
CONFIG_FB_TILEBLITTING=y

#
# Frame buffer hardware drivers
#
# CONFIG_FB_CIRRUS is not set
# CONFIG_FB_PM2 is not set
CONFIG_FB_CYBER2000=m
CONFIG_FB_CYBER2000_DDC=y
# CONFIG_FB_ARC is not set
# CONFIG_FB_ASILIANT is not set
# CONFIG_FB_IMSTT is not set
# CONFIG_FB_VGA16 is not set
CONFIG_FB_VESA=y
CONFIG_FB_EFI=y
# CONFIG_FB_N411 is not set
# CONFIG_FB_HGA is not set
# CONFIG_FB_S1D13XXX is not set
CONFIG_FB_NVIDIA=m
CONFIG_FB_NVIDIA_I2C=y
# CONFIG_FB_NVIDIA_DEBUG is not set
CONFIG_FB_NVIDIA_BACKLIGHT=y
# CONFIG_FB_RIVA is not set
CONFIG_FB_I810=m
# CONFIG_FB_I810_GTF is not set
# CONFIG_FB_LE80578 is not set
CONFIG_FB_MATROX=m
CONFIG_FB_MATROX_MILLENIUM=y
CONFIG_FB_MATROX_MYSTIQUE=y
CONFIG_FB_MATROX_G=y
CONFIG_FB_MATROX_I2C=m
# CONFIG_FB_MATROX_MAVEN is not set
CONFIG_FB_RADEON=m
CONFIG_FB_RADEON_I2C=y
CONFIG_FB_RADEON_BACKLIGHT=y
# CONFIG_FB_RADEON_DEBUG is not set
CONFIG_FB_ATY128=m
CONFIG_FB_ATY128_BACKLIGHT=y
CONFIG_FB_ATY=m
CONFIG_FB_ATY_CT=y
CONFIG_FB_ATY_GENERIC_LCD=y
CONFIG_FB_ATY_GX=y
CONFIG_FB_ATY_BACKLIGHT=y
# CONFIG_FB_S3 is not set
CONFIG_FB_SAVAGE=m
CONFIG_FB_SAVAGE_I2C=y
# CONFIG_FB_SAVAGE_ACCEL is not set
# CONFIG_FB_SIS is not set
CONFIG_FB_VIA=m
# CONFIG_FB_VIA_DIRECT_PROCFS is not set
# CONFIG_FB_NEOMAGIC is not set
# CONFIG_FB_KYRO is not set
CONFIG_FB_3DFX=m
# CONFIG_FB_3DFX_ACCEL is not set
CONFIG_FB_3DFX_I2C=y
# CONFIG_FB_VOODOO1 is not set
# CONFIG_FB_VT8623 is not set
# CONFIG_FB_TRIDENT is not set
# CONFIG_FB_ARK is not set
# CONFIG_FB_PM3 is not set
# CONFIG_FB_CARMINE is not set
CONFIG_FB_GEODE=y
# CONFIG_FB_GEODE_LX is not set
# CONFIG_FB_GEODE_GX is not set
# CONFIG_FB_GEODE_GX1 is not set
# CONFIG_FB_UDL is not set
# CONFIG_FB_VIRTUAL is not set
# CONFIG_FB_METRONOME is not set
# CONFIG_FB_MB862XX is not set
# CONFIG_FB_BROADSHEET is not set
CONFIG_BACKLIGHT_LCD_SUPPORT=y
# CONFIG_LCD_CLASS_DEVICE is not set
CONFIG_BACKLIGHT_CLASS_DEVICE=y
# CONFIG_BACKLIGHT_GENERIC is not set
# CONFIG_BACKLIGHT_PROGEAR is not set
# CONFIG_BACKLIGHT_APPLE is not set
# CONFIG_BACKLIGHT_SAHARA is not set
# CONFIG_BACKLIGHT_ADP8860 is not set

#
# Display device support
#
# CONFIG_DISPLAY_SUPPORT is not set

#
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
# CONFIG_VGACON_SOFT_SCROLLBACK is not set
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=y
# CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY is not set
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
# CONFIG_FONTS is not set
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
# CONFIG_LOGO is not set
CONFIG_SOUND=m
CONFIG_SOUND_OSS_CORE=y
# CONFIG_SOUND_OSS_CORE_PRECLAIM is not set
CONFIG_SND=m
CONFIG_SND_TIMER=m
CONFIG_SND_PCM=m
CONFIG_SND_HWDEP=m
CONFIG_SND_RAWMIDI=m
CONFIG_SND_JACK=y
CONFIG_SND_SEQUENCER=m
# CONFIG_SND_SEQ_DUMMY is not set
CONFIG_SND_OSSEMUL=y
CONFIG_SND_MIXER_OSS=m
CONFIG_SND_PCM_OSS=m
CONFIG_SND_PCM_OSS_PLUGINS=y
# CONFIG_SND_SEQUENCER_OSS is not set
CONFIG_SND_HRTIMER=m
CONFIG_SND_SEQ_HRTIMER_DEFAULT=y
CONFIG_SND_DYNAMIC_MINORS=y
CONFIG_SND_SUPPORT_OLD_API=y
CONFIG_SND_VERBOSE_PROCFS=y
# CONFIG_SND_VERBOSE_PRINTK is not set
# CONFIG_SND_DEBUG is not set
CONFIG_SND_VMASTER=y
CONFIG_SND_DMA_SGBUF=y
CONFIG_SND_RAWMIDI_SEQ=m
CONFIG_SND_OPL3_LIB_SEQ=m
# CONFIG_SND_OPL4_LIB_SEQ is not set
# CONFIG_SND_SBAWE_SEQ is not set
CONFIG_SND_EMU10K1_SEQ=m
CONFIG_SND_MPU401_UART=m
CONFIG_SND_OPL3_LIB=m
CONFIG_SND_VX_LIB=m
CONFIG_SND_AC97_CODEC=m
CONFIG_SND_DRIVERS=y
CONFIG_SND_PCSP=m
CONFIG_SND_DUMMY=m
# CONFIG_SND_ALOOP is not set
CONFIG_SND_VIRMIDI=m
CONFIG_SND_MTPAV=m
CONFIG_SND_MTS64=m
CONFIG_SND_SERIAL_U16550=m
CONFIG_SND_MPU401=m
CONFIG_SND_PORTMAN2X4=m
CONFIG_SND_AC97_POWER_SAVE=y
CONFIG_SND_AC97_POWER_SAVE_DEFAULT=0
CONFIG_SND_SB_COMMON=m
CONFIG_SND_SB16_DSP=m
CONFIG_SND_PCI=y
CONFIG_SND_AD1889=m
CONFIG_SND_ALS300=m
CONFIG_SND_ALS4000=m
CONFIG_SND_ALI5451=m
CONFIG_SND_ASIHPI=m
CONFIG_SND_ATIIXP=m
CONFIG_SND_ATIIXP_MODEM=m
CONFIG_SND_AU8810=m
CONFIG_SND_AU8820=m
CONFIG_SND_AU8830=m
# CONFIG_SND_AW2 is not set
CONFIG_SND_AZT3328=m
CONFIG_SND_BT87X=m
# CONFIG_SND_BT87X_OVERCLOCK is not set
CONFIG_SND_CA0106=m
CONFIG_SND_CMIPCI=m
CONFIG_SND_OXYGEN_LIB=m
CONFIG_SND_OXYGEN=m
CONFIG_SND_CS4281=m
CONFIG_SND_CS46XX=m
CONFIG_SND_CS46XX_NEW_DSP=y
CONFIG_SND_CS5530=m
CONFIG_SND_CS5535AUDIO=m
CONFIG_SND_CTXFI=m
CONFIG_SND_DARLA20=m
CONFIG_SND_GINA20=m
CONFIG_SND_LAYLA20=m
CONFIG_SND_DARLA24=m
CONFIG_SND_GINA24=m
CONFIG_SND_LAYLA24=m
CONFIG_SND_MONA=m
CONFIG_SND_MIA=m
CONFIG_SND_ECHO3G=m
CONFIG_SND_INDIGO=m
CONFIG_SND_INDIGOIO=m
CONFIG_SND_INDIGODJ=m
CONFIG_SND_INDIGOIOX=m
CONFIG_SND_INDIGODJX=m
CONFIG_SND_EMU10K1=m
CONFIG_SND_EMU10K1X=m
CONFIG_SND_ENS1370=m
CONFIG_SND_ENS1371=m
CONFIG_SND_ES1938=m
CONFIG_SND_ES1968=m
CONFIG_SND_ES1968_INPUT=y
CONFIG_SND_FM801=m
CONFIG_SND_HDA_INTEL=m
CONFIG_SND_HDA_HWDEP=y
CONFIG_SND_HDA_RECONFIG=y
CONFIG_SND_HDA_INPUT_BEEP=y
CONFIG_SND_HDA_INPUT_BEEP_MODE=1
CONFIG_SND_HDA_INPUT_JACK=y
CONFIG_SND_HDA_PATCH_LOADER=y
CONFIG_SND_HDA_CODEC_REALTEK=y
CONFIG_SND_HDA_CODEC_ANALOG=y
CONFIG_SND_HDA_CODEC_SIGMATEL=y
CONFIG_SND_HDA_CODEC_VIA=y
CONFIG_SND_HDA_CODEC_HDMI=y
CONFIG_SND_HDA_CODEC_CIRRUS=y
CONFIG_SND_HDA_CODEC_CONEXANT=y
CONFIG_SND_HDA_CODEC_CA0110=y
CONFIG_SND_HDA_CODEC_CMEDIA=y
CONFIG_SND_HDA_CODEC_SI3054=y
CONFIG_SND_HDA_GENERIC=y
CONFIG_SND_HDA_POWER_SAVE=y
CONFIG_SND_HDA_POWER_SAVE_DEFAULT=0
CONFIG_SND_HDSP=m
CONFIG_SND_HDSPM=m
CONFIG_SND_ICE1712=m
CONFIG_SND_ICE1724=m
CONFIG_SND_INTEL8X0=m
CONFIG_SND_INTEL8X0M=m
CONFIG_SND_KORG1212=m
CONFIG_SND_LX6464ES=m
CONFIG_SND_MAESTRO3=m
CONFIG_SND_MAESTRO3_INPUT=y
CONFIG_SND_MIXART=m
CONFIG_SND_NM256=m
CONFIG_SND_PCXHR=m
CONFIG_SND_RIPTIDE=m
CONFIG_SND_RME32=m
CONFIG_SND_RME96=m
CONFIG_SND_RME9652=m
CONFIG_SND_SIS7019=m
CONFIG_SND_SONICVIBES=m
CONFIG_SND_TRIDENT=m
CONFIG_SND_VIA82XX=m
CONFIG_SND_VIA82XX_MODEM=m
CONFIG_SND_VIRTUOSO=m
CONFIG_SND_VX222=m
CONFIG_SND_YMFPCI=m
CONFIG_SND_SPI=y
CONFIG_SND_USB=y
CONFIG_SND_USB_AUDIO=m
CONFIG_SND_USB_UA101=m
CONFIG_SND_USB_USX2Y=m
CONFIG_SND_USB_CAIAQ=m
CONFIG_SND_USB_CAIAQ_INPUT=y
CONFIG_SND_USB_US122L=m
# CONFIG_SND_USB_6FIRE is not set
CONFIG_SND_FIREWIRE=y
# CONFIG_SND_FIREWIRE_SPEAKERS is not set
CONFIG_SND_PCMCIA=y
CONFIG_SND_VXPOCKET=m
CONFIG_SND_PDAUDIOCF=m
# CONFIG_SND_SOC is not set
# CONFIG_SOUND_PRIME is not set
CONFIG_AC97_BUS=m
CONFIG_HID_SUPPORT=y
CONFIG_HID=m
CONFIG_HIDRAW=y

#
# USB Input Devices
#
CONFIG_USB_HID=m
CONFIG_HID_PID=y
CONFIG_USB_HIDDEV=y

#
# Special HID drivers
#
CONFIG_HID_A4TECH=m
# CONFIG_HID_ACRUX is not set
CONFIG_HID_APPLE=m
CONFIG_HID_BELKIN=m
CONFIG_HID_CHERRY=m
CONFIG_HID_CHICONY=m
CONFIG_HID_PRODIKEYS=m
CONFIG_HID_CYPRESS=m
# CONFIG_HID_DRAGONRISE is not set
# CONFIG_HID_EMS_FF is not set
CONFIG_HID_EZKEY=m
# CONFIG_HID_KEYTOUCH is not set
CONFIG_HID_KYE=m
# CONFIG_HID_UCLOGIC is not set
# CONFIG_HID_WALTOP is not set
# CONFIG_HID_GYRATION is not set
# CONFIG_HID_TWINHAN is not set
CONFIG_HID_KENSINGTON=m
# CONFIG_HID_LCPOWER is not set
CONFIG_HID_LOGITECH=m
CONFIG_LOGITECH_FF=y
CONFIG_LOGIRUMBLEPAD2_FF=y
CONFIG_LOGIG940_FF=y
CONFIG_LOGIWII_FF=y
CONFIG_HID_MICROSOFT=m
# CONFIG_HID_MOSART is not set
CONFIG_HID_MONTEREY=m
# CONFIG_HID_MULTITOUCH is not set
# CONFIG_HID_NTRIG is not set
# CONFIG_HID_ORTEK is not set
# CONFIG_HID_PANTHERLORD is not set
# CONFIG_HID_PETALYNX is not set
# CONFIG_HID_PICOLCD is not set
# CONFIG_HID_QUANTA is not set
# CONFIG_HID_ROCCAT is not set
# CONFIG_HID_ROCCAT_ARVO is not set
# CONFIG_HID_ROCCAT_KONE is not set
# CONFIG_HID_ROCCAT_KONEPLUS is not set
# CONFIG_HID_ROCCAT_KOVAPLUS is not set
# CONFIG_HID_ROCCAT_PYRA is not set
# CONFIG_HID_SAMSUNG is not set
# CONFIG_HID_SONY is not set
# CONFIG_HID_SUNPLUS is not set
# CONFIG_HID_GREENASIA is not set
# CONFIG_HID_SMARTJOYPLUS is not set
# CONFIG_HID_TOPSEED is not set
# CONFIG_HID_THRUSTMASTER is not set
# CONFIG_HID_ZEROPLUS is not set
# CONFIG_HID_ZYDACRON is not set
CONFIG_USB_SUPPORT=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
CONFIG_USB_ARCH_HAS_EHCI=y
CONFIG_USB=m
# CONFIG_USB_DEBUG is not set
CONFIG_USB_ANNOUNCE_NEW_DEVICES=y

#
# Miscellaneous USB options
#
CONFIG_USB_DEVICEFS=y
# CONFIG_USB_DEVICE_CLASS is not set
CONFIG_USB_DYNAMIC_MINORS=y
CONFIG_USB_SUSPEND=y
# CONFIG_USB_OTG is not set
# CONFIG_USB_MON is not set
# CONFIG_USB_WUSB is not set
# CONFIG_USB_WUSB_CBAF is not set

#
# USB Host Controller Drivers
#
# CONFIG_USB_C67X00_HCD is not set
# CONFIG_USB_XHCI_HCD is not set
CONFIG_USB_EHCI_HCD=m
CONFIG_USB_EHCI_ROOT_HUB_TT=y
CONFIG_USB_EHCI_TT_NEWSCHED=y
# CONFIG_USB_OXU210HP_HCD is not set
# CONFIG_USB_ISP116X_HCD is not set
# CONFIG_USB_ISP1760_HCD is not set
# CONFIG_USB_ISP1362_HCD is not set
# CONFIG_USB_OHCI_HCD is not set
CONFIG_USB_UHCI_HCD=m
# CONFIG_USB_SL811_HCD is not set
# CONFIG_USB_R8A66597_HCD is not set
# CONFIG_USB_WHCI_HCD is not set
# CONFIG_USB_HWA_HCD is not set

#
# Enable Host or Gadget support to see Inventra options
#
# CONFIG_USB_RENESAS_USBHS is not set

#
# USB Device Class drivers
#
# CONFIG_USB_ACM is not set
# CONFIG_USB_PRINTER is not set
# CONFIG_USB_WDM is not set
# CONFIG_USB_TMC is not set

#
# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
#

#
# also be needed; see USB_STORAGE Help for more info
#
CONFIG_USB_STORAGE=m
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_STORAGE_REALTEK is not set
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_FREECOM is not set
# CONFIG_USB_STORAGE_ISD200 is not set
# CONFIG_USB_STORAGE_USBAT is not set
# CONFIG_USB_STORAGE_SDDR09 is not set
# CONFIG_USB_STORAGE_SDDR55 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_STORAGE_ALAUDA is not set
# CONFIG_USB_STORAGE_ONETOUCH is not set
# CONFIG_USB_STORAGE_KARMA is not set
# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
# CONFIG_USB_STORAGE_ENE_UB6250 is not set
CONFIG_USB_UAS=m
# CONFIG_USB_LIBUSUAL is not set

#
# USB Imaging devices
#
# CONFIG_USB_MDC800 is not set
# CONFIG_USB_MICROTEK is not set

#
# USB port drivers
#
# CONFIG_USB_USS720 is not set
# CONFIG_USB_SERIAL is not set

#
# USB Miscellaneous drivers
#
# CONFIG_USB_EMI62 is not set
# CONFIG_USB_EMI26 is not set
# CONFIG_USB_ADUTUX is not set
# CONFIG_USB_SEVSEG is not set
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_LEGOTOWER is not set
# CONFIG_USB_LCD is not set
# CONFIG_USB_LED is not set
# CONFIG_USB_CYPRESS_CY7C63 is not set
# CONFIG_USB_CYTHERM is not set
# CONFIG_USB_IDMOUSE is not set
# CONFIG_USB_FTDI_ELAN is not set
CONFIG_USB_APPLEDISPLAY=m
# CONFIG_USB_SISUSBVGA is not set
# CONFIG_USB_LD is not set
# CONFIG_USB_TRANCEVIBRATOR is not set
# CONFIG_USB_IOWARRIOR is not set
# CONFIG_USB_TEST is not set
# CONFIG_USB_ISIGHTFW is not set
# CONFIG_USB_YUREX is not set
# CONFIG_USB_GADGET is not set

#
# OTG and related infrastructure
#
# CONFIG_USB_GPIO_VBUS is not set
# CONFIG_NOP_USB_XCEIV is not set
# CONFIG_UWB is not set
# CONFIG_MMC is not set
# CONFIG_MEMSTICK is not set
CONFIG_NEW_LEDS=y
CONFIG_LEDS_CLASS=y

#
# LED drivers
#
# CONFIG_LEDS_LM3530 is not set
# CONFIG_LEDS_ALIX2 is not set
# CONFIG_LEDS_PCA9532 is not set
# CONFIG_LEDS_GPIO is not set
# CONFIG_LEDS_LP3944 is not set
# CONFIG_LEDS_LP5521 is not set
# CONFIG_LEDS_LP5523 is not set
# CONFIG_LEDS_CLEVO_MAIL is not set
# CONFIG_LEDS_PCA955X is not set
# CONFIG_LEDS_DAC124S085 is not set
# CONFIG_LEDS_REGULATOR is not set
# CONFIG_LEDS_BD2802 is not set
# CONFIG_LEDS_INTEL_SS4200 is not set
# CONFIG_LEDS_LT3593 is not set
CONFIG_LEDS_TRIGGERS=y

#
# LED Triggers
#
# CONFIG_LEDS_TRIGGER_TIMER is not set
# CONFIG_LEDS_TRIGGER_HEARTBEAT is not set
# CONFIG_LEDS_TRIGGER_BACKLIGHT is not set
# CONFIG_LEDS_TRIGGER_GPIO is not set
# CONFIG_LEDS_TRIGGER_DEFAULT_ON is not set

#
# iptables trigger is under Netfilter config (LED target)
#
# CONFIG_NFC_DEVICES is not set
CONFIG_ACCESSIBILITY=y
CONFIG_A11Y_BRAILLE_CONSOLE=y
# CONFIG_INFINIBAND is not set
CONFIG_EDAC=y

#
# Reporting subsystems
#
# CONFIG_EDAC_DEBUG is not set
# CONFIG_EDAC_DECODE_MCE is not set
# CONFIG_EDAC_MM_EDAC is not set
CONFIG_RTC_LIB=y
CONFIG_RTC_CLASS=y
CONFIG_RTC_HCTOSYS=y
CONFIG_RTC_HCTOSYS_DEVICE="rtc0"
# CONFIG_RTC_DEBUG is not set

#
# RTC interfaces
#
CONFIG_RTC_INTF_SYSFS=y
CONFIG_RTC_INTF_PROC=y
CONFIG_RTC_INTF_DEV=y
# CONFIG_RTC_INTF_DEV_UIE_EMUL is not set
# CONFIG_RTC_DRV_TEST is not set

#
# I2C RTC drivers
#
# CONFIG_RTC_DRV_DS1307 is not set
# CONFIG_RTC_DRV_DS1374 is not set
# CONFIG_RTC_DRV_DS1672 is not set
# CONFIG_RTC_DRV_DS3232 is not set
# CONFIG_RTC_DRV_MAX6900 is not set
# CONFIG_RTC_DRV_RS5C372 is not set
# CONFIG_RTC_DRV_ISL1208 is not set
# CONFIG_RTC_DRV_ISL12022 is not set
# CONFIG_RTC_DRV_X1205 is not set
# CONFIG_RTC_DRV_PCF8563 is not set
# CONFIG_RTC_DRV_PCF8583 is not set
# CONFIG_RTC_DRV_M41T80 is not set
# CONFIG_RTC_DRV_BQ32K is not set
# CONFIG_RTC_DRV_S35390A is not set
# CONFIG_RTC_DRV_FM3130 is not set
# CONFIG_RTC_DRV_RX8581 is not set
# CONFIG_RTC_DRV_RX8025 is not set

#
# SPI RTC drivers
#
# CONFIG_RTC_DRV_M41T94 is not set
# CONFIG_RTC_DRV_DS1305 is not set
# CONFIG_RTC_DRV_DS1390 is not set
# CONFIG_RTC_DRV_MAX6902 is not set
# CONFIG_RTC_DRV_R9701 is not set
# CONFIG_RTC_DRV_RS5C348 is not set
# CONFIG_RTC_DRV_DS3234 is not set
# CONFIG_RTC_DRV_PCF2123 is not set

#
# Platform RTC drivers
#
CONFIG_RTC_DRV_CMOS=y
# CONFIG_RTC_DRV_DS1286 is not set
# CONFIG_RTC_DRV_DS1511 is not set
# CONFIG_RTC_DRV_DS1553 is not set
# CONFIG_RTC_DRV_DS1742 is not set
# CONFIG_RTC_DRV_STK17TA8 is not set
# CONFIG_RTC_DRV_M48T86 is not set
# CONFIG_RTC_DRV_M48T35 is not set
# CONFIG_RTC_DRV_M48T59 is not set
# CONFIG_RTC_DRV_MSM6242 is not set
# CONFIG_RTC_DRV_BQ4802 is not set
# CONFIG_RTC_DRV_RP5C01 is not set
# CONFIG_RTC_DRV_V3020 is not set

#
# on-CPU RTC drivers
#
CONFIG_DMADEVICES=y
# CONFIG_DMADEVICES_DEBUG is not set

#
# DMA Devices
#
# CONFIG_INTEL_MID_DMAC is not set
# CONFIG_INTEL_IOATDMA is not set
# CONFIG_TIMB_DMA is not set
# CONFIG_PCH_DMA is not set
# CONFIG_AUXDISPLAY is not set
CONFIG_UIO=m
# CONFIG_UIO_CIF is not set
# CONFIG_UIO_PDRV is not set
# CONFIG_UIO_PDRV_GENIRQ is not set
# CONFIG_UIO_AEC is not set
# CONFIG_UIO_SERCOS3 is not set
# CONFIG_UIO_PCI_GENERIC is not set
# CONFIG_UIO_NETX is not set
# CONFIG_STAGING is not set
CONFIG_X86_PLATFORM_DEVICES=y
# CONFIG_ACERHDF is not set
# CONFIG_ASUS_LAPTOP is not set
# CONFIG_FUJITSU_LAPTOP is not set
# CONFIG_HP_ACCEL is not set
# CONFIG_MSI_LAPTOP is not set
# CONFIG_PANASONIC_LAPTOP is not set
# CONFIG_COMPAL_LAPTOP is not set
# CONFIG_SONY_LAPTOP is not set
# CONFIG_IDEAPAD_LAPTOP is not set
CONFIG_THINKPAD_ACPI=m
CONFIG_THINKPAD_ACPI_ALSA_SUPPORT=y
# CONFIG_THINKPAD_ACPI_DEBUGFACILITIES is not set
# CONFIG_THINKPAD_ACPI_DEBUG is not set
# CONFIG_THINKPAD_ACPI_UNSAFE_LEDS is not set
CONFIG_THINKPAD_ACPI_VIDEO=y
CONFIG_THINKPAD_ACPI_HOTKEY_POLL=y
# CONFIG_SENSORS_HDAPS is not set
# CONFIG_INTEL_MENLOW is not set
# CONFIG_EEEPC_LAPTOP is not set
# CONFIG_ACPI_WMI is not set
# CONFIG_ACPI_ASUS is not set
# CONFIG_TOPSTAR_LAPTOP is not set
# CONFIG_ACPI_TOSHIBA is not set
# CONFIG_TOSHIBA_BT_RFKILL is not set
# CONFIG_ACPI_CMPC is not set
# CONFIG_INTEL_IPS is not set
# CONFIG_IBM_RTL is not set
# CONFIG_XO15_EBOOK is not set
# CONFIG_SAMSUNG_LAPTOP is not set
# CONFIG_INTEL_OAKTRAIL is not set

#
# Firmware Drivers
#
# CONFIG_EDD is not set
CONFIG_FIRMWARE_MEMMAP=y
# CONFIG_EFI_VARS is not set
# CONFIG_DELL_RBU is not set
# CONFIG_DCDBAS is not set
CONFIG_DMIID=y
# CONFIG_DMI_SYSFS is not set
CONFIG_ISCSI_IBFT_FIND=y
# CONFIG_ISCSI_IBFT is not set
# CONFIG_SIGMA is not set

#
# File systems
#
# CONFIG_EXT2_FS is not set
CONFIG_EXT3_FS=m
CONFIG_EXT3_DEFAULTS_TO_ORDERED=y
CONFIG_EXT3_FS_XATTR=y
CONFIG_EXT3_FS_POSIX_ACL=y
CONFIG_EXT3_FS_SECURITY=y
CONFIG_EXT4_FS=m
# CONFIG_EXT4_USE_FOR_EXT23 is not set
CONFIG_EXT4_FS_XATTR=y
CONFIG_EXT4_FS_POSIX_ACL=y
CONFIG_EXT4_FS_SECURITY=y
# CONFIG_EXT4_DEBUG is not set
CONFIG_JBD=m
# CONFIG_JBD_DEBUG is not set
CONFIG_JBD2=m
# CONFIG_JBD2_DEBUG is not set
CONFIG_FS_MBCACHE=m
# CONFIG_REISERFS_FS is not set
# CONFIG_JFS_FS is not set
# CONFIG_XFS_FS is not set
# CONFIG_GFS2_FS is not set
# CONFIG_OCFS2_FS is not set
# CONFIG_BTRFS_FS is not set
# CONFIG_NILFS2_FS is not set
CONFIG_FS_POSIX_ACL=y
CONFIG_FILE_LOCKING=y
CONFIG_FSNOTIFY=y
CONFIG_DNOTIFY=y
CONFIG_INOTIFY_USER=y
CONFIG_FANOTIFY=y
# CONFIG_FANOTIFY_ACCESS_PERMISSIONS is not set
CONFIG_QUOTA=y
CONFIG_QUOTA_NETLINK_INTERFACE=y
CONFIG_PRINT_QUOTA_WARNING=y
# CONFIG_QUOTA_DEBUG is not set
# CONFIG_QFMT_V1 is not set
# CONFIG_QFMT_V2 is not set
CONFIG_QUOTACTL=y
CONFIG_AUTOFS4_FS=m
CONFIG_FUSE_FS=m
CONFIG_OVERLAYFS_FS=m
# CONFIG_CUSE is not set
CONFIG_GENERIC_ACL=y

#
# Caches
#
# CONFIG_FSCACHE is not set

#
# CD-ROM/DVD Filesystems
#
# CONFIG_ISO9660_FS is not set
# CONFIG_UDF_FS is not set

#
# DOS/FAT/NT Filesystems
#
# CONFIG_MSDOS_FS is not set
# CONFIG_VFAT_FS is not set
# CONFIG_NTFS_FS is not set

#
# Pseudo filesystems
#
CONFIG_PROC_FS=y
CONFIG_PROC_KCORE=y
CONFIG_PROC_SYSCTL=y
CONFIG_PROC_PAGE_MONITOR=y
CONFIG_SYSFS=y
CONFIG_TMPFS=y
CONFIG_TMPFS_POSIX_ACL=y
CONFIG_HUGETLBFS=y
CONFIG_HUGETLB_PAGE=y
CONFIG_CONFIGFS_FS=m
CONFIG_MISC_FILESYSTEMS=y
# CONFIG_ADFS_FS is not set
# CONFIG_AFFS_FS is not set
# CONFIG_ECRYPT_FS is not set
# CONFIG_HFS_FS is not set
# CONFIG_HFSPLUS_FS is not set
# CONFIG_BEFS_FS is not set
# CONFIG_BFS_FS is not set
# CONFIG_EFS_FS is not set
# CONFIG_LOGFS is not set
# CONFIG_CRAMFS is not set
CONFIG_SQUASHFS=m
CONFIG_SQUASHFS_XATTR=y
# CONFIG_SQUASHFS_LZO is not set
CONFIG_SQUASHFS_XZ=y
# CONFIG_SQUASHFS_EMBEDDED is not set
CONFIG_SQUASHFS_FRAGMENT_CACHE_SIZE=3
# CONFIG_VXFS_FS is not set
# CONFIG_MINIX_FS is not set
# CONFIG_OMFS_FS is not set
# CONFIG_HPFS_FS is not set
# CONFIG_QNX4FS_FS is not set
# CONFIG_ROMFS_FS is not set
CONFIG_PSTORE=y
# CONFIG_SYSV_FS is not set
# CONFIG_UFS_FS is not set
CONFIG_NETWORK_FILESYSTEMS=y
# CONFIG_NFS_FS is not set
# CONFIG_NFSD is not set
# CONFIG_CEPH_FS is not set
# CONFIG_CIFS is not set
# CONFIG_NCP_FS is not set
# CONFIG_CODA_FS is not set
# CONFIG_AFS_FS is not set

#
# Partition Types
#
CONFIG_PARTITION_ADVANCED=y
CONFIG_ACORN_PARTITION=y
# CONFIG_ACORN_PARTITION_CUMANA is not set
# CONFIG_ACORN_PARTITION_EESOX is not set
CONFIG_ACORN_PARTITION_ICS=y
# CONFIG_ACORN_PARTITION_ADFS is not set
# CONFIG_ACORN_PARTITION_POWERTEC is not set
CONFIG_ACORN_PARTITION_RISCIX=y
CONFIG_OSF_PARTITION=y
CONFIG_AMIGA_PARTITION=y
CONFIG_ATARI_PARTITION=y
CONFIG_MAC_PARTITION=y
CONFIG_MSDOS_PARTITION=y
CONFIG_BSD_DISKLABEL=y
CONFIG_MINIX_SUBPARTITION=y
CONFIG_SOLARIS_X86_PARTITION=y
CONFIG_UNIXWARE_DISKLABEL=y
CONFIG_LDM_PARTITION=y
# CONFIG_LDM_DEBUG is not set
CONFIG_SGI_PARTITION=y
CONFIG_ULTRIX_PARTITION=y
CONFIG_SUN_PARTITION=y
CONFIG_KARMA_PARTITION=y
CONFIG_EFI_PARTITION=y
# CONFIG_SYSV68_PARTITION is not set
CONFIG_NLS=y
CONFIG_NLS_DEFAULT="utf8"
# CONFIG_NLS_CODEPAGE_437 is not set
# CONFIG_NLS_CODEPAGE_737 is not set
# CONFIG_NLS_CODEPAGE_775 is not set
# CONFIG_NLS_CODEPAGE_850 is not set
# CONFIG_NLS_CODEPAGE_852 is not set
# CONFIG_NLS_CODEPAGE_855 is not set
# CONFIG_NLS_CODEPAGE_857 is not set
# CONFIG_NLS_CODEPAGE_860 is not set
# CONFIG_NLS_CODEPAGE_861 is not set
# CONFIG_NLS_CODEPAGE_862 is not set
# CONFIG_NLS_CODEPAGE_863 is not set
# CONFIG_NLS_CODEPAGE_864 is not set
# CONFIG_NLS_CODEPAGE_865 is not set
# CONFIG_NLS_CODEPAGE_866 is not set
# CONFIG_NLS_CODEPAGE_869 is not set
# CONFIG_NLS_CODEPAGE_936 is not set
# CONFIG_NLS_CODEPAGE_950 is not set
# CONFIG_NLS_CODEPAGE_932 is not set
# CONFIG_NLS_CODEPAGE_949 is not set
# CONFIG_NLS_CODEPAGE_874 is not set
# CONFIG_NLS_ISO8859_8 is not set
# CONFIG_NLS_CODEPAGE_1250 is not set
# CONFIG_NLS_CODEPAGE_1251 is not set
# CONFIG_NLS_ASCII is not set
# CONFIG_NLS_ISO8859_1 is not set
# CONFIG_NLS_ISO8859_2 is not set
# CONFIG_NLS_ISO8859_3 is not set
# CONFIG_NLS_ISO8859_4 is not set
# CONFIG_NLS_ISO8859_5 is not set
# CONFIG_NLS_ISO8859_6 is not set
# CONFIG_NLS_ISO8859_7 is not set
# CONFIG_NLS_ISO8859_9 is not set
# CONFIG_NLS_ISO8859_13 is not set
# CONFIG_NLS_ISO8859_14 is not set
# CONFIG_NLS_ISO8859_15 is not set
# CONFIG_NLS_KOI8_R is not set
# CONFIG_NLS_KOI8_U is not set
# CONFIG_NLS_UTF8 is not set
CONFIG_DLM=m
CONFIG_DLM_DEBUG=y

#
# Kernel hacking
#
CONFIG_TRACE_IRQFLAGS_SUPPORT=y
CONFIG_PRINTK_TIME=y
CONFIG_DEFAULT_MESSAGE_LOGLEVEL=4
CONFIG_ENABLE_WARN_DEPRECATED=y
CONFIG_ENABLE_MUST_CHECK=y
CONFIG_FRAME_WARN=1024
CONFIG_MAGIC_SYSRQ=y
CONFIG_MAGIC_SYSRQ_DEFAULT_MASK=0x01b6
CONFIG_STRIP_ASM_SYMS=y
CONFIG_UNUSED_SYMBOLS=y
CONFIG_DEBUG_FS=y
# CONFIG_HEADERS_CHECK is not set
CONFIG_DEBUG_SECTION_MISMATCH=y
CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_SHIRQ is not set
CONFIG_LOCKUP_DETECTOR=y
CONFIG_HARDLOCKUP_DETECTOR=y
# CONFIG_BOOTPARAM_HARDLOCKUP_PANIC is not set
CONFIG_BOOTPARAM_HARDLOCKUP_PANIC_VALUE=0
# CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC is not set
CONFIG_BOOTPARAM_SOFTLOCKUP_PANIC_VALUE=0
CONFIG_DETECT_HUNG_TASK=y
# CONFIG_BOOTPARAM_HUNG_TASK_PANIC is not set
CONFIG_BOOTPARAM_HUNG_TASK_PANIC_VALUE=0
CONFIG_SCHED_DEBUG=y
# CONFIG_SCHEDSTATS is not set
CONFIG_TIMER_STATS=y
# CONFIG_DEBUG_OBJECTS is not set
# CONFIG_SLUB_DEBUG_ON is not set
# CONFIG_SLUB_STATS is not set
# CONFIG_DEBUG_KMEMLEAK is not set
# CONFIG_DEBUG_RT_MUTEXES is not set
# CONFIG_RT_MUTEX_TESTER is not set
# CONFIG_DEBUG_SPINLOCK is not set
# CONFIG_DEBUG_MUTEXES is not set
# CONFIG_DEBUG_LOCK_ALLOC is not set
# CONFIG_PROVE_LOCKING is not set
# CONFIG_SPARSE_RCU_POINTER is not set
# CONFIG_LOCK_STAT is not set
# CONFIG_DEBUG_SPINLOCK_SLEEP is not set
# CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set
CONFIG_STACKTRACE=y
# CONFIG_DEBUG_KOBJECT is not set
# CONFIG_DEBUG_HIGHMEM is not set
CONFIG_DEBUG_BUGVERBOSE=y
# CONFIG_DEBUG_INFO is not set
# CONFIG_DEBUG_VM is not set
# CONFIG_DEBUG_VIRTUAL is not set
# CONFIG_DEBUG_WRITECOUNT is not set
CONFIG_DEBUG_MEMORY_INIT=y
# CONFIG_DEBUG_LIST is not set
# CONFIG_TEST_LIST_SORT is not set
# CONFIG_DEBUG_SG is not set
# CONFIG_DEBUG_NOTIFIERS is not set
# CONFIG_DEBUG_CREDENTIALS is not set
CONFIG_ARCH_WANT_FRAME_POINTERS=y
CONFIG_FRAME_POINTER=y
# CONFIG_BOOT_PRINTK_DELAY is not set
CONFIG_RCU_TORTURE_TEST=m
CONFIG_RCU_CPU_STALL_TIMEOUT=60
# CONFIG_KPROBES_SANITY_TEST is not set
# CONFIG_BACKTRACE_SELF_TEST is not set
# CONFIG_DEBUG_BLOCK_EXT_DEVT is not set
# CONFIG_DEBUG_FORCE_WEAK_PER_CPU is not set
# CONFIG_LKDTM is not set
# CONFIG_CPU_NOTIFIER_ERROR_INJECT is not set
# CONFIG_FAULT_INJECTION is not set
# CONFIG_LATENCYTOP is not set
CONFIG_SYSCTL_SYSCALL_CHECK=y
# CONFIG_DEBUG_PAGEALLOC is not set
CONFIG_USER_STACKTRACE_SUPPORT=y
CONFIG_NOP_TRACER=y
CONFIG_HAVE_FUNCTION_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_TRACER=y
CONFIG_HAVE_FUNCTION_GRAPH_FP_TEST=y
CONFIG_HAVE_FUNCTION_TRACE_MCOUNT_TEST=y
CONFIG_HAVE_DYNAMIC_FTRACE=y
CONFIG_HAVE_FTRACE_MCOUNT_RECORD=y
CONFIG_HAVE_SYSCALL_TRACEPOINTS=y
CONFIG_HAVE_C_RECORDMCOUNT=y
CONFIG_RING_BUFFER=y
CONFIG_EVENT_TRACING=y
CONFIG_EVENT_POWER_TRACING_DEPRECATED=y
CONFIG_CONTEXT_SWITCH_TRACER=y
CONFIG_TRACING=y
CONFIG_GENERIC_TRACER=y
CONFIG_TRACING_SUPPORT=y
CONFIG_FTRACE=y
# CONFIG_FUNCTION_TRACER is not set
# CONFIG_IRQSOFF_TRACER is not set
# CONFIG_SCHED_TRACER is not set
# CONFIG_FTRACE_SYSCALLS is not set
CONFIG_BRANCH_PROFILE_NONE=y
# CONFIG_PROFILE_ANNOTATED_BRANCHES is not set
# CONFIG_PROFILE_ALL_BRANCHES is not set
# CONFIG_STACK_TRACER is not set
CONFIG_BLK_DEV_IO_TRACE=y
CONFIG_KPROBE_EVENT=y
# CONFIG_FTRACE_STARTUP_TEST is not set
# CONFIG_MMIOTRACE is not set
# CONFIG_RING_BUFFER_BENCHMARK is not set
# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set
# CONFIG_DYNAMIC_DEBUG is not set
# CONFIG_DMA_API_DEBUG is not set
# CONFIG_ATOMIC64_SELFTEST is not set
# CONFIG_SAMPLES is not set
CONFIG_HAVE_ARCH_KGDB=y
CONFIG_KGDB=y
CONFIG_KGDB_SERIAL_CONSOLE=y
# CONFIG_KGDB_TESTS is not set
# CONFIG_KGDB_LOW_LEVEL_TRAP is not set
CONFIG_KGDB_KDB=y
CONFIG_KDB_KEYBOARD=y
CONFIG_HAVE_ARCH_KMEMCHECK=y
# CONFIG_TEST_KSTRTOX is not set
CONFIG_STRICT_DEVMEM=y
CONFIG_X86_VERBOSE_BOOTUP=y
CONFIG_EARLY_PRINTK=y
# CONFIG_EARLY_PRINTK_DBGP is not set
# CONFIG_DEBUG_STACKOVERFLOW is not set
# CONFIG_DEBUG_STACK_USAGE is not set
# CONFIG_DEBUG_PER_CPU_MAPS is not set
# CONFIG_X86_PTDUMP is not set
# CONFIG_DEBUG_RODATA is not set
# CONFIG_DEBUG_SET_MODULE_RONX is not set
# CONFIG_DEBUG_NX_TEST is not set
CONFIG_DOUBLEFAULT=y
# CONFIG_IOMMU_STRESS is not set
CONFIG_HAVE_MMIOTRACE_SUPPORT=y
# CONFIG_X86_DECODER_SELFTEST is not set
CONFIG_IO_DELAY_TYPE_0X80=0
CONFIG_IO_DELAY_TYPE_0XED=1
CONFIG_IO_DELAY_TYPE_UDELAY=2
CONFIG_IO_DELAY_TYPE_NONE=3
CONFIG_IO_DELAY_0X80=y
# CONFIG_IO_DELAY_0XED is not set
# CONFIG_IO_DELAY_UDELAY is not set
# CONFIG_IO_DELAY_NONE is not set
CONFIG_DEFAULT_IO_DELAY_TYPE=0
# CONFIG_DEBUG_BOOT_PARAMS is not set
# CONFIG_CPA_DEBUG is not set
CONFIG_OPTIMIZE_INLINING=y
# CONFIG_DEBUG_STRICT_USER_COPY_CHECKS is not set

#
# Security options
#
CONFIG_KEYS=y
# CONFIG_TRUSTED_KEYS is not set
CONFIG_KEYS_DEBUG_PROC_KEYS=y
# CONFIG_SECURITY_DMESG_RESTRICT is not set
CONFIG_SECURITY=y
CONFIG_SECURITYFS=y
CONFIG_SECURITY_NETWORK=y
CONFIG_SECURITY_NETWORK_XFRM=y
CONFIG_SECURITY_PATH=y
# CONFIG_INTEL_TXT is not set
CONFIG_LSM_MMAP_MIN_ADDR=0
CONFIG_SECURITY_SELINUX=y
CONFIG_SECURITY_SELINUX_BOOTPARAM=y
CONFIG_SECURITY_SELINUX_BOOTPARAM_VALUE=0
CONFIG_SECURITY_SELINUX_DISABLE=y
CONFIG_SECURITY_SELINUX_DEVELOP=y
CONFIG_SECURITY_SELINUX_AVC_STATS=y
CONFIG_SECURITY_SELINUX_CHECKREQPROT_VALUE=1
# CONFIG_SECURITY_SELINUX_POLICYDB_VERSION_MAX is not set
CONFIG_SECURITY_TOMOYO=y
# CONFIG_SECURITY_APPARMOR is not set
# CONFIG_IMA is not set
CONFIG_DEFAULT_SECURITY_SELINUX=y
# CONFIG_DEFAULT_SECURITY_TOMOYO is not set
# CONFIG_DEFAULT_SECURITY_DAC is not set
CONFIG_DEFAULT_SECURITY="selinux"
CONFIG_CRYPTO=y

#
# Crypto core or helper
#
CONFIG_CRYPTO_ALGAPI=y
CONFIG_CRYPTO_ALGAPI2=y
CONFIG_CRYPTO_AEAD2=y
CONFIG_CRYPTO_BLKCIPHER=m
CONFIG_CRYPTO_BLKCIPHER2=y
CONFIG_CRYPTO_HASH=y
CONFIG_CRYPTO_HASH2=y
CONFIG_CRYPTO_RNG2=y
CONFIG_CRYPTO_PCOMP2=y
CONFIG_CRYPTO_MANAGER=y
CONFIG_CRYPTO_MANAGER2=y
# CONFIG_CRYPTO_MANAGER_DISABLE_TESTS is not set
# CONFIG_CRYPTO_GF128MUL is not set
# CONFIG_CRYPTO_NULL is not set
# CONFIG_CRYPTO_PCRYPT is not set
CONFIG_CRYPTO_WORKQUEUE=y
# CONFIG_CRYPTO_CRYPTD is not set
# CONFIG_CRYPTO_AUTHENC is not set
# CONFIG_CRYPTO_TEST is not set

#
# Authenticated Encryption with Associated Data
#
# CONFIG_CRYPTO_CCM is not set
# CONFIG_CRYPTO_GCM is not set
# CONFIG_CRYPTO_SEQIV is not set

#
# Block modes
#
# CONFIG_CRYPTO_CBC is not set
# CONFIG_CRYPTO_CTR is not set
# CONFIG_CRYPTO_CTS is not set
CONFIG_CRYPTO_ECB=m
# CONFIG_CRYPTO_LRW is not set
# CONFIG_CRYPTO_PCBC is not set
# CONFIG_CRYPTO_XTS is not set

#
# Hash modes
#
CONFIG_CRYPTO_HMAC=m
# CONFIG_CRYPTO_XCBC is not set
# CONFIG_CRYPTO_VMAC is not set

#
# Digest
#
CONFIG_CRYPTO_CRC32C=m
# CONFIG_CRYPTO_CRC32C_INTEL is not set
# CONFIG_CRYPTO_GHASH is not set
# CONFIG_CRYPTO_MD4 is not set
CONFIG_CRYPTO_MD5=y
# CONFIG_CRYPTO_MICHAEL_MIC is not set
# CONFIG_CRYPTO_RMD128 is not set
# CONFIG_CRYPTO_RMD160 is not set
# CONFIG_CRYPTO_RMD256 is not set
# CONFIG_CRYPTO_RMD320 is not set
CONFIG_CRYPTO_SHA1=m
# CONFIG_CRYPTO_SHA256 is not set
# CONFIG_CRYPTO_SHA512 is not set
# CONFIG_CRYPTO_TGR192 is not set
# CONFIG_CRYPTO_WP512 is not set

#
# Ciphers
#
CONFIG_CRYPTO_AES=m
CONFIG_CRYPTO_AES_586=m
# CONFIG_CRYPTO_AES_NI_INTEL is not set
# CONFIG_CRYPTO_ANUBIS is not set
CONFIG_CRYPTO_ARC4=m
# CONFIG_CRYPTO_BLOWFISH is not set
# CONFIG_CRYPTO_CAMELLIA is not set
# CONFIG_CRYPTO_CAST5 is not set
# CONFIG_CRYPTO_CAST6 is not set
# CONFIG_CRYPTO_DES is not set
# CONFIG_CRYPTO_FCRYPT is not set
# CONFIG_CRYPTO_KHAZAD is not set
# CONFIG_CRYPTO_SALSA20 is not set
# CONFIG_CRYPTO_SALSA20_586 is not set
# CONFIG_CRYPTO_SEED is not set
# CONFIG_CRYPTO_SERPENT is not set
# CONFIG_CRYPTO_TEA is not set
# CONFIG_CRYPTO_TWOFISH is not set
# CONFIG_CRYPTO_TWOFISH_586 is not set

#
# Compression
#
# CONFIG_CRYPTO_DEFLATE is not set
# CONFIG_CRYPTO_ZLIB is not set
# CONFIG_CRYPTO_LZO is not set

#
# Random Number Generation
#
# CONFIG_CRYPTO_ANSI_CPRNG is not set
# CONFIG_CRYPTO_USER_API_HASH is not set
# CONFIG_CRYPTO_USER_API_SKCIPHER is not set
CONFIG_CRYPTO_HW=y
# CONFIG_CRYPTO_DEV_PADLOCK is not set
# CONFIG_CRYPTO_DEV_GEODE is not set
# CONFIG_CRYPTO_DEV_HIFN_795X is not set
CONFIG_HAVE_KVM=y
CONFIG_VIRTUALIZATION=y
# CONFIG_KVM is not set
# CONFIG_VHOST_NET is not set
# CONFIG_LGUEST is not set
CONFIG_VIRTIO=y
CONFIG_VIRTIO_RING=y
# CONFIG_VIRTIO_PCI is not set
# CONFIG_VIRTIO_BALLOON is not set
CONFIG_BINARY_PRINTF=y

#
# Library routines
#
CONFIG_BITREVERSE=y
CONFIG_GENERIC_FIND_FIRST_BIT=y
CONFIG_GENERIC_FIND_NEXT_BIT=y
CONFIG_GENERIC_FIND_LAST_BIT=y
CONFIG_CRC_CCITT=m
CONFIG_CRC16=m
CONFIG_CRC_T10DIF=m
CONFIG_CRC_ITU_T=m
CONFIG_CRC32=y
# CONFIG_CRC7 is not set
CONFIG_LIBCRC32C=m
CONFIG_AUDIT_GENERIC=y
CONFIG_ZLIB_INFLATE=y
CONFIG_LZO_DECOMPRESS=y
CONFIG_XZ_DEC=y
CONFIG_XZ_DEC_X86=y
CONFIG_XZ_DEC_POWERPC=y
CONFIG_XZ_DEC_IA64=y
CONFIG_XZ_DEC_ARM=y
CONFIG_XZ_DEC_ARMTHUMB=y
CONFIG_XZ_DEC_SPARC=y
CONFIG_XZ_DEC_BCJ=y
# CONFIG_XZ_DEC_TEST is not set
CONFIG_DECOMPRESS_GZIP=y
CONFIG_DECOMPRESS_BZIP2=y
CONFIG_DECOMPRESS_LZMA=y
CONFIG_DECOMPRESS_XZ=y
CONFIG_DECOMPRESS_LZO=y
CONFIG_HAS_IOMEM=y
CONFIG_HAS_IOPORT=y
CONFIG_HAS_DMA=y
CONFIG_CPU_RMAP=y
CONFIG_NLATTR=y
CONFIG_AVERAGE=y

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 00/12] IO-less dirty throttling v7
  2011-04-16 16:27 ` [PATCH 00/12] IO-less dirty throttling v7 Sedat Dilek
@ 2011-04-17  1:44   ` Wu Fengguang
  2011-04-17  3:18     ` Sedat Dilek
  0 siblings, 1 reply; 29+ messages in thread
From: Wu Fengguang @ 2011-04-17  1:44 UTC (permalink / raw)
  To: sedat.dilek@gmail.com
  Cc: Andrew Morton, Jan Kara, Christoph Hellwig, Trond Myklebust,
	Dave Chinner, Theodore Ts'o, Chris Mason, Peter Zijlstra,
	Mel Gorman, Rik van Riel, KOSAKI Motohiro, Greg Thelen,
	Minchan Kim, Vivek Goyal, Andrea Righi, Balbir Singh, linux-mm,
	linux-fsdevel@vger.kernel.org, LKML

[-- Attachment #1: Type: text/plain, Size: 1339 bytes --]

Hi Sedat,

On Sun, Apr 17, 2011 at 12:27:58AM +0800, Sedat Dilek wrote:

> I pulled your tree into linux-next (next-20110415) on an i386 Debian host.
> 
> My build breaks here:
> ...
>   MODPOST vmlinux.o
>   GEN     .version
>   CHK     include/generated/compile.h
>   UPD     include/generated/compile.h
>   CC      init/version.o
>   LD      init/built-in.o
>   LD      .tmp_vmlinux1
> mm/built-in.o: In function `bdi_position_ratio':
> page-writeback.c:(.text+0x5c83): undefined reference to `__udivdi3'

Yes it can be fixed by the attached patch.

> mm/built-in.o: In function `calc_period_shift.part.10':
> page-writeback.c:(.text+0x6446): undefined reference to `____ilog2_NaN'

I cannot reproduce this error. In the git tree, calc_period_shift() is
actually quite simple:

static int calc_period_shift(void)                
{                                                 
        return 2 + ilog2(default_backing_dev_info.avg_write_bandwidth);
}

where avg_write_bandwidth is of type "unsigned long".

> make[4]: *** [.tmp_vmlinux1] Error
> 
> BTW, which kernel-config options have to be set besides
> CONFIG_BLK_DEV_THROTTLING=y?

No. I used your kconfig on 2.6.39-rc3 and it compiles OK for i386.

I've pushed two patches into the git tree fixing the compile errors.
Thank you for trying it out and report!

Thanks,
Fengguang

[-- Attachment #2: bdi_position_ratio-__udivdi3-fix --]
[-- Type: text/plain, Size: 1096 bytes --]

Subject: writeback: i386 compile fix
Date: Sun Apr 17 09:04:44 CST 2011


mm/built-in.o: In function `bdi_position_ratio':
page-writeback.c:(.text+0x5c83): undefined reference to `__udivdi3'
mm/built-in.o: In function `calc_period_shift.part.10':
page-writeback.c:(.text+0x6446): undefined reference to `____ilog2_NaN'
make[4]: *** [.tmp_vmlinux1] Error

Reported-by: Sedat Dilek <sedat.dilek@googlemail.com>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 mm/page-writeback.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

--- linux-next.orig/mm/page-writeback.c	2011-04-17 09:02:32.000000000 +0800
+++ linux-next/mm/page-writeback.c	2011-04-17 09:03:58.000000000 +0800
@@ -634,9 +634,10 @@ static unsigned long bdi_position_ratio(
 	origin = bdi->avg_write_bandwidth + 2 * MIN_WRITEBACK_PAGES;
 	origin = min(origin, thresh - thresh / DIRTY_FULL_SCOPE);
 	if (bdi_dirty < origin) {
-		if (bdi_dirty > origin / 4)
-			bw = bw * origin / bdi_dirty;
-		else
+		if (bdi_dirty > origin / 4) {
+			bw *= origin;
+			do_div(bw, bdi_dirty);
+		} else
 			bw = bw * 4;
 	}
 

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 00/12] IO-less dirty throttling v7
  2011-04-17  1:44   ` Wu Fengguang
@ 2011-04-17  3:18     ` Sedat Dilek
  2011-04-17  4:10       ` Wu Fengguang
  0 siblings, 1 reply; 29+ messages in thread
From: Sedat Dilek @ 2011-04-17  3:18 UTC (permalink / raw)
  To: Wu Fengguang
  Cc: Andrew Morton, Jan Kara, Christoph Hellwig, Trond Myklebust,
	Dave Chinner, Theodore Ts'o, Chris Mason, Peter Zijlstra,
	Mel Gorman, Rik van Riel, KOSAKI Motohiro, Greg Thelen,
	Minchan Kim, Vivek Goyal, Andrea Righi, Balbir Singh, linux-mm,
	linux-fsdevel@vger.kernel.org, LKML

[-- Attachment #1: Type: text/plain, Size: 1895 bytes --]

On Sun, Apr 17, 2011 at 3:44 AM, Wu Fengguang <fengguang.wu@intel.com> wrote:
> Hi Sedat,
>
> On Sun, Apr 17, 2011 at 12:27:58AM +0800, Sedat Dilek wrote:
>
>> I pulled your tree into linux-next (next-20110415) on an i386 Debian host.
>>
>> My build breaks here:
>> ...
>>   MODPOST vmlinux.o
>>   GEN     .version
>>   CHK     include/generated/compile.h
>>   UPD     include/generated/compile.h
>>   CC      init/version.o
>>   LD      init/built-in.o
>>   LD      .tmp_vmlinux1
>> mm/built-in.o: In function `bdi_position_ratio':
>> page-writeback.c:(.text+0x5c83): undefined reference to `__udivdi3'
>
> Yes it can be fixed by the attached patch.
>
>> mm/built-in.o: In function `calc_period_shift.part.10':
>> page-writeback.c:(.text+0x6446): undefined reference to `____ilog2_NaN'
>
> I cannot reproduce this error. In the git tree, calc_period_shift() is
> actually quite simple:
>
> static int calc_period_shift(void)
> {
>        return 2 + ilog2(default_backing_dev_info.avg_write_bandwidth);
> }
>
> where avg_write_bandwidth is of type "unsigned long".
>
>> make[4]: *** [.tmp_vmlinux1] Error
>>
>> BTW, which kernel-config options have to be set besides
>> CONFIG_BLK_DEV_THROTTLING=y?
>
> No. I used your kconfig on 2.6.39-rc3 and it compiles OK for i386.
>
> I've pushed two patches into the git tree fixing the compile errors.
> Thank you for trying it out and report!
>
> Thanks,
> Fengguang
>

Thanks for your patch.

The 1st part of the build-error is gone, but 2nd part still remains:

  LD      .tmp_vmlinux1
mm/built-in.o: In function `calc_period_shift.part.10':
page-writeback.c:(.text+0x6458): undefined reference to `____ilog2_NaN'
make[4]: *** [.tmp_vmlinux1] Error 1

I have attached some disasm-ed files.

Unfortunately, I don't see any new commits in your GIT tree.

- Sedat -

[-- Attachment #2: mm_built-in.o.disasm.xz --]
[-- Type: application/octet-stream, Size: 442676 bytes --]

[-- Attachment #3: mm_page-writeback.o.disasm.xz --]
[-- Type: application/octet-stream, Size: 20252 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 00/12] IO-less dirty throttling v7
  2011-04-17  3:18     ` Sedat Dilek
@ 2011-04-17  4:10       ` Wu Fengguang
  2011-04-17  4:46         ` Sedat Dilek
  2011-04-18  0:13         ` Wu Fengguang
  0 siblings, 2 replies; 29+ messages in thread
From: Wu Fengguang @ 2011-04-17  4:10 UTC (permalink / raw)
  To: sedat.dilek@gmail.com
  Cc: Andrew Morton, Jan Kara, Christoph Hellwig, Trond Myklebust,
	Dave Chinner, Theodore Ts'o, Chris Mason, Peter Zijlstra,
	Mel Gorman, Rik van Riel, KOSAKI Motohiro, Greg Thelen,
	Minchan Kim, Vivek Goyal, Andrea Righi, Balbir Singh, linux-mm,
	linux-fsdevel@vger.kernel.org, LKML

On Sun, Apr 17, 2011 at 11:18:43AM +0800, Sedat Dilek wrote:
> On Sun, Apr 17, 2011 at 3:44 AM, Wu Fengguang <fengguang.wu@intel.com> wrote:
> > Hi Sedat,
> >
> > On Sun, Apr 17, 2011 at 12:27:58AM +0800, Sedat Dilek wrote:
> >
> >> I pulled your tree into linux-next (next-20110415) on an i386 Debian host.
> >>
> >> My build breaks here:
> >> ...
> >>   MODPOST vmlinux.o
> >>   GEN     .version
> >>   CHK     include/generated/compile.h
> >>   UPD     include/generated/compile.h
> >>   CC      init/version.o
> >>   LD      init/built-in.o
> >>   LD      .tmp_vmlinux1
> >> mm/built-in.o: In function `bdi_position_ratio':
> >> page-writeback.c:(.text+0x5c83): undefined reference to `__udivdi3'
> >
> > Yes it can be fixed by the attached patch.
> >
> >> mm/built-in.o: In function `calc_period_shift.part.10':
> >> page-writeback.c:(.text+0x6446): undefined reference to `____ilog2_NaN'
> >
> > I cannot reproduce this error. In the git tree, calc_period_shift() is
> > actually quite simple:
> >
> > static int calc_period_shift(void)
> > {
> >        return 2 + ilog2(default_backing_dev_info.avg_write_bandwidth);
> > }
> >
> > where avg_write_bandwidth is of type "unsigned long".
> >
> >> make[4]: *** [.tmp_vmlinux1] Error
> >>
> >> BTW, which kernel-config options have to be set besides
> >> CONFIG_BLK_DEV_THROTTLING=y?
> >
> > No. I used your kconfig on 2.6.39-rc3 and it compiles OK for i386.
> >
> > I've pushed two patches into the git tree fixing the compile errors.
> > Thank you for trying it out and report!
> >
> > Thanks,
> > Fengguang
> >
> 
> Thanks for your patch.
> 
> The 1st part of the build-error is gone, but 2nd part still remains:
> 
>   LD      .tmp_vmlinux1
> mm/built-in.o: In function `calc_period_shift.part.10':
> page-writeback.c:(.text+0x6458): undefined reference to `____ilog2_NaN'
> make[4]: *** [.tmp_vmlinux1] Error 1
> 
> I have attached some disasm-ed files.

OK. I tried next-20110415 and your kconfig and still got no error.

Please revert the last commit. It's not necessary anyway.

commit 84a9890ddef487d9c6d70934c0a2addc65923bcf
Author: Wu Fengguang <fengguang.wu@intel.com>
Date:   Sat Apr 16 18:38:41 2011 -0600

    writeback: scale dirty proportions period with writeout bandwidth
    
    CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
    Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>

> Unfortunately, I don't see any new commits in your GIT tree.

Yeah I cannot see it in the web interface, too:

http://git.kernel.org/?p=linux/kernel/git/wfg/writeback.git;a=shortlog;h=refs/heads/dirty-throttling-v7

But they are in the dirty-throttling-v7 branch at kernel.org:

commit d0e30163e390d87387ec13e3b1c2168238c26793
Author: Wu Fengguang <fengguang.wu@intel.com>
Date:   Sun Apr 17 11:59:12 2011 +0800

    Revert "writeback: scale dirty proportions period with writeout bandwidth"
    
    This reverts commit 84a9890ddef487d9c6d70934c0a2addc65923bcf.
    
    sedat.dilek@gmail.com:
    
        LD      .tmp_vmlinux1
      mm/built-in.o: In function `calc_period_shift.part.10':
      page-writeback.c:(.text+0x6458): undefined reference to `____ilog2_NaN'
      make[4]: *** [.tmp_vmlinux1] Error 1

commit fc5c8b04119a5bcc46865e66eec3e6133ecb56e9
Author: Wu Fengguang <fengguang.wu@intel.com>
Date:   Sun Apr 17 09:22:41 2011 -0600

    writeback: quick CONFIG_BLK_DEV_THROTTLING=n compile fix
    
    Reported-by: Sedat Dilek <sedat.dilek@googlemail.com>
    Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>

commit c4a7e3f48dcfae71d0e3d2c55dcc381b3def1919
Author: Wu Fengguang <fengguang.wu@intel.com>
Date:   Sun Apr 17 09:04:44 2011 -0600

    writeback: i386 compile fix
    
    mm/built-in.o: In function `bdi_position_ratio':
    page-writeback.c:(.text+0x5c83): undefined reference to `__udivdi3'
    mm/built-in.o: In function `calc_period_shift.part.10':
    page-writeback.c:(.text+0x6446): undefined reference to `____ilog2_NaN'
    make[4]: *** [.tmp_vmlinux1] Error
    
    Reported-by: Sedat Dilek <sedat.dilek@googlemail.com>
    Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>


Thanks,
Fengguang
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 00/12] IO-less dirty throttling v7
  2011-04-17  4:10       ` Wu Fengguang
@ 2011-04-17  4:46         ` Sedat Dilek
  2011-04-17  6:46           ` Sedat Dilek
  2011-04-18  0:13         ` Wu Fengguang
  1 sibling, 1 reply; 29+ messages in thread
From: Sedat Dilek @ 2011-04-17  4:46 UTC (permalink / raw)
  To: Wu Fengguang
  Cc: Andrew Morton, Jan Kara, Christoph Hellwig, Trond Myklebust,
	Dave Chinner, Theodore Ts'o, Chris Mason, Peter Zijlstra,
	Mel Gorman, Rik van Riel, KOSAKI Motohiro, Greg Thelen,
	Minchan Kim, Vivek Goyal, Andrea Righi, Balbir Singh, linux-mm,
	linux-fsdevel@vger.kernel.org, LKML

On Sun, Apr 17, 2011 at 6:10 AM, Wu Fengguang <fengguang.wu@intel.com> wrote:
> On Sun, Apr 17, 2011 at 11:18:43AM +0800, Sedat Dilek wrote:
>> On Sun, Apr 17, 2011 at 3:44 AM, Wu Fengguang <fengguang.wu@intel.com> wrote:
>> > Hi Sedat,
>> >
>> > On Sun, Apr 17, 2011 at 12:27:58AM +0800, Sedat Dilek wrote:
>> >
>> >> I pulled your tree into linux-next (next-20110415) on an i386 Debian host.
>> >>
>> >> My build breaks here:
>> >> ...
>> >>   MODPOST vmlinux.o
>> >>   GEN     .version
>> >>   CHK     include/generated/compile.h
>> >>   UPD     include/generated/compile.h
>> >>   CC      init/version.o
>> >>   LD      init/built-in.o
>> >>   LD      .tmp_vmlinux1
>> >> mm/built-in.o: In function `bdi_position_ratio':
>> >> page-writeback.c:(.text+0x5c83): undefined reference to `__udivdi3'
>> >
>> > Yes it can be fixed by the attached patch.
>> >
>> >> mm/built-in.o: In function `calc_period_shift.part.10':
>> >> page-writeback.c:(.text+0x6446): undefined reference to `____ilog2_NaN'
>> >
>> > I cannot reproduce this error. In the git tree, calc_period_shift() is
>> > actually quite simple:
>> >
>> > static int calc_period_shift(void)
>> > {
>> >        return 2 + ilog2(default_backing_dev_info.avg_write_bandwidth);
>> > }
>> >
>> > where avg_write_bandwidth is of type "unsigned long".
>> >
>> >> make[4]: *** [.tmp_vmlinux1] Error
>> >>
>> >> BTW, which kernel-config options have to be set besides
>> >> CONFIG_BLK_DEV_THROTTLING=y?
>> >
>> > No. I used your kconfig on 2.6.39-rc3 and it compiles OK for i386.
>> >
>> > I've pushed two patches into the git tree fixing the compile errors.
>> > Thank you for trying it out and report!
>> >
>> > Thanks,
>> > Fengguang
>> >
>>
>> Thanks for your patch.
>>
>> The 1st part of the build-error is gone, but 2nd part still remains:
>>
>>   LD      .tmp_vmlinux1
>> mm/built-in.o: In function `calc_period_shift.part.10':
>> page-writeback.c:(.text+0x6458): undefined reference to `____ilog2_NaN'
>> make[4]: *** [.tmp_vmlinux1] Error 1
>>
>> I have attached some disasm-ed files.
>
> OK. I tried next-20110415 and your kconfig and still got no error.
>
> Please revert the last commit. It's not necessary anyway.
>
> commit 84a9890ddef487d9c6d70934c0a2addc65923bcf
> Author: Wu Fengguang <fengguang.wu@intel.com>
> Date:   Sat Apr 16 18:38:41 2011 -0600
>
>    writeback: scale dirty proportions period with writeout bandwidth
>
>    CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
>    Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
>
>> Unfortunately, I don't see any new commits in your GIT tree.
>
> Yeah I cannot see it in the web interface, too:
>
> http://git.kernel.org/?p=linux/kernel/git/wfg/writeback.git;a=shortlog;h=refs/heads/dirty-throttling-v7
>
> But they are in the dirty-throttling-v7 branch at kernel.org:
>
> commit d0e30163e390d87387ec13e3b1c2168238c26793
> Author: Wu Fengguang <fengguang.wu@intel.com>
> Date:   Sun Apr 17 11:59:12 2011 +0800
>
>    Revert "writeback: scale dirty proportions period with writeout bandwidth"
>
>    This reverts commit 84a9890ddef487d9c6d70934c0a2addc65923bcf.
>
>    sedat.dilek@gmail.com:
>
>        LD      .tmp_vmlinux1
>      mm/built-in.o: In function `calc_period_shift.part.10':
>      page-writeback.c:(.text+0x6458): undefined reference to `____ilog2_NaN'
>      make[4]: *** [.tmp_vmlinux1] Error 1
>
> commit fc5c8b04119a5bcc46865e66eec3e6133ecb56e9
> Author: Wu Fengguang <fengguang.wu@intel.com>
> Date:   Sun Apr 17 09:22:41 2011 -0600
>
>    writeback: quick CONFIG_BLK_DEV_THROTTLING=n compile fix
>
>    Reported-by: Sedat Dilek <sedat.dilek@googlemail.com>
>    Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
>
> commit c4a7e3f48dcfae71d0e3d2c55dcc381b3def1919
> Author: Wu Fengguang <fengguang.wu@intel.com>
> Date:   Sun Apr 17 09:04:44 2011 -0600
>
>    writeback: i386 compile fix
>
>    mm/built-in.o: In function `bdi_position_ratio':
>    page-writeback.c:(.text+0x5c83): undefined reference to `__udivdi3'
>    mm/built-in.o: In function `calc_period_shift.part.10':
>    page-writeback.c:(.text+0x6446): undefined reference to `____ilog2_NaN'
>    make[4]: *** [.tmp_vmlinux1] Error
>
>    Reported-by: Sedat Dilek <sedat.dilek@googlemail.com>
>    Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
>
>
> Thanks,
> Fengguang
>

The 2nd part disappears here, when I switch from gcc-4.6 to gcc-4.5.

- Sedat -

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 00/12] IO-less dirty throttling v7
  2011-04-17  4:46         ` Sedat Dilek
@ 2011-04-17  6:46           ` Sedat Dilek
  0 siblings, 0 replies; 29+ messages in thread
From: Sedat Dilek @ 2011-04-17  6:46 UTC (permalink / raw)
  To: Wu Fengguang
  Cc: Andrew Morton, Jan Kara, Christoph Hellwig, Trond Myklebust,
	Dave Chinner, Theodore Ts'o, Chris Mason, Peter Zijlstra,
	Mel Gorman, Rik van Riel, KOSAKI Motohiro, Greg Thelen,
	Minchan Kim, Vivek Goyal, Andrea Righi, Balbir Singh, linux-mm,
	linux-fsdevel@vger.kernel.org, LKML

[-- Attachment #1: Type: text/plain, Size: 5632 bytes --]

On Sun, Apr 17, 2011 at 6:46 AM, Sedat Dilek <sedat.dilek@googlemail.com> wrote:
> On Sun, Apr 17, 2011 at 6:10 AM, Wu Fengguang <fengguang.wu@intel.com> wrote:
>> On Sun, Apr 17, 2011 at 11:18:43AM +0800, Sedat Dilek wrote:
>>> On Sun, Apr 17, 2011 at 3:44 AM, Wu Fengguang <fengguang.wu@intel.com> wrote:
>>> > Hi Sedat,
>>> >
>>> > On Sun, Apr 17, 2011 at 12:27:58AM +0800, Sedat Dilek wrote:
>>> >
>>> >> I pulled your tree into linux-next (next-20110415) on an i386 Debian host.
>>> >>
>>> >> My build breaks here:
>>> >> ...
>>> >>   MODPOST vmlinux.o
>>> >>   GEN     .version
>>> >>   CHK     include/generated/compile.h
>>> >>   UPD     include/generated/compile.h
>>> >>   CC      init/version.o
>>> >>   LD      init/built-in.o
>>> >>   LD      .tmp_vmlinux1
>>> >> mm/built-in.o: In function `bdi_position_ratio':
>>> >> page-writeback.c:(.text+0x5c83): undefined reference to `__udivdi3'
>>> >
>>> > Yes it can be fixed by the attached patch.
>>> >
>>> >> mm/built-in.o: In function `calc_period_shift.part.10':
>>> >> page-writeback.c:(.text+0x6446): undefined reference to `____ilog2_NaN'
>>> >
>>> > I cannot reproduce this error. In the git tree, calc_period_shift() is
>>> > actually quite simple:
>>> >
>>> > static int calc_period_shift(void)
>>> > {
>>> >        return 2 + ilog2(default_backing_dev_info.avg_write_bandwidth);
>>> > }
>>> >
>>> > where avg_write_bandwidth is of type "unsigned long".
>>> >
>>> >> make[4]: *** [.tmp_vmlinux1] Error
>>> >>
>>> >> BTW, which kernel-config options have to be set besides
>>> >> CONFIG_BLK_DEV_THROTTLING=y?
>>> >
>>> > No. I used your kconfig on 2.6.39-rc3 and it compiles OK for i386.
>>> >
>>> > I've pushed two patches into the git tree fixing the compile errors.
>>> > Thank you for trying it out and report!
>>> >
>>> > Thanks,
>>> > Fengguang
>>> >
>>>
>>> Thanks for your patch.
>>>
>>> The 1st part of the build-error is gone, but 2nd part still remains:
>>>
>>>   LD      .tmp_vmlinux1
>>> mm/built-in.o: In function `calc_period_shift.part.10':
>>> page-writeback.c:(.text+0x6458): undefined reference to `____ilog2_NaN'
>>> make[4]: *** [.tmp_vmlinux1] Error 1
>>>
>>> I have attached some disasm-ed files.
>>
>> OK. I tried next-20110415 and your kconfig and still got no error.
>>
>> Please revert the last commit. It's not necessary anyway.
>>
>> commit 84a9890ddef487d9c6d70934c0a2addc65923bcf
>> Author: Wu Fengguang <fengguang.wu@intel.com>
>> Date:   Sat Apr 16 18:38:41 2011 -0600
>>
>>    writeback: scale dirty proportions period with writeout bandwidth
>>
>>    CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
>>    Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
>>
>>> Unfortunately, I don't see any new commits in your GIT tree.
>>
>> Yeah I cannot see it in the web interface, too:
>>
>> http://git.kernel.org/?p=linux/kernel/git/wfg/writeback.git;a=shortlog;h=refs/heads/dirty-throttling-v7
>>
>> But they are in the dirty-throttling-v7 branch at kernel.org:
>>
>> commit d0e30163e390d87387ec13e3b1c2168238c26793
>> Author: Wu Fengguang <fengguang.wu@intel.com>
>> Date:   Sun Apr 17 11:59:12 2011 +0800
>>
>>    Revert "writeback: scale dirty proportions period with writeout bandwidth"
>>
>>    This reverts commit 84a9890ddef487d9c6d70934c0a2addc65923bcf.
>>
>>    sedat.dilek@gmail.com:
>>
>>        LD      .tmp_vmlinux1
>>      mm/built-in.o: In function `calc_period_shift.part.10':
>>      page-writeback.c:(.text+0x6458): undefined reference to `____ilog2_NaN'
>>      make[4]: *** [.tmp_vmlinux1] Error 1
>>
>> commit fc5c8b04119a5bcc46865e66eec3e6133ecb56e9
>> Author: Wu Fengguang <fengguang.wu@intel.com>
>> Date:   Sun Apr 17 09:22:41 2011 -0600
>>
>>    writeback: quick CONFIG_BLK_DEV_THROTTLING=n compile fix
>>
>>    Reported-by: Sedat Dilek <sedat.dilek@googlemail.com>
>>    Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
>>
>> commit c4a7e3f48dcfae71d0e3d2c55dcc381b3def1919
>> Author: Wu Fengguang <fengguang.wu@intel.com>
>> Date:   Sun Apr 17 09:04:44 2011 -0600
>>
>>    writeback: i386 compile fix
>>
>>    mm/built-in.o: In function `bdi_position_ratio':
>>    page-writeback.c:(.text+0x5c83): undefined reference to `__udivdi3'
>>    mm/built-in.o: In function `calc_period_shift.part.10':
>>    page-writeback.c:(.text+0x6446): undefined reference to `____ilog2_NaN'
>>    make[4]: *** [.tmp_vmlinux1] Error
>>
>>    Reported-by: Sedat Dilek <sedat.dilek@googlemail.com>
>>    Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
>>
>>
>> Thanks,
>> Fengguang
>>
>
> The 2nd part disappears here, when I switch from gcc-4.6 to gcc-4.5.
>
> - Sedat -
>

Just FYI:

Build with gcc-4.6 is OK, now.

  (+) OK   writeback-dirty-throttling-v7-fix/writeback-i386-compile-fix.patch
  (+) OK   writeback-dirty-throttling-v7-fix/0001-Revert-writeback-scale-dirty-proportions-period-with.patch

In case of the ilog2 error I have g00gled a bit and found gcc-bug
#36359 and looked also at include/linux/log2.h [2].
Not sure if this is a gcc-4.6 bug and I shall open a ticket (or a
problem in your code?).
I have tried the testcase from [3], it gives same output for nm.
[4] I could not follow.

- Sedat -

[1] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36359
[2] http://git.us.kernel.org/?p=linux/kernel/git/wfg/writeback.git;a=blob;f=include/linux/log2.h#l18
[3] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36359#c12
[4] http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36359#c17

[-- Attachment #2: testcase_gcc-bug-36359.tar.xz --]
[-- Type: application/octet-stream, Size: 948 bytes --]

[-- Attachment #3: testcase_gcc-bug-36359.tar.xz.sha256sum --]
[-- Type: application/octet-stream, Size: 96 bytes --]

c5ab2c29420772d49e4942ec72999f42b8393d14c7762427ac385edaa8936af2  testcase_gcc-bug-36359.tar.xz

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 00/12] IO-less dirty throttling v7
  2011-04-16 13:25 [PATCH 00/12] IO-less dirty throttling v7 Wu Fengguang
                   ` (12 preceding siblings ...)
  2011-04-16 16:27 ` [PATCH 00/12] IO-less dirty throttling v7 Sedat Dilek
@ 2011-04-17  7:31 ` Marco Stornelli
  2011-04-17  9:30   ` Wu Fengguang
  2011-04-26 17:19 ` Vivek Goyal
  14 siblings, 1 reply; 29+ messages in thread
From: Marco Stornelli @ 2011-04-17  7:31 UTC (permalink / raw)
  To: Wu Fengguang
  Cc: Andrew Morton, Jan Kara, Christoph Hellwig, Trond Myklebust,
	Dave Chinner, Theodore Ts'o, Chris Mason, Peter Zijlstra,
	Mel Gorman, Rik van Riel, KOSAKI Motohiro, Greg Thelen,
	Minchan Kim, Vivek Goyal, Andrea Righi, Balbir Singh, linux-mm,
	linux-fsdevel, LKML

Il 16/04/2011 15:25, Wu Fengguang ha scritto:
> Andrew,
>
> This revision undergoes a number of simplifications, cleanups and fixes.
> Independent patches are separated out. The core patches (07, 08) now have
> easier to understand changelog. Detailed rationals can be found in patch 08.
>
> In response to the complexity complaints, an introduction document is
> written explaining the rationals, algorithm and visual case studies:
>
> http://www.kernel.org/pub/linux/kernel/people/wfg/writeback/slides/smooth-dirty-throttling.pdf

It'd be great if you wrote a summary in the kernel documentation.

Marco

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 00/12] IO-less dirty throttling v7
  2011-04-17  7:31 ` Marco Stornelli
@ 2011-04-17  9:30   ` Wu Fengguang
  2011-04-17 17:44     ` Marco Stornelli
  0 siblings, 1 reply; 29+ messages in thread
From: Wu Fengguang @ 2011-04-17  9:30 UTC (permalink / raw)
  To: Marco Stornelli
  Cc: Andrew Morton, Jan Kara, Christoph Hellwig, Trond Myklebust,
	Dave Chinner, Theodore Ts'o, Chris Mason, Peter Zijlstra,
	Mel Gorman, Rik van Riel, KOSAKI Motohiro, Greg Thelen,
	Minchan Kim, Vivek Goyal, Andrea Righi, Balbir Singh, linux-mm,
	linux-fsdevel@vger.kernel.org, LKML

On Sun, Apr 17, 2011 at 03:31:54PM +0800, Marco Stornelli wrote:
> Il 16/04/2011 15:25, Wu Fengguang ha scritto:
> > Andrew,
> >
> > This revision undergoes a number of simplifications, cleanups and fixes.
> > Independent patches are separated out. The core patches (07, 08) now have
> > easier to understand changelog. Detailed rationals can be found in patch 08.
> >
> > In response to the complexity complaints, an introduction document is
> > written explaining the rationals, algorithm and visual case studies:
> >
> > http://www.kernel.org/pub/linux/kernel/people/wfg/writeback/slides/smooth-dirty-throttling.pdf
> 
> It'd be great if you wrote a summary in the kernel documentation.

Perhaps not in this stage. That will only frighten people away I'm
afraid. The main concerns now are "why the complexities?". People at
this time perhaps won't bother looking into any lengthy documents at
all.

The slides with both description text and graphs should be much easier
for the readers to establish good feelings and understandings, as well
as trust. Seeing is believing, when you see 80ms vs. 30s pause times
in the bumpy NFS workload (pages 29, 30), fast rampup when suddenly
starting 10 or 100 dd tasks (pages 38, 32), and 5ms pause time in
stable workload (page 20), don't you feel the graphs much more
striking than boring texts? :)

That said, the changelog in patches 07 and 08 do offer some text based
introductions, if you are interested in reading more.

Thanks,
Fengguang

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 00/12] IO-less dirty throttling v7
  2011-04-17  9:30   ` Wu Fengguang
@ 2011-04-17 17:44     ` Marco Stornelli
  2011-04-17 23:31       ` Wu Fengguang
  0 siblings, 1 reply; 29+ messages in thread
From: Marco Stornelli @ 2011-04-17 17:44 UTC (permalink / raw)
  To: Wu Fengguang
  Cc: Andrew Morton, Jan Kara, Christoph Hellwig, Trond Myklebust,
	Dave Chinner, Theodore Ts'o, Chris Mason, Peter Zijlstra,
	Mel Gorman, Rik van Riel, KOSAKI Motohiro, Greg Thelen,
	Minchan Kim, Vivek Goyal, Andrea Righi, Balbir Singh, linux-mm,
	linux-fsdevel@vger.kernel.org, LKML

Il 17/04/2011 11:30, Wu Fengguang ha scritto:
> On Sun, Apr 17, 2011 at 03:31:54PM +0800, Marco Stornelli wrote:
>> Il 16/04/2011 15:25, Wu Fengguang ha scritto:
>>> Andrew,
>>>
>>> This revision undergoes a number of simplifications, cleanups and fixes.
>>> Independent patches are separated out. The core patches (07, 08) now have
>>> easier to understand changelog. Detailed rationals can be found in patch 08.
>>>
>>> In response to the complexity complaints, an introduction document is
>>> written explaining the rationals, algorithm and visual case studies:
>>>
>>> http://www.kernel.org/pub/linux/kernel/people/wfg/writeback/slides/smooth-dirty-throttling.pdf
>>
>> It'd be great if you wrote a summary in the kernel documentation.
>
> Perhaps not in this stage. That will only frighten people away I'm
> afraid. The main concerns now are "why the complexities?". People at
> this time perhaps won't bother looking into any lengthy documents at
> all.
>

For the moment ok if you think we are in a not-ready-for-mainline yet. 
But for the final version the documentation would be welcome, maybe with 
the pdf as reference. The documentation is always the last thing but 
it's important! :)

Marco

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 00/12] IO-less dirty throttling v7
  2011-04-17 17:44     ` Marco Stornelli
@ 2011-04-17 23:31       ` Wu Fengguang
  0 siblings, 0 replies; 29+ messages in thread
From: Wu Fengguang @ 2011-04-17 23:31 UTC (permalink / raw)
  To: Marco Stornelli
  Cc: Andrew Morton, Jan Kara, Christoph Hellwig, Trond Myklebust,
	Dave Chinner, Theodore Ts'o, Chris Mason, Peter Zijlstra,
	Mel Gorman, Rik van Riel, KOSAKI Motohiro, Greg Thelen,
	Minchan Kim, Vivek Goyal, Andrea Righi, Balbir Singh, linux-mm,
	linux-fsdevel@vger.kernel.org, LKML

On Mon, Apr 18, 2011 at 01:44:22AM +0800, Marco Stornelli wrote:
> Il 17/04/2011 11:30, Wu Fengguang ha scritto:
> > On Sun, Apr 17, 2011 at 03:31:54PM +0800, Marco Stornelli wrote:
> >> Il 16/04/2011 15:25, Wu Fengguang ha scritto:
> >>> Andrew,
> >>>
> >>> This revision undergoes a number of simplifications, cleanups and fixes.
> >>> Independent patches are separated out. The core patches (07, 08) now have
> >>> easier to understand changelog. Detailed rationals can be found in patch 08.
> >>>
> >>> In response to the complexity complaints, an introduction document is
> >>> written explaining the rationals, algorithm and visual case studies:
> >>>
> >>> http://www.kernel.org/pub/linux/kernel/people/wfg/writeback/slides/smooth-dirty-throttling.pdf
> >>
> >> It'd be great if you wrote a summary in the kernel documentation.
> >
> > Perhaps not in this stage. That will only frighten people away I'm
> > afraid. The main concerns now are "why the complexities?". People at
> > this time perhaps won't bother looking into any lengthy documents at
> > all.
> >
> 
> For the moment ok if you think we are in a not-ready-for-mainline yet. 
> But for the final version the documentation would be welcome, maybe with 
> the pdf as reference. The documentation is always the last thing but 
> it's important! :)

No problem. I hope it still get the chance to get upstreamed :)

Thanks,
Fengguang

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 00/12] IO-less dirty throttling v7
  2011-04-17  4:10       ` Wu Fengguang
  2011-04-17  4:46         ` Sedat Dilek
@ 2011-04-18  0:13         ` Wu Fengguang
  2011-04-18  6:57           ` Sedat Dilek
  1 sibling, 1 reply; 29+ messages in thread
From: Wu Fengguang @ 2011-04-18  0:13 UTC (permalink / raw)
  To: sedat.dilek@gmail.com
  Cc: Andrew Morton, Jan Kara, Christoph Hellwig, Trond Myklebust,
	Dave Chinner, Theodore Ts'o, Chris Mason, Peter Zijlstra,
	Mel Gorman, Rik van Riel, KOSAKI Motohiro, Greg Thelen,
	Minchan Kim, Vivek Goyal, Andrea Righi, Balbir Singh, linux-mm,
	linux-fsdevel@vger.kernel.org, LKML

Hi Sedat,

> Please revert the last commit. It's not necessary anyway.
> 
> commit 84a9890ddef487d9c6d70934c0a2addc65923bcf
> Author: Wu Fengguang <fengguang.wu@intel.com>
> Date:   Sat Apr 16 18:38:41 2011 -0600
> 
>     writeback: scale dirty proportions period with writeout bandwidth
>     
>     CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
>     Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>

Please do revert that commit, because I found a sleep-inside-spinlock
bug with it. Here is the fixed one (but you don't have to track this
optional patch).

Thanks,
Fengguang
---
Subject: writeback: scale dirty proportions period with writeout bandwidth
Date: Sat Apr 16 18:38:41 CST 2011

CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 mm/page-writeback.c |   24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

--- linux-next.orig/mm/page-writeback.c	2011-04-17 20:52:13.000000000 +0800
+++ linux-next/mm/page-writeback.c	2011-04-18 07:57:01.000000000 +0800
@@ -121,20 +121,13 @@ static struct prop_descriptor vm_complet
 static struct prop_descriptor vm_dirties;
 
 /*
- * couple the period to the dirty_ratio:
+ * couple the period to global write throughput:
  *
- *   period/2 ~ roundup_pow_of_two(dirty limit)
+ *   period/2 ~ roundup_pow_of_two(write IO throughput)
  */
 static int calc_period_shift(void)
 {
-	unsigned long dirty_total;
-
-	if (vm_dirty_bytes)
-		dirty_total = vm_dirty_bytes / PAGE_SIZE;
-	else
-		dirty_total = (vm_dirty_ratio * determine_dirtyable_memory()) /
-				100;
-	return 2 + ilog2(dirty_total - 1);
+	return 2 + ilog2(default_backing_dev_info.avg_write_bandwidth);
 }
 
 /*
@@ -143,6 +136,13 @@ static int calc_period_shift(void)
 static void update_completion_period(void)
 {
 	int shift = calc_period_shift();
+
+	if (shift > PROP_MAX_SHIFT)
+		shift = PROP_MAX_SHIFT;
+
+	if (abs(shift - vm_completions.pg[0].shift) <= 1)
+		return;
+
 	prop_change_shift(&vm_completions, shift);
 	prop_change_shift(&vm_dirties, shift);
 }
@@ -180,7 +180,6 @@ int dirty_ratio_handler(struct ctl_table
 
 	ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
 	if (ret == 0 && write && vm_dirty_ratio != old_ratio) {
-		update_completion_period();
 		vm_dirty_bytes = 0;
 	}
 	return ret;
@@ -196,7 +195,6 @@ int dirty_bytes_handler(struct ctl_table
 
 	ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
 	if (ret == 0 && write && vm_dirty_bytes != old_bytes) {
-		update_completion_period();
 		vm_dirty_ratio = 0;
 	}
 	return ret;
@@ -1044,6 +1042,8 @@ snapshot:
 	bdi->bw_time_stamp = now;
 unlock:
 	spin_unlock(&dirty_lock);
+	if (gbdi->bw_time_stamp == now)
+		update_completion_period();
 }
 
 static unsigned long max_pause(struct backing_dev_info *bdi,

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 00/12] IO-less dirty throttling v7
  2011-04-18  0:13         ` Wu Fengguang
@ 2011-04-18  6:57           ` Sedat Dilek
  2011-04-18  8:18             ` Wu Fengguang
  0 siblings, 1 reply; 29+ messages in thread
From: Sedat Dilek @ 2011-04-18  6:57 UTC (permalink / raw)
  To: Wu Fengguang
  Cc: Andrew Morton, Jan Kara, Christoph Hellwig, Trond Myklebust,
	Dave Chinner, Theodore Ts'o, Chris Mason, Peter Zijlstra,
	Mel Gorman, Rik van Riel, KOSAKI Motohiro, Greg Thelen,
	Minchan Kim, Vivek Goyal, Andrea Righi, Balbir Singh, linux-mm,
	linux-fsdevel@vger.kernel.org, LKML

[-- Attachment #1: Type: text/plain, Size: 12608 bytes --]

On Mon, Apr 18, 2011 at 2:13 AM, Wu Fengguang <fengguang.wu@intel.com> wrote:
> Hi Sedat,
>
>> Please revert the last commit. It's not necessary anyway.
>>
>> commit 84a9890ddef487d9c6d70934c0a2addc65923bcf
>> Author: Wu Fengguang <fengguang.wu@intel.com>
>> Date:   Sat Apr 16 18:38:41 2011 -0600
>>
>>     writeback: scale dirty proportions period with writeout bandwidth
>>
>>     CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
>>     Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
>
> Please do revert that commit, because I found a sleep-inside-spinlock
> bug with it. Here is the fixed one (but you don't have to track this
> optional patch).
>
> Thanks,
> Fengguang
> ---
> Subject: writeback: scale dirty proportions period with writeout bandwidth
> Date: Sat Apr 16 18:38:41 CST 2011
>
> CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
> Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
> ---
>  mm/page-writeback.c |   24 ++++++++++++------------
>  1 file changed, 12 insertions(+), 12 deletions(-)
>
> --- linux-next.orig/mm/page-writeback.c 2011-04-17 20:52:13.000000000 +0800
> +++ linux-next/mm/page-writeback.c      2011-04-18 07:57:01.000000000 +0800
> @@ -121,20 +121,13 @@ static struct prop_descriptor vm_complet
>  static struct prop_descriptor vm_dirties;
>
>  /*
> - * couple the period to the dirty_ratio:
> + * couple the period to global write throughput:
>  *
> - *   period/2 ~ roundup_pow_of_two(dirty limit)
> + *   period/2 ~ roundup_pow_of_two(write IO throughput)
>  */
>  static int calc_period_shift(void)
>  {
> -       unsigned long dirty_total;
> -
> -       if (vm_dirty_bytes)
> -               dirty_total = vm_dirty_bytes / PAGE_SIZE;
> -       else
> -               dirty_total = (vm_dirty_ratio * determine_dirtyable_memory()) /
> -                               100;
> -       return 2 + ilog2(dirty_total - 1);
> +       return 2 + ilog2(default_backing_dev_info.avg_write_bandwidth);
>  }
>
>  /*
> @@ -143,6 +136,13 @@ static int calc_period_shift(void)
>  static void update_completion_period(void)
>  {
>        int shift = calc_period_shift();
> +
> +       if (shift > PROP_MAX_SHIFT)
> +               shift = PROP_MAX_SHIFT;
> +
> +       if (abs(shift - vm_completions.pg[0].shift) <= 1)
> +               return;
> +
>        prop_change_shift(&vm_completions, shift);
>        prop_change_shift(&vm_dirties, shift);
>  }
> @@ -180,7 +180,6 @@ int dirty_ratio_handler(struct ctl_table
>
>        ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
>        if (ret == 0 && write && vm_dirty_ratio != old_ratio) {
> -               update_completion_period();
>                vm_dirty_bytes = 0;
>        }
>        return ret;
> @@ -196,7 +195,6 @@ int dirty_bytes_handler(struct ctl_table
>
>        ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
>        if (ret == 0 && write && vm_dirty_bytes != old_bytes) {
> -               update_completion_period();
>                vm_dirty_ratio = 0;
>        }
>        return ret;
> @@ -1044,6 +1042,8 @@ snapshot:
>        bdi->bw_time_stamp = now;
>  unlock:
>        spin_unlock(&dirty_lock);
> +       if (gbdi->bw_time_stamp == now)
> +               update_completion_period();
>  }
>
>  static unsigned long max_pause(struct backing_dev_info *bdi,
>

Unfortunately, this "v2" patch still breaks with gcc-4.6 here:

  LD      .tmp_vmlinux1
mm/built-in.o: In function `calc_period_shift.part.10':
page-writeback.c:(.text+0x6458): undefined reference to `____ilog2_NaN'
make[4]: *** [.tmp_vmlinux1] Error 1

My patchset against next-20110415 looks like this:

  (+) OK   writeback-dirty-throttling-v7/writeback-dirty-throttling-v7.patch
  (+) OK   writeback-dirty-throttling-post-v7/0001-writeback-i386-compile-fix.patch
  (+) OK   writeback-dirty-throttling-post-v7/0002-writeback-quick-CONFIG_BLK_DEV_THROTTLING-n-compile-.patch
  (+) OK   writeback-dirty-throttling-post-v7/0003-Revert-writeback-scale-dirty-proportions-period-with.patch
  (+) OK   writeback-dirty-throttling-v7-fix/writeback-scale-dirty-proportions-period-with-writeout-bandwidth-v2.patch

Attached are the disasm of mm/page-writeback.o (v2, gcc-4.6) and the
disasm of yesterday's experiments with gcc-4.5.

[ gcc-4.5 ]

00006574 <calc_period_shift>:
    6574:       a1 90 00 00 00          mov    0x90,%eax        6575:
R_386_32  default_backing_dev_info
    6579:       55                      push   %ebp
    657a:       89 e5                   mov    %esp,%ebp
    657c:       e8 02 f8 ff ff          call   5d83 <__ilog2_u32>
    6581:       5d                      pop    %ebp
    6582:       83 c0 02                add    $0x2,%eax
    6585:       c3                      ret

[ gcc-4.6 ]

000008c9 <calc_period_shift.part.10>:
     8c9:       8b 15 90 00 00 00       mov    0x90,%edx        8cb:
R_386_32   default_backing_dev_info
     8cf:       55                      push   %ebp
     8d0:       89 e5                   mov    %esp,%ebp
     8d2:       85 d2                   test   %edx,%edx
     8d4:       0f 88 46 01 00 00       js     a20
<calc_period_shift.part.10+0x157>
     8da:       f7 c2 00 00 00 40       test   $0x40000000,%edx
     8e0:       b8 20 00 00 00          mov    $0x20,%eax
     8e5:       0f 85 3a 01 00 00       jne    a25
<calc_period_shift.part.10+0x15c>
     8eb:       f7 c2 00 00 00 20       test   $0x20000000,%edx
     8f1:       b0 1f                   mov    $0x1f,%al
     8f3:       0f 85 2c 01 00 00       jne    a25
<calc_period_shift.part.10+0x15c>
     8f9:       f7 c2 00 00 00 10       test   $0x10000000,%edx
     8ff:       b0 1e                   mov    $0x1e,%al
     901:       0f 85 1e 01 00 00       jne    a25
<calc_period_shift.part.10+0x15c>
     907:       f7 c2 00 00 00 08       test   $0x8000000,%edx
     90d:       b0 1d                   mov    $0x1d,%al
     90f:       0f 85 10 01 00 00       jne    a25
<calc_period_shift.part.10+0x15c>
     915:       f7 c2 00 00 00 04       test   $0x4000000,%edx
     91b:       b0 1c                   mov    $0x1c,%al
     91d:       0f 85 02 01 00 00       jne    a25
<calc_period_shift.part.10+0x15c>
     923:       f7 c2 00 00 00 02       test   $0x2000000,%edx
     929:       b0 1b                   mov    $0x1b,%al
     92b:       0f 85 f4 00 00 00       jne    a25
<calc_period_shift.part.10+0x15c>
     931:       f7 c2 00 00 00 01       test   $0x1000000,%edx
     937:       b0 1a                   mov    $0x1a,%al
     939:       0f 85 e6 00 00 00       jne    a25
<calc_period_shift.part.10+0x15c>
     93f:       f7 c2 00 00 80 00       test   $0x800000,%edx
     945:       b0 19                   mov    $0x19,%al
     947:       0f 85 d8 00 00 00       jne    a25
<calc_period_shift.part.10+0x15c>
     94d:       f7 c2 00 00 40 00       test   $0x400000,%edx
     953:       b0 18                   mov    $0x18,%al
     955:       0f 85 ca 00 00 00       jne    a25
<calc_period_shift.part.10+0x15c>
     95b:       f7 c2 00 00 20 00       test   $0x200000,%edx
     961:       b0 17                   mov    $0x17,%al
     963:       0f 85 bc 00 00 00       jne    a25
<calc_period_shift.part.10+0x15c>
     969:       f7 c2 00 00 10 00       test   $0x100000,%edx
     96f:       b0 16                   mov    $0x16,%al
     971:       0f 85 ae 00 00 00       jne    a25
<calc_period_shift.part.10+0x15c>
     977:       f7 c2 00 00 08 00       test   $0x80000,%edx
     97d:       b0 15                   mov    $0x15,%al
     97f:       0f 85 a0 00 00 00       jne    a25
<calc_period_shift.part.10+0x15c>
     985:       f7 c2 00 00 04 00       test   $0x40000,%edx
     98b:       b0 14                   mov    $0x14,%al
     98d:       0f 85 92 00 00 00       jne    a25
<calc_period_shift.part.10+0x15c>
     993:       f7 c2 00 00 02 00       test   $0x20000,%edx
     999:       b0 13                   mov    $0x13,%al
     99b:       0f 85 84 00 00 00       jne    a25
<calc_period_shift.part.10+0x15c>
     9a1:       f7 c2 00 00 01 00       test   $0x10000,%edx
     9a7:       b0 12                   mov    $0x12,%al
     9a9:       75 7a                   jne    a25
<calc_period_shift.part.10+0x15c>
     9ab:       f6 c6 80                test   $0x80,%dh
     9ae:       b0 11                   mov    $0x11,%al
     9b0:       75 73                   jne    a25
<calc_period_shift.part.10+0x15c>
     9b2:       f6 c6 40                test   $0x40,%dh
     9b5:       b0 10                   mov    $0x10,%al
     9b7:       75 6c                   jne    a25
<calc_period_shift.part.10+0x15c>
     9b9:       f6 c6 20                test   $0x20,%dh
     9bc:       b0 0f                   mov    $0xf,%al
     9be:       75 65                   jne    a25
<calc_period_shift.part.10+0x15c>
     9c0:       f6 c6 10                test   $0x10,%dh
     9c3:       b0 0e                   mov    $0xe,%al
     9c5:       75 5e                   jne    a25
<calc_period_shift.part.10+0x15c>
     9c7:       f6 c6 08                test   $0x8,%dh
     9ca:       b0 0d                   mov    $0xd,%al
     9cc:       75 57                   jne    a25
<calc_period_shift.part.10+0x15c>
     9ce:       f6 c6 04                test   $0x4,%dh
     9d1:       b0 0c                   mov    $0xc,%al
     9d3:       75 50                   jne    a25
<calc_period_shift.part.10+0x15c>
     9d5:       f6 c6 02                test   $0x2,%dh
     9d8:       b0 0b                   mov    $0xb,%al
     9da:       75 49                   jne    a25
<calc_period_shift.part.10+0x15c>
     9dc:       f6 c6 01                test   $0x1,%dh
     9df:       b0 0a                   mov    $0xa,%al
     9e1:       75 42                   jne    a25
<calc_period_shift.part.10+0x15c>
     9e3:       f6 c2 80                test   $0x80,%dl
     9e6:       b0 09                   mov    $0x9,%al
     9e8:       75 3b                   jne    a25
<calc_period_shift.part.10+0x15c>
     9ea:       f6 c2 40                test   $0x40,%dl
     9ed:       b0 08                   mov    $0x8,%al
     9ef:       75 34                   jne    a25
<calc_period_shift.part.10+0x15c>
     9f1:       f6 c2 20                test   $0x20,%dl
     9f4:       b0 07                   mov    $0x7,%al
     9f6:       75 2d                   jne    a25
<calc_period_shift.part.10+0x15c>
     9f8:       f6 c2 10                test   $0x10,%dl
     9fb:       b0 06                   mov    $0x6,%al
     9fd:       75 26                   jne    a25
<calc_period_shift.part.10+0x15c>
     9ff:       f6 c2 08                test   $0x8,%dl
     a02:       b0 05                   mov    $0x5,%al
     a04:       75 1f                   jne    a25
<calc_period_shift.part.10+0x15c>
     a06:       f6 c2 04                test   $0x4,%dl
     a09:       b0 04                   mov    $0x4,%al
     a0b:       75 18                   jne    a25
<calc_period_shift.part.10+0x15c>
     a0d:       f6 c2 02                test   $0x2,%dl
     a10:       b0 03                   mov    $0x3,%al
     a12:       75 11                   jne    a25
<calc_period_shift.part.10+0x15c>
     a14:       80 e2 01                and    $0x1,%dl
     a17:       b0 02                   mov    $0x2,%al
     a19:       75 0a                   jne    a25
<calc_period_shift.part.10+0x15c>
     a1b:       e8 fc ff ff ff          call   a1c
<calc_period_shift.part.10+0x153>    a1c: R_386_PC32 ____ilog2_NaN
     a20:       b8 21 00 00 00          mov    $0x21,%eax
     a25:       5d                      pop    %ebp
     a26:       c3                      ret

00000a27 <calc_period_shift>:
     a27:       55                      push   %ebp
     a28:       83 ca ff                or     $0xffffffff,%edx
     a2b:       89 e5                   mov    %esp,%ebp
     a2d:       0f bd 05 90 00 00 00    bsr    0x90,%eax        a30:
R_386_32   default_backing_dev_info
     a34:       0f 44 c2                cmove  %edx,%eax
     a37:       5d                      pop    %ebp
     a38:       83 c0 02                add    $0x2,%eax
     a3b:       c3                      ret

- EOT -

- Sedat -

[-- Attachment #2: mm_page-writeback.o_v2.disasm.xz --]
[-- Type: application/octet-stream, Size: 20276 bytes --]

[-- Attachment #3: gcc-4.5_mm_page-writeback.o.disasm.xz --]
[-- Type: application/octet-stream, Size: 19616 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 00/12] IO-less dirty throttling v7
  2011-04-18  6:57           ` Sedat Dilek
@ 2011-04-18  8:18             ` Wu Fengguang
  2011-04-18 10:22               ` Sedat Dilek
  0 siblings, 1 reply; 29+ messages in thread
From: Wu Fengguang @ 2011-04-18  8:18 UTC (permalink / raw)
  To: sedat.dilek@gmail.com
  Cc: Andrew Morton, Jan Kara, Christoph Hellwig, Trond Myklebust,
	Dave Chinner, Theodore Ts'o, Chris Mason, Peter Zijlstra,
	Mel Gorman, Rik van Riel, KOSAKI Motohiro, Greg Thelen,
	Minchan Kim, Vivek Goyal, Andrea Righi, Balbir Singh, linux-mm,
	linux-fsdevel@vger.kernel.org, LKML

[-- Attachment #1: Type: text/plain, Size: 9511 bytes --]

> Unfortunately, this "v2" patch still breaks with gcc-4.6 here:
> 
>   LD      .tmp_vmlinux1
> mm/built-in.o: In function `calc_period_shift.part.10':
> page-writeback.c:(.text+0x6458): undefined reference to `____ilog2_NaN'
> make[4]: *** [.tmp_vmlinux1] Error 1
> 
> My patchset against next-20110415 looks like this:
> 
>   (+) OK   writeback-dirty-throttling-v7/writeback-dirty-throttling-v7.patch
>   (+) OK   writeback-dirty-throttling-post-v7/0001-writeback-i386-compile-fix.patch
>   (+) OK   writeback-dirty-throttling-post-v7/0002-writeback-quick-CONFIG_BLK_DEV_THROTTLING-n-compile-.patch
>   (+) OK   writeback-dirty-throttling-post-v7/0003-Revert-writeback-scale-dirty-proportions-period-with.patch
>   (+) OK   writeback-dirty-throttling-v7-fix/writeback-scale-dirty-proportions-period-with-writeout-bandwidth-v2.patch
> 
> Attached are the disasm of mm/page-writeback.o (v2, gcc-4.6) and the
> disasm of yesterday's experiments with gcc-4.5.
> 
> [ gcc-4.5 ]
> 
> 00006574 <calc_period_shift>:
>     6574:       a1 90 00 00 00          mov    0x90,%eax        6575:
> R_386_32  default_backing_dev_info
>     6579:       55                      push   %ebp
>     657a:       89 e5                   mov    %esp,%ebp
>     657c:       e8 02 f8 ff ff          call   5d83 <__ilog2_u32>
>     6581:       5d                      pop    %ebp
>     6582:       83 c0 02                add    $0x2,%eax
>     6585:       c3                      ret

gcc-4.5 is generating the right code, while the below silly macro
expansion seems like __builtin_constant_p(n) wrongly evaluating to true.
I wonder if the attached patch will workaround the gcc's bug. It adds a
local variable in calc_period_shift() for passing to ilog2().

Thanks,
Fengguang

> [ gcc-4.6 ]
> 
> 000008c9 <calc_period_shift.part.10>:
>      8c9:       8b 15 90 00 00 00       mov    0x90,%edx        8cb:
> R_386_32   default_backing_dev_info
>      8cf:       55                      push   %ebp
>      8d0:       89 e5                   mov    %esp,%ebp
>      8d2:       85 d2                   test   %edx,%edx
>      8d4:       0f 88 46 01 00 00       js     a20
> <calc_period_shift.part.10+0x157>
>      8da:       f7 c2 00 00 00 40       test   $0x40000000,%edx
>      8e0:       b8 20 00 00 00          mov    $0x20,%eax
>      8e5:       0f 85 3a 01 00 00       jne    a25
> <calc_period_shift.part.10+0x15c>
>      8eb:       f7 c2 00 00 00 20       test   $0x20000000,%edx
>      8f1:       b0 1f                   mov    $0x1f,%al
>      8f3:       0f 85 2c 01 00 00       jne    a25
> <calc_period_shift.part.10+0x15c>
>      8f9:       f7 c2 00 00 00 10       test   $0x10000000,%edx
>      8ff:       b0 1e                   mov    $0x1e,%al
>      901:       0f 85 1e 01 00 00       jne    a25
> <calc_period_shift.part.10+0x15c>
>      907:       f7 c2 00 00 00 08       test   $0x8000000,%edx
>      90d:       b0 1d                   mov    $0x1d,%al
>      90f:       0f 85 10 01 00 00       jne    a25
> <calc_period_shift.part.10+0x15c>
>      915:       f7 c2 00 00 00 04       test   $0x4000000,%edx
>      91b:       b0 1c                   mov    $0x1c,%al
>      91d:       0f 85 02 01 00 00       jne    a25
> <calc_period_shift.part.10+0x15c>
>      923:       f7 c2 00 00 00 02       test   $0x2000000,%edx
>      929:       b0 1b                   mov    $0x1b,%al
>      92b:       0f 85 f4 00 00 00       jne    a25
> <calc_period_shift.part.10+0x15c>
>      931:       f7 c2 00 00 00 01       test   $0x1000000,%edx
>      937:       b0 1a                   mov    $0x1a,%al
>      939:       0f 85 e6 00 00 00       jne    a25
> <calc_period_shift.part.10+0x15c>
>      93f:       f7 c2 00 00 80 00       test   $0x800000,%edx
>      945:       b0 19                   mov    $0x19,%al
>      947:       0f 85 d8 00 00 00       jne    a25
> <calc_period_shift.part.10+0x15c>
>      94d:       f7 c2 00 00 40 00       test   $0x400000,%edx
>      953:       b0 18                   mov    $0x18,%al
>      955:       0f 85 ca 00 00 00       jne    a25
> <calc_period_shift.part.10+0x15c>
>      95b:       f7 c2 00 00 20 00       test   $0x200000,%edx
>      961:       b0 17                   mov    $0x17,%al
>      963:       0f 85 bc 00 00 00       jne    a25
> <calc_period_shift.part.10+0x15c>
>      969:       f7 c2 00 00 10 00       test   $0x100000,%edx
>      96f:       b0 16                   mov    $0x16,%al
>      971:       0f 85 ae 00 00 00       jne    a25
> <calc_period_shift.part.10+0x15c>
>      977:       f7 c2 00 00 08 00       test   $0x80000,%edx
>      97d:       b0 15                   mov    $0x15,%al
>      97f:       0f 85 a0 00 00 00       jne    a25
> <calc_period_shift.part.10+0x15c>
>      985:       f7 c2 00 00 04 00       test   $0x40000,%edx
>      98b:       b0 14                   mov    $0x14,%al
>      98d:       0f 85 92 00 00 00       jne    a25
> <calc_period_shift.part.10+0x15c>
>      993:       f7 c2 00 00 02 00       test   $0x20000,%edx
>      999:       b0 13                   mov    $0x13,%al
>      99b:       0f 85 84 00 00 00       jne    a25
> <calc_period_shift.part.10+0x15c>
>      9a1:       f7 c2 00 00 01 00       test   $0x10000,%edx
>      9a7:       b0 12                   mov    $0x12,%al
>      9a9:       75 7a                   jne    a25
> <calc_period_shift.part.10+0x15c>
>      9ab:       f6 c6 80                test   $0x80,%dh
>      9ae:       b0 11                   mov    $0x11,%al
>      9b0:       75 73                   jne    a25
> <calc_period_shift.part.10+0x15c>
>      9b2:       f6 c6 40                test   $0x40,%dh
>      9b5:       b0 10                   mov    $0x10,%al
>      9b7:       75 6c                   jne    a25
> <calc_period_shift.part.10+0x15c>
>      9b9:       f6 c6 20                test   $0x20,%dh
>      9bc:       b0 0f                   mov    $0xf,%al
>      9be:       75 65                   jne    a25
> <calc_period_shift.part.10+0x15c>
>      9c0:       f6 c6 10                test   $0x10,%dh
>      9c3:       b0 0e                   mov    $0xe,%al
>      9c5:       75 5e                   jne    a25
> <calc_period_shift.part.10+0x15c>
>      9c7:       f6 c6 08                test   $0x8,%dh
>      9ca:       b0 0d                   mov    $0xd,%al
>      9cc:       75 57                   jne    a25
> <calc_period_shift.part.10+0x15c>
>      9ce:       f6 c6 04                test   $0x4,%dh
>      9d1:       b0 0c                   mov    $0xc,%al
>      9d3:       75 50                   jne    a25
> <calc_period_shift.part.10+0x15c>
>      9d5:       f6 c6 02                test   $0x2,%dh
>      9d8:       b0 0b                   mov    $0xb,%al
>      9da:       75 49                   jne    a25
> <calc_period_shift.part.10+0x15c>
>      9dc:       f6 c6 01                test   $0x1,%dh
>      9df:       b0 0a                   mov    $0xa,%al
>      9e1:       75 42                   jne    a25
> <calc_period_shift.part.10+0x15c>
>      9e3:       f6 c2 80                test   $0x80,%dl
>      9e6:       b0 09                   mov    $0x9,%al
>      9e8:       75 3b                   jne    a25
> <calc_period_shift.part.10+0x15c>
>      9ea:       f6 c2 40                test   $0x40,%dl
>      9ed:       b0 08                   mov    $0x8,%al
>      9ef:       75 34                   jne    a25
> <calc_period_shift.part.10+0x15c>
>      9f1:       f6 c2 20                test   $0x20,%dl
>      9f4:       b0 07                   mov    $0x7,%al
>      9f6:       75 2d                   jne    a25
> <calc_period_shift.part.10+0x15c>
>      9f8:       f6 c2 10                test   $0x10,%dl
>      9fb:       b0 06                   mov    $0x6,%al
>      9fd:       75 26                   jne    a25
> <calc_period_shift.part.10+0x15c>
>      9ff:       f6 c2 08                test   $0x8,%dl
>      a02:       b0 05                   mov    $0x5,%al
>      a04:       75 1f                   jne    a25
> <calc_period_shift.part.10+0x15c>
>      a06:       f6 c2 04                test   $0x4,%dl
>      a09:       b0 04                   mov    $0x4,%al
>      a0b:       75 18                   jne    a25
> <calc_period_shift.part.10+0x15c>
>      a0d:       f6 c2 02                test   $0x2,%dl
>      a10:       b0 03                   mov    $0x3,%al
>      a12:       75 11                   jne    a25
> <calc_period_shift.part.10+0x15c>
>      a14:       80 e2 01                and    $0x1,%dl
>      a17:       b0 02                   mov    $0x2,%al
>      a19:       75 0a                   jne    a25
> <calc_period_shift.part.10+0x15c>
>      a1b:       e8 fc ff ff ff          call   a1c
> <calc_period_shift.part.10+0x153>    a1c: R_386_PC32 ____ilog2_NaN
>      a20:       b8 21 00 00 00          mov    $0x21,%eax
>      a25:       5d                      pop    %ebp
>      a26:       c3                      ret
> 
> 00000a27 <calc_period_shift>:
>      a27:       55                      push   %ebp
>      a28:       83 ca ff                or     $0xffffffff,%edx
>      a2b:       89 e5                   mov    %esp,%ebp
>      a2d:       0f bd 05 90 00 00 00    bsr    0x90,%eax        a30:
> R_386_32   default_backing_dev_info
>      a34:       0f 44 c2                cmove  %edx,%eax
>      a37:       5d                      pop    %ebp
>      a38:       83 c0 02                add    $0x2,%eax
>      a3b:       c3                      ret
> 
> - EOT -
> 
> - Sedat -




[-- Attachment #2: writeback-adaptive-proportions-shift.patch --]
[-- Type: text/x-diff, Size: 2280 bytes --]

Subject: writeback: scale dirty proportions period with writeout bandwidth
Date: Sat Apr 16 18:38:41 CST 2011

CC: Peter Zijlstra <a.p.zijlstra@chello.nl>
Signed-off-by: Wu Fengguang <fengguang.wu@intel.com>
---
 mm/page-writeback.c |   25 ++++++++++++++-----------
 1 file changed, 14 insertions(+), 11 deletions(-)

--- linux-next.orig/mm/page-writeback.c	2011-04-17 20:52:13.000000000 +0800
+++ linux-next/mm/page-writeback.c	2011-04-18 16:06:03.000000000 +0800
@@ -121,20 +121,15 @@ static struct prop_descriptor vm_complet
 static struct prop_descriptor vm_dirties;
 
 /*
- * couple the period to the dirty_ratio:
+ * couple the period to global write throughput:
  *
- *   period/2 ~ roundup_pow_of_two(dirty limit)
+ *   period/2 ~ roundup_pow_of_two(write IO throughput)
  */
 static int calc_period_shift(void)
 {
-	unsigned long dirty_total;
+	unsigned long bw = default_backing_dev_info.avg_write_bandwidth;
 
-	if (vm_dirty_bytes)
-		dirty_total = vm_dirty_bytes / PAGE_SIZE;
-	else
-		dirty_total = (vm_dirty_ratio * determine_dirtyable_memory()) /
-				100;
-	return 2 + ilog2(dirty_total - 1);
+	return 2 + ilog2(bw);
 }
 
 /*
@@ -143,6 +138,14 @@ static int calc_period_shift(void)
 static void update_completion_period(void)
 {
 	int shift = calc_period_shift();
+
+	if (shift > PROP_MAX_SHIFT)
+		shift = PROP_MAX_SHIFT;
+
+	if (shift <= vm_completions.pg[0].shift &&
+	    shift >  vm_completions.pg[0].shift / 4)
+		return;
+
 	prop_change_shift(&vm_completions, shift);
 	prop_change_shift(&vm_dirties, shift);
 }
@@ -180,7 +183,6 @@ int dirty_ratio_handler(struct ctl_table
 
 	ret = proc_dointvec_minmax(table, write, buffer, lenp, ppos);
 	if (ret == 0 && write && vm_dirty_ratio != old_ratio) {
-		update_completion_period();
 		vm_dirty_bytes = 0;
 	}
 	return ret;
@@ -196,7 +198,6 @@ int dirty_bytes_handler(struct ctl_table
 
 	ret = proc_doulongvec_minmax(table, write, buffer, lenp, ppos);
 	if (ret == 0 && write && vm_dirty_bytes != old_bytes) {
-		update_completion_period();
 		vm_dirty_ratio = 0;
 	}
 	return ret;
@@ -1044,6 +1045,8 @@ snapshot:
 	bdi->bw_time_stamp = now;
 unlock:
 	spin_unlock(&dirty_lock);
+	if (gbdi->bw_time_stamp == now)
+		update_completion_period();
 }
 
 static unsigned long max_pause(struct backing_dev_info *bdi,

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 00/12] IO-less dirty throttling v7
  2011-04-18  8:18             ` Wu Fengguang
@ 2011-04-18 10:22               ` Sedat Dilek
  0 siblings, 0 replies; 29+ messages in thread
From: Sedat Dilek @ 2011-04-18 10:22 UTC (permalink / raw)
  To: Wu Fengguang
  Cc: Andrew Morton, Jan Kara, Christoph Hellwig, Trond Myklebust,
	Dave Chinner, Theodore Ts'o, Chris Mason, Peter Zijlstra,
	Mel Gorman, Rik van Riel, KOSAKI Motohiro, Greg Thelen,
	Minchan Kim, Vivek Goyal, Andrea Righi, Balbir Singh, linux-mm,
	linux-fsdevel@vger.kernel.org, LKML

[-- Attachment #1: Type: text/plain, Size: 11724 bytes --]

On Mon, Apr 18, 2011 at 10:18 AM, Wu Fengguang <fengguang.wu@intel.com> wrote:
>> Unfortunately, this "v2" patch still breaks with gcc-4.6 here:
>>
>>   LD      .tmp_vmlinux1
>> mm/built-in.o: In function `calc_period_shift.part.10':
>> page-writeback.c:(.text+0x6458): undefined reference to `____ilog2_NaN'
>> make[4]: *** [.tmp_vmlinux1] Error 1
>>
>> My patchset against next-20110415 looks like this:
>>
>>   (+) OK   writeback-dirty-throttling-v7/writeback-dirty-throttling-v7.patch
>>   (+) OK   writeback-dirty-throttling-post-v7/0001-writeback-i386-compile-fix.patch
>>   (+) OK   writeback-dirty-throttling-post-v7/0002-writeback-quick-CONFIG_BLK_DEV_THROTTLING-n-compile-.patch
>>   (+) OK   writeback-dirty-throttling-post-v7/0003-Revert-writeback-scale-dirty-proportions-period-with.patch
>>   (+) OK   writeback-dirty-throttling-v7-fix/writeback-scale-dirty-proportions-period-with-writeout-bandwidth-v2.patch
>>
>> Attached are the disasm of mm/page-writeback.o (v2, gcc-4.6) and the
>> disasm of yesterday's experiments with gcc-4.5.
>>
>> [ gcc-4.5 ]
>>
>> 00006574 <calc_period_shift>:
>>     6574:       a1 90 00 00 00          mov    0x90,%eax        6575:
>> R_386_32  default_backing_dev_info
>>     6579:       55                      push   %ebp
>>     657a:       89 e5                   mov    %esp,%ebp
>>     657c:       e8 02 f8 ff ff          call   5d83 <__ilog2_u32>
>>     6581:       5d                      pop    %ebp
>>     6582:       83 c0 02                add    $0x2,%eax
>>     6585:       c3                      ret
>
> gcc-4.5 is generating the right code, while the below silly macro
> expansion seems like __builtin_constant_p(n) wrongly evaluating to true.
> I wonder if the attached patch will workaround the gcc's bug. It adds a
> local variable in calc_period_shift() for passing to ilog2().
>
> Thanks,
> Fengguang
>

Thanks for the patch, that "gcc-4.6 workaround" works here.
Feel free to add:

       Tested-by: Sedat Dilek <sedat.dilek@gmail.com>.

- Sedat -

P.S.: Attached disasm v3 with gcc-4.6

>> [ gcc-4.6 ]
>>
>> 000008c9 <calc_period_shift.part.10>:
>>      8c9:       8b 15 90 00 00 00       mov    0x90,%edx        8cb:
>> R_386_32   default_backing_dev_info
>>      8cf:       55                      push   %ebp
>>      8d0:       89 e5                   mov    %esp,%ebp
>>      8d2:       85 d2                   test   %edx,%edx
>>      8d4:       0f 88 46 01 00 00       js     a20
>> <calc_period_shift.part.10+0x157>
>>      8da:       f7 c2 00 00 00 40       test   $0x40000000,%edx
>>      8e0:       b8 20 00 00 00          mov    $0x20,%eax
>>      8e5:       0f 85 3a 01 00 00       jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      8eb:       f7 c2 00 00 00 20       test   $0x20000000,%edx
>>      8f1:       b0 1f                   mov    $0x1f,%al
>>      8f3:       0f 85 2c 01 00 00       jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      8f9:       f7 c2 00 00 00 10       test   $0x10000000,%edx
>>      8ff:       b0 1e                   mov    $0x1e,%al
>>      901:       0f 85 1e 01 00 00       jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      907:       f7 c2 00 00 00 08       test   $0x8000000,%edx
>>      90d:       b0 1d                   mov    $0x1d,%al
>>      90f:       0f 85 10 01 00 00       jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      915:       f7 c2 00 00 00 04       test   $0x4000000,%edx
>>      91b:       b0 1c                   mov    $0x1c,%al
>>      91d:       0f 85 02 01 00 00       jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      923:       f7 c2 00 00 00 02       test   $0x2000000,%edx
>>      929:       b0 1b                   mov    $0x1b,%al
>>      92b:       0f 85 f4 00 00 00       jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      931:       f7 c2 00 00 00 01       test   $0x1000000,%edx
>>      937:       b0 1a                   mov    $0x1a,%al
>>      939:       0f 85 e6 00 00 00       jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      93f:       f7 c2 00 00 80 00       test   $0x800000,%edx
>>      945:       b0 19                   mov    $0x19,%al
>>      947:       0f 85 d8 00 00 00       jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      94d:       f7 c2 00 00 40 00       test   $0x400000,%edx
>>      953:       b0 18                   mov    $0x18,%al
>>      955:       0f 85 ca 00 00 00       jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      95b:       f7 c2 00 00 20 00       test   $0x200000,%edx
>>      961:       b0 17                   mov    $0x17,%al
>>      963:       0f 85 bc 00 00 00       jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      969:       f7 c2 00 00 10 00       test   $0x100000,%edx
>>      96f:       b0 16                   mov    $0x16,%al
>>      971:       0f 85 ae 00 00 00       jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      977:       f7 c2 00 00 08 00       test   $0x80000,%edx
>>      97d:       b0 15                   mov    $0x15,%al
>>      97f:       0f 85 a0 00 00 00       jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      985:       f7 c2 00 00 04 00       test   $0x40000,%edx
>>      98b:       b0 14                   mov    $0x14,%al
>>      98d:       0f 85 92 00 00 00       jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      993:       f7 c2 00 00 02 00       test   $0x20000,%edx
>>      999:       b0 13                   mov    $0x13,%al
>>      99b:       0f 85 84 00 00 00       jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      9a1:       f7 c2 00 00 01 00       test   $0x10000,%edx
>>      9a7:       b0 12                   mov    $0x12,%al
>>      9a9:       75 7a                   jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      9ab:       f6 c6 80                test   $0x80,%dh
>>      9ae:       b0 11                   mov    $0x11,%al
>>      9b0:       75 73                   jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      9b2:       f6 c6 40                test   $0x40,%dh
>>      9b5:       b0 10                   mov    $0x10,%al
>>      9b7:       75 6c                   jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      9b9:       f6 c6 20                test   $0x20,%dh
>>      9bc:       b0 0f                   mov    $0xf,%al
>>      9be:       75 65                   jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      9c0:       f6 c6 10                test   $0x10,%dh
>>      9c3:       b0 0e                   mov    $0xe,%al
>>      9c5:       75 5e                   jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      9c7:       f6 c6 08                test   $0x8,%dh
>>      9ca:       b0 0d                   mov    $0xd,%al
>>      9cc:       75 57                   jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      9ce:       f6 c6 04                test   $0x4,%dh
>>      9d1:       b0 0c                   mov    $0xc,%al
>>      9d3:       75 50                   jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      9d5:       f6 c6 02                test   $0x2,%dh
>>      9d8:       b0 0b                   mov    $0xb,%al
>>      9da:       75 49                   jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      9dc:       f6 c6 01                test   $0x1,%dh
>>      9df:       b0 0a                   mov    $0xa,%al
>>      9e1:       75 42                   jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      9e3:       f6 c2 80                test   $0x80,%dl
>>      9e6:       b0 09                   mov    $0x9,%al
>>      9e8:       75 3b                   jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      9ea:       f6 c2 40                test   $0x40,%dl
>>      9ed:       b0 08                   mov    $0x8,%al
>>      9ef:       75 34                   jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      9f1:       f6 c2 20                test   $0x20,%dl
>>      9f4:       b0 07                   mov    $0x7,%al
>>      9f6:       75 2d                   jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      9f8:       f6 c2 10                test   $0x10,%dl
>>      9fb:       b0 06                   mov    $0x6,%al
>>      9fd:       75 26                   jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      9ff:       f6 c2 08                test   $0x8,%dl
>>      a02:       b0 05                   mov    $0x5,%al
>>      a04:       75 1f                   jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      a06:       f6 c2 04                test   $0x4,%dl
>>      a09:       b0 04                   mov    $0x4,%al
>>      a0b:       75 18                   jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      a0d:       f6 c2 02                test   $0x2,%dl
>>      a10:       b0 03                   mov    $0x3,%al
>>      a12:       75 11                   jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      a14:       80 e2 01                and    $0x1,%dl
>>      a17:       b0 02                   mov    $0x2,%al
>>      a19:       75 0a                   jne    a25
>> <calc_period_shift.part.10+0x15c>
>>      a1b:       e8 fc ff ff ff          call   a1c
>> <calc_period_shift.part.10+0x153>    a1c: R_386_PC32 ____ilog2_NaN
>>      a20:       b8 21 00 00 00          mov    $0x21,%eax
>>      a25:       5d                      pop    %ebp
>>      a26:       c3                      ret
>>
>> 00000a27 <calc_period_shift>:
>>      a27:       55                      push   %ebp
>>      a28:       83 ca ff                or     $0xffffffff,%edx
>>      a2b:       89 e5                   mov    %esp,%ebp
>>      a2d:       0f bd 05 90 00 00 00    bsr    0x90,%eax        a30:
>> R_386_32   default_backing_dev_info
>>      a34:       0f 44 c2                cmove  %edx,%eax
>>      a37:       5d                      pop    %ebp
>>      a38:       83 c0 02                add    $0x2,%eax
>>      a3b:       c3                      ret
>>
>> - EOT -
>>
>> - Sedat -
>
>
>
>

[-- Attachment #2: mm_page-writeback.o_v3.disasm.xz --]
[-- Type: application/octet-stream, Size: 19716 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 00/12] IO-less dirty throttling v7
  2011-04-16 13:25 [PATCH 00/12] IO-less dirty throttling v7 Wu Fengguang
                   ` (13 preceding siblings ...)
  2011-04-17  7:31 ` Marco Stornelli
@ 2011-04-26 17:19 ` Vivek Goyal
  2011-04-28 14:27   ` Wu Fengguang
  14 siblings, 1 reply; 29+ messages in thread
From: Vivek Goyal @ 2011-04-26 17:19 UTC (permalink / raw)
  To: Wu Fengguang
  Cc: Andrew Morton, Jan Kara, Christoph Hellwig, Trond Myklebust,
	Dave Chinner, Theodore Ts'o, Chris Mason, Peter Zijlstra,
	Mel Gorman, Rik van Riel, KOSAKI Motohiro, Greg Thelen,
	Minchan Kim, Andrea Righi, Balbir Singh, linux-mm, linux-fsdevel,
	LKML

On Sat, Apr 16, 2011 at 09:25:46PM +0800, Wu Fengguang wrote:
> Andrew,
> 
> This revision undergoes a number of simplifications, cleanups and fixes.
> Independent patches are separated out. The core patches (07, 08) now have
> easier to understand changelog. Detailed rationals can be found in patch 08.
> 
> In response to the complexity complaints, an introduction document is
> written explaining the rationals, algorithm and visual case studies:
> 
> http://www.kernel.org/pub/linux/kernel/people/wfg/writeback/slides/smooth-dirty-throttling.pdf
> 

Hi Fenguang,

I went quickly browsed through above document and am trying to understand
the meaning of following lines and see how does it fit into the framework
of existing IO conroller.

- task IO controller endogenous
- cgroup IO controller well integrated
- proportional IO controller endogenous

You had sent me a link where you had prepared a patch to control the
async IO completely. So because this code is all about measuring the
bdi writeback rate and then coming up task ratelimit accoridingly, it
will never know about other IO going on in the cgroup. READS and direct
IO.

So IIUC, to make use of above logic for cgroup throttling, one shall have
to come up with explicity notion of async bandwidth per cgroup which does
not control other writes. Currently we have following when it comes to
throttling.

blkio.throttle_read_bps
blkio.throttle_write_bps

The intention is to be able to control the WRITE bandwidth of cgroup and
it could be any kind of WRITE (be it buffered WRITE or direct WRITES). 
Currently we control only direct WRITES and question of how to also
control buffered writes is still on the table.

Because your patch does not know about other WRITES happening in the
system, one needs to create a way so that buffered WRITES and direct
WRITES can be accounted together against a group and throttled
accordingly.

What does "proportional IO controller endogenous" mean? Currently we do
all proportional IO division in CFQ. So are you proposing that for 
buffered WRITES we come up with a different policy altogether in writeback
layer or somehow it is integrating with CFQ mechanism?

Thanks
Vivek

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH 00/12] IO-less dirty throttling v7
  2011-04-26 17:19 ` Vivek Goyal
@ 2011-04-28 14:27   ` Wu Fengguang
  0 siblings, 0 replies; 29+ messages in thread
From: Wu Fengguang @ 2011-04-28 14:27 UTC (permalink / raw)
  To: Vivek Goyal
  Cc: Andrew Morton, Jan Kara, Christoph Hellwig, Trond Myklebust,
	Dave Chinner, Theodore Ts'o, Chris Mason, Peter Zijlstra,
	Mel Gorman, Rik van Riel, KOSAKI Motohiro, Greg Thelen,
	Minchan Kim, Andrea Righi, Balbir Singh, linux-mm,
	linux-fsdevel@vger.kernel.org, LKML

Hi Vivek,

On Wed, Apr 27, 2011 at 01:19:54AM +0800, Vivek Goyal wrote:
> On Sat, Apr 16, 2011 at 09:25:46PM +0800, Wu Fengguang wrote:
> > Andrew,
> > 
> > This revision undergoes a number of simplifications, cleanups and fixes.
> > Independent patches are separated out. The core patches (07, 08) now have
> > easier to understand changelog. Detailed rationals can be found in patch 08.
> > 
> > In response to the complexity complaints, an introduction document is
> > written explaining the rationals, algorithm and visual case studies:
> > 
> > http://www.kernel.org/pub/linux/kernel/people/wfg/writeback/slides/smooth-dirty-throttling.pdf
> > 
> 
> Hi Fenguang,
> 
> I went quickly browsed through above document and am trying to understand
> the meaning of following lines and see how does it fit into the framework
> of existing IO conroller.

Thanks for taking the look! Regarding this diff:

http://git.kernel.org/?p=linux/kernel/git/wfg/writeback.git;a=blobdiff;f=mm/page-writeback.c;h=0b579e7fd338fd1f59cc36bf15fda06ff6260634;hp=34dff9f0d28d0f4f0794eb41187f71b4ade6b8a2;hb=1a58ad99ce1f6a9df6618a4b92fa4859cc3e7e90;hpb=5b6fcb3125ea52ff04a2fad27a51307842deb1a0

> - task IO controller endogenous

Normally the bandwidth the current task to be throttled at (referred
to as task_bw below) is runtime calculated, however if there is an
interface (the patch reuses current->signal->rlim[RLIMIT_RSS].rlim_cur),
then it can just use that bandwidth to throttle the current task. No
extra code is needed.  In this sense, it has the endogenous capability
to do per-task async write IO controller.

> - proportional IO controller endogenous

Sorry, "priority" could be more accurate than "proportional".
When task_bw is calculated in the normal way, you may further do

        task_bw *= 2;

to grant it doubled bandwidth than the other tasks. Or do

        task_bw *= current->async_write_priority;

to give it whatever configurable async write priority. When you do
this, the base bandwidth is smart enough to adapt to the new balance
point.  In this sense, exact priority control is also endogenous.

> - cgroup IO controller well integrated

The async write cgroup IO controller is implemented in the same way as
the "global IO controller", in that it's also based on the "base
bandwidth" concept and is calculated with the same algorithm.

> You had sent me a link where you had prepared a patch to control the
> async IO completely. So because this code is all about measuring the
> bdi writeback rate and then coming up task ratelimit accoridingly, it
> will never know about other IO going on in the cgroup. READS and direct
> IO.

Right.

> So IIUC, to make use of above logic for cgroup throttling, one shall have
> to come up with explicity notion of async bandwidth per cgroup which does
> not control other writes. Currently we have following when it comes to
> throttling.
> 
> blkio.throttle_read_bps
> blkio.throttle_write_bps
> 
> The intention is to be able to control the WRITE bandwidth of cgroup and
> it could be any kind of WRITE (be it buffered WRITE or direct WRITES). 
> Currently we control only direct WRITES and question of how to also
> control buffered writes is still on the table.
> 
> Because your patch does not know about other WRITES happening in the
> system, one needs to create a way so that buffered WRITES and direct
> WRITES can be accounted together against a group and throttled
> accordingly.

Basically it is now possible to also send DIRECT writes to the new
balance_dirty_pages(), because it's RATE based rather than THRESHOLD
based. The DIRECT writes have nothing to do with dirty THRESHOLD, so
the legacy balance_dirty_pages() was not able to handle them at all.

Then there is the danger that DIRECT writes be double throttled --
explicitly in balance_dirty_pages() and implicitly in
get_request_wait().  But as long as the latter do not sleep for too
long time (< 500ms for now), it will be compensated in
balance_dirty_pages() (aka. think time compensation).

Or even safer, we may let DIRECT writes enter balance_dirty_pages()
only if it's to be cgroup throttled. The cgroup IO controller can be
enhanced to do "leak" control that can effectively account for all
get_request_wait() latencies.

> What does "proportional IO controller endogenous" mean? Currently we do
> all proportional IO division in CFQ. So are you proposing that for 
> buffered WRITES we come up with a different policy altogether in writeback
> layer or somehow it is integrating with CFQ mechanism?

See above. It's not related to CFQ and totally within the scope of
(async) writes.

Thanks,
Fengguang

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2011-04-28 14:27 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-16 13:25 [PATCH 00/12] IO-less dirty throttling v7 Wu Fengguang
2011-04-16 13:25 ` [PATCH 01/12] writeback: account per-bdi accumulated written pages Wu Fengguang
2011-04-16 13:25 ` [PATCH 02/12] writeback: account per-bdi accumulated dirtied pages Wu Fengguang
2011-04-16 13:25 ` [PATCH 03/12] writeback: bdi write bandwidth estimation Wu Fengguang
2011-04-16 13:25 ` [PATCH 04/12] writeback: smoothed global/bdi dirty pages Wu Fengguang
2011-04-16 13:25 ` [PATCH 05/12] writeback: smoothed dirty threshold and limit Wu Fengguang
2011-04-16 13:25 ` [PATCH 06/12] writeback: enforce 1/4 gap between the dirty/background thresholds Wu Fengguang
2011-04-16 13:25 ` [PATCH 07/12] writeback: base throttle bandwidth and position ratio Wu Fengguang
2011-04-16 13:25 ` [PATCH 08/12] writeback: IO-less balance_dirty_pages() Wu Fengguang
2011-04-16 13:25 ` [PATCH 09/12] writeback: show bdi write bandwidth in debugfs Wu Fengguang
2011-04-16 13:25 ` [PATCH 10/12] writeback: trace dirty_ratelimit Wu Fengguang
2011-04-16 13:25 ` [PATCH 11/12] writeback: trace balance_dirty_pages Wu Fengguang
2011-04-16 13:25 ` [PATCH 12/12] writeback: trace global_dirty_state Wu Fengguang
2011-04-16 16:27 ` [PATCH 00/12] IO-less dirty throttling v7 Sedat Dilek
2011-04-17  1:44   ` Wu Fengguang
2011-04-17  3:18     ` Sedat Dilek
2011-04-17  4:10       ` Wu Fengguang
2011-04-17  4:46         ` Sedat Dilek
2011-04-17  6:46           ` Sedat Dilek
2011-04-18  0:13         ` Wu Fengguang
2011-04-18  6:57           ` Sedat Dilek
2011-04-18  8:18             ` Wu Fengguang
2011-04-18 10:22               ` Sedat Dilek
2011-04-17  7:31 ` Marco Stornelli
2011-04-17  9:30   ` Wu Fengguang
2011-04-17 17:44     ` Marco Stornelli
2011-04-17 23:31       ` Wu Fengguang
2011-04-26 17:19 ` Vivek Goyal
2011-04-28 14:27   ` Wu Fengguang

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).