diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-10 19:59:59 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-01-10 19:59:59 -0500 |
commit | 001a541ea9163ace5e8243ee0e907ad80a4c0ec2 (patch) | |
tree | a76225046369c440de93739add9823f5ea060245 /include | |
parent | 40ba587923ae67090d9f141c1d3c951be5c1420e (diff) | |
parent | bc31b86a5923fad5f3fbb6192f767f410241ba27 (diff) |
Merge branch 'writeback-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux
* 'writeback-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux:
writeback: move MIN_WRITEBACK_PAGES to fs-writeback.c
writeback: balanced_rate cannot exceed write bandwidth
writeback: do strict bdi dirty_exceeded
writeback: avoid tiny dirty poll intervals
writeback: max, min and target dirty pause time
writeback: dirty ratelimit - think time compensation
btrfs: fix dirtied pages accounting on sub-page writes
writeback: fix dirtied pages accounting on redirty
writeback: fix dirtied pages accounting on sub-page writes
writeback: charge leaked page dirties to active tasks
writeback: Include all dirty inodes in background writeback
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/sched.h | 1 | ||||
-rw-r--r-- | include/linux/writeback.h | 9 | ||||
-rw-r--r-- | include/trace/events/writeback.h | 14 |
3 files changed, 16 insertions, 8 deletions
diff --git a/include/linux/sched.h b/include/linux/sched.h index f044f66018f2..21cd0303af51 100644 --- a/include/linux/sched.h +++ b/include/linux/sched.h | |||
@@ -1544,6 +1544,7 @@ struct task_struct { | |||
1544 | */ | 1544 | */ |
1545 | int nr_dirtied; | 1545 | int nr_dirtied; |
1546 | int nr_dirtied_pause; | 1546 | int nr_dirtied_pause; |
1547 | unsigned long dirty_paused_when; /* start of a write-and-pause period */ | ||
1547 | 1548 | ||
1548 | #ifdef CONFIG_LATENCYTOP | 1549 | #ifdef CONFIG_LATENCYTOP |
1549 | int latency_record_count; | 1550 | int latency_record_count; |
diff --git a/include/linux/writeback.h b/include/linux/writeback.h index 6dff47304971..995b8bf630ac 100644 --- a/include/linux/writeback.h +++ b/include/linux/writeback.h | |||
@@ -7,6 +7,8 @@ | |||
7 | #include <linux/sched.h> | 7 | #include <linux/sched.h> |
8 | #include <linux/fs.h> | 8 | #include <linux/fs.h> |
9 | 9 | ||
10 | DECLARE_PER_CPU(int, dirty_throttle_leaks); | ||
11 | |||
10 | /* | 12 | /* |
11 | * The 1/4 region under the global dirty thresh is for smooth dirty throttling: | 13 | * The 1/4 region under the global dirty thresh is for smooth dirty throttling: |
12 | * | 14 | * |
@@ -23,11 +25,6 @@ | |||
23 | #define DIRTY_SCOPE 8 | 25 | #define DIRTY_SCOPE 8 |
24 | #define DIRTY_FULL_SCOPE (DIRTY_SCOPE / 2) | 26 | #define DIRTY_FULL_SCOPE (DIRTY_SCOPE / 2) |
25 | 27 | ||
26 | /* | ||
27 | * 4MB minimal write chunk size | ||
28 | */ | ||
29 | #define MIN_WRITEBACK_PAGES (4096UL >> (PAGE_CACHE_SHIFT - 10)) | ||
30 | |||
31 | struct backing_dev_info; | 28 | struct backing_dev_info; |
32 | 29 | ||
33 | /* | 30 | /* |
@@ -194,6 +191,8 @@ void writeback_set_ratelimit(void); | |||
194 | void tag_pages_for_writeback(struct address_space *mapping, | 191 | void tag_pages_for_writeback(struct address_space *mapping, |
195 | pgoff_t start, pgoff_t end); | 192 | pgoff_t start, pgoff_t end); |
196 | 193 | ||
194 | void account_page_redirty(struct page *page); | ||
195 | |||
197 | /* pdflush.c */ | 196 | /* pdflush.c */ |
198 | extern int nr_pdflush_threads; /* Global so it can be exported to sysctl | 197 | extern int nr_pdflush_threads; /* Global so it can be exported to sysctl |
199 | read-only. */ | 198 | read-only. */ |
diff --git a/include/trace/events/writeback.h b/include/trace/events/writeback.h index 99d1d0decf88..8588a8918023 100644 --- a/include/trace/events/writeback.h +++ b/include/trace/events/writeback.h | |||
@@ -300,12 +300,13 @@ TRACE_EVENT(balance_dirty_pages, | |||
300 | unsigned long dirty_ratelimit, | 300 | unsigned long dirty_ratelimit, |
301 | unsigned long task_ratelimit, | 301 | unsigned long task_ratelimit, |
302 | unsigned long dirtied, | 302 | unsigned long dirtied, |
303 | unsigned long period, | ||
303 | long pause, | 304 | long pause, |
304 | unsigned long start_time), | 305 | unsigned long start_time), |
305 | 306 | ||
306 | TP_ARGS(bdi, thresh, bg_thresh, dirty, bdi_thresh, bdi_dirty, | 307 | TP_ARGS(bdi, thresh, bg_thresh, dirty, bdi_thresh, bdi_dirty, |
307 | dirty_ratelimit, task_ratelimit, | 308 | dirty_ratelimit, task_ratelimit, |
308 | dirtied, pause, start_time), | 309 | dirtied, period, pause, start_time), |
309 | 310 | ||
310 | TP_STRUCT__entry( | 311 | TP_STRUCT__entry( |
311 | __array( char, bdi, 32) | 312 | __array( char, bdi, 32) |
@@ -320,6 +321,8 @@ TRACE_EVENT(balance_dirty_pages, | |||
320 | __field(unsigned int, dirtied_pause) | 321 | __field(unsigned int, dirtied_pause) |
321 | __field(unsigned long, paused) | 322 | __field(unsigned long, paused) |
322 | __field( long, pause) | 323 | __field( long, pause) |
324 | __field(unsigned long, period) | ||
325 | __field( long, think) | ||
323 | ), | 326 | ), |
324 | 327 | ||
325 | TP_fast_assign( | 328 | TP_fast_assign( |
@@ -336,6 +339,9 @@ TRACE_EVENT(balance_dirty_pages, | |||
336 | __entry->task_ratelimit = KBps(task_ratelimit); | 339 | __entry->task_ratelimit = KBps(task_ratelimit); |
337 | __entry->dirtied = dirtied; | 340 | __entry->dirtied = dirtied; |
338 | __entry->dirtied_pause = current->nr_dirtied_pause; | 341 | __entry->dirtied_pause = current->nr_dirtied_pause; |
342 | __entry->think = current->dirty_paused_when == 0 ? 0 : | ||
343 | (long)(jiffies - current->dirty_paused_when) * 1000/HZ; | ||
344 | __entry->period = period * 1000 / HZ; | ||
339 | __entry->pause = pause * 1000 / HZ; | 345 | __entry->pause = pause * 1000 / HZ; |
340 | __entry->paused = (jiffies - start_time) * 1000 / HZ; | 346 | __entry->paused = (jiffies - start_time) * 1000 / HZ; |
341 | ), | 347 | ), |
@@ -346,7 +352,7 @@ TRACE_EVENT(balance_dirty_pages, | |||
346 | "bdi_setpoint=%lu bdi_dirty=%lu " | 352 | "bdi_setpoint=%lu bdi_dirty=%lu " |
347 | "dirty_ratelimit=%lu task_ratelimit=%lu " | 353 | "dirty_ratelimit=%lu task_ratelimit=%lu " |
348 | "dirtied=%u dirtied_pause=%u " | 354 | "dirtied=%u dirtied_pause=%u " |
349 | "paused=%lu pause=%ld", | 355 | "paused=%lu pause=%ld period=%lu think=%ld", |
350 | __entry->bdi, | 356 | __entry->bdi, |
351 | __entry->limit, | 357 | __entry->limit, |
352 | __entry->setpoint, | 358 | __entry->setpoint, |
@@ -358,7 +364,9 @@ TRACE_EVENT(balance_dirty_pages, | |||
358 | __entry->dirtied, | 364 | __entry->dirtied, |
359 | __entry->dirtied_pause, | 365 | __entry->dirtied_pause, |
360 | __entry->paused, /* ms */ | 366 | __entry->paused, /* ms */ |
361 | __entry->pause /* ms */ | 367 | __entry->pause, /* ms */ |
368 | __entry->period, /* ms */ | ||
369 | __entry->think /* ms */ | ||
362 | ) | 370 | ) |
363 | ); | 371 | ); |
364 | 372 | ||