writeback updates for 3.6
Subsystems (5)
Hi Linus,
The following changes since commit f8f5701bdaf9134b1f90e5044a82c66324d2073f:
Linux 3.5-rc1 (2012-06-02 18:29:26 -0700)
are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/wfg/linux.git tags/writeback-proportions
for you to fetch changes up to 331cbdeedeb2f4ef01ccb761513708af0fe77098:
writeback: Fix some comment errors (2012-06-09 19:54:47 +0800)
----------------------------------------------------------------
Use time based periods to age the writeback proportions, which can adapt equally well to fast/slow devices.
----------------------------------------------------------------
Jan Kara (4):
writeback: Fix lock imbalance in writeback_sb_inodes()
lib: Proportions with flexible period
lib: Fix possible deadlock in flexible proportion code
block: Convert BDI proportion calculations to flexible proportions
Wanpeng Li (1):
writeback: Fix some comment errors
fs/fs-writeback.c | 5 +- fs/super.c | 2 +- fs/sync.c | 2 +- include/linux/backing-dev.h | 4 +- include/linux/flex_proportions.h | 101 ++++++++++++++ lib/Makefile | 2 +- lib/flex_proportions.c | 272 ++++++++++++++++++++++++++++++++++++++ mm/backing-dev.c | 6 +- mm/page-writeback.c | 107 +++++++++------ 9 files changed, 450 insertions(+), 51 deletions(-) create mode 100644 include/linux/flex_proportions.h create mode 100644 lib/flex_proportions.c
fs/fs-writeback.c +3 -2
@@ -628,8 +628,8 @@ static long writeback_sb_inodes(struct super_block *sb, }/* -* Don't bother with new inodes or inodes beeing freed, first -* kind does not need peridic writeout yet, and for the latter +* Don't bother with new inodes or inodes being freed, first +* kind does not need periodic writeout yet, and for the latter * kind writeout is handled by the freer. */ spin_lock (&inode->i_lock);
@@ -664,6 +664,7 @@ static long writeback_sb_inodes(struct super_block *sb,/* Wait for I_SYNC. This function drops i_lock... */ inode_sleep_on_writeback (inode);/* Inode may be gone, start again */ +spin_lock (&wb->list_lock);continue ; } inode->i_state |=I_SYNC ;
fs/super.c +1 -1
@@ -318,7 +318,7 @@ static int grab_super(struct super_block *s) __releases(sb_lock)/* * grab_super_passive - acquire a passive reference -* @s: reference we are trying to grab +* @sb: reference we are trying to grab * * Tries to acquire a passive reference. This is used in places where we * cannot take an active reference but we need to ensure that the
fs/sync.c +1 -1
@@ -92,7 +92,7 @@ static void sync_filesystems(int wait) }/* -* sync everything. Start out by waking pdflush, because that writes back +* sync everything. Start out by waking flusher, because that writes back * all queues in parallel. */ SYSCALL_DEFINE0 (sync)
include/linux/backing-dev.h +2 -2
@@ -10,7 +10,7 @@#include <linux/percpu_counter.h> #include <linux/log2.h> -#include <linux/proportions.h> +#include <linux/flex_proportions.h> #include <linux/kernel.h> #include <linux/fs.h> #include <linux/sched.h>
@@ -89,7 +89,7 @@ struct backing_dev_info {unsigned long dirty_ratelimit;unsigned long balanced_dirty_ratelimit; -struct prop_local_percpu completions; +struct fprop_local_percpu completions;int dirty_exceeded;unsigned int min_ratio;
include/linux/flex_proportions.h new file +101 -0
101 lines not on this page · raw message
lib/Makefile +1 -1
@@ -11,7 +11,7 @@ lib-y := ctype.o string.o vsprintf.o cmdline.o \ rbtree.o radix-tree.o dump_stack.o timerqueue.o\ idr.o int_sqrt.o extable.o prio_tree.o \ sha1.o md5.o irq_regs.o reciprocal_div.o argv_split.o \ - proportions.o prio_heap.o ratelimit.o show_mem.o \ + proportions.o flex_proportions.o prio_heap.o ratelimit.o show_mem.o \ is_single_threaded.o plist.o decompress.o lib-$(CONFIG_MMU) += ioremap.o
lib/flex_proportions.c new file +272 -0
272 lines not on this page · raw message
mm/backing-dev.c +3 -3
@@ -677,7 +677,7 @@ int bdi_init(struct backing_dev_info *bdi) bdi->min_ratio =0 ; bdi->max_ratio =100 ; - bdi->max_prop_frac =PROP_FRAC_BASE ; + bdi->max_prop_frac =FPROP_FRAC_BASE ;spin_lock_init (&bdi->wb_lock);INIT_LIST_HEAD (&bdi->bdi_list);INIT_LIST_HEAD (&bdi->work_list);
@@ -700,7 +700,7 @@ int bdi_init(struct backing_dev_info *bdi) bdi->write_bandwidth =INIT_BW ; bdi->avg_write_bandwidth =INIT_BW ; - err =prop_local_init_percpu (&bdi->completions); + err =fprop_local_init_percpu (&bdi->completions);if (err) { err:
@@ -744,7 +744,7 @@ void bdi_destroy(struct backing_dev_info *bdi)for (i =0 ; i <NR_BDI_STAT_ITEMS ; i++)percpu_counter_destroy (&bdi->bdi_stat[i]); -prop_local_destroy_percpu (&bdi->completions); +fprop_local_destroy_percpu (&bdi->completions); }EXPORT_SYMBOL (bdi_destroy);
mm/page-writeback.c +66 -41
185 lines not on this page · raw message